2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
6 #ifndef SERIAL_HIDD_INTERN_H
7 #define SERIAL_HIDD_INTERN_H
11 // #include <sys/termios.h>
13 #ifndef EXEC_LIBRARIES_H
14 # include <exec/libraries.h>
20 # include <hidd/serial.h>
23 #include <exec/interrupts.h>
24 #include <hardware/uart.h>
26 #define SER_MAX_UNITS 4
30 OOP_Class
*SerialHIDDClass
;
32 OOP_Object
*SerialUnits
[SER_MAX_UNITS
];
36 #define SER_UNIT_0_F 1
37 #define SER_UNIT_1_F 2
38 #define SER_UNIT_2_F 4
39 #define SER_UNIT_3_F 8
41 struct HIDDSerialUnitData
43 ULONG (*DataWriteCallBack
) (ULONG unitnum
, APTR userdata
);
44 VOID (*DataReceivedCallBack
)(UBYTE
*buffer
, ULONG len
, ULONG unitnum
, APTR userdata
);
45 VOID
*DataWriteUserData
;
46 VOID
*DataReceivedUserData
;
59 struct class_static_data
61 OOP_Class
*serialhiddclass
;
62 OOP_Class
*serialunitclass
;
64 struct HIDDSerialUnitData
*units
[SER_MAX_UNITS
];
65 OOP_AttrBase hiddSerialUnitAB
;
66 struct Interrupt intHandler
[2];
69 #define __IHidd_SerialUnitAB (csd->hiddSerialUnitAB)
71 #define SER_DEFAULT_BAUDRATE 57600
77 struct IntHIDDSerialBase
79 struct Library hdg_LibNode
;
81 struct class_static_data hdg_csd
;
85 #define CSD(x) (&((struct IntHIDDSerialBase *)x)->hdg_csd)
87 /* pre declarations */
89 OOP_Class
*init_serialhiddclass(struct class_static_data
*csd
);
90 void free_serialhiddclass(struct class_static_data
*csd
);
92 OOP_Class
*init_serialunitclass(struct class_static_data
*csd
);
93 void free_serialunitclass(struct class_static_data
*csd
);
95 #endif /* SERIAL_HIDD_INTERN_H */