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 <hardware/uart.h>
25 #define SER_MAX_UNITS 4
29 OOP_Class
*sd_HIDDSerialClass
;
31 OOP_Object
*sd_Unit
[SER_MAX_UNITS
];
35 #define SER_UNIT_0_F 1
36 #define SER_UNIT_1_F 2
37 #define SER_UNIT_2_F 4
38 #define SER_UNIT_3_F 8
40 struct HIDDSerialUnitData
42 ULONG (*DataWriteCallBack
) (ULONG unitnum
, APTR userdata
);
43 VOID (*DataReceivedCallBack
)(UBYTE
*buffer
, ULONG len
, ULONG unitnum
, APTR userdata
);
44 VOID
*DataWriteUserData
;
45 VOID
*DataReceivedUserData
;
58 struct class_static_data
60 OOP_Class
*cs_SerialHIDDClass
;
61 OOP_Class
*cs_SerialUnitClass
;
63 OOP_Object
*cs_IRQHidd
;
66 struct HIDDSerialUnitData
*cs_Unit
[SER_MAX_UNITS
];
67 OOP_AttrBase cs_hiddSerialUnitAB
;
70 #define __IHidd_SerialUnitAB (csd->cs_hiddSerialUnitAB)
72 #define SER_DEFAULT_BAUDRATE 115200
78 struct IntHIDDSerialBase
80 struct Library hdg_LibNode
;
82 struct class_static_data hdg_csd
;
86 #define CSD(x) (&((struct IntHIDDSerialBase *)x)->hdg_csd)
88 /* pre declarations */
90 OOP_Class
*init_serialhiddclass(struct class_static_data
*csd
);
91 void free_serialhiddclass(struct class_static_data
*csd
);
93 OOP_Class
*init_serialunitclass(struct class_static_data
*csd
);
94 void free_serialunitclass(struct class_static_data
*csd
);
96 #endif /* SERIAL_HIDD_INTERN_H */