2 Copyright © 1995-2006, The AROS Development Team. All rights reserved.
5 Desc: Serial hidd initialization code.
9 #include <exec/types.h>
10 #include <exec/alerts.h>
12 #include <aros/symbolsets.h>
14 #include <proto/oop.h>
15 #include <proto/exec.h>
17 #include "serial_intern.h"
19 #include LC_LIBDEFS_FILE
24 #include <aros/debug.h>
26 AROS_INTP(serial_int_13
);
27 AROS_INTP(serial_int_24
);
29 static int PCSer_Init(LIBBASETYPEPTR LIBBASE
)
31 struct class_static_data
*csd
= &LIBBASE
->hdg_csd
; /* SerialHidd static data */
32 struct Interrupt
*irq
;
34 EnterFunc(bug("SerialHIDD_Init()\n"));
36 /* Install COM1 and COM3 interrupt */
37 irq
= &csd
->intHandler
[0];
38 irq
->is_Node
.ln_Name
= "COM1/COM3";
39 irq
->is_Node
.ln_Type
= NT_INTERRUPT
;
40 irq
->is_Node
.ln_Pri
=127; /* Set the highest pri */
41 irq
->is_Code
= (VOID_FUNC
)serial_int_13
;
42 irq
->is_Data
= (APTR
)csd
;
43 AddIntServer(INTB_KERNEL
+ 4, irq
);
45 /* Install COM2 and COM4 interrupt */
46 irq
= &csd
->intHandler
[1];
47 irq
->is_Node
.ln_Name
= "COM2/COM4";
48 irq
->is_Node
.ln_Type
= NT_INTERRUPT
;
49 irq
->is_Node
.ln_Pri
=127; /* Set the highest pri */
50 irq
->is_Code
= (VOID_FUNC
)serial_int_24
;
51 irq
->is_Data
= (APTR
)csd
;
52 AddIntServer(INTB_KERNEL
+ 3, irq
);
54 D(bug(" Got Interrupts\n"));
55 ReturnInt("SerialHIDD_Init", ULONG
, TRUE
);
58 ADD2INITLIB(PCSer_Init
, 0)