2 Copyright © 1995-2007, 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>
24 #define SER_MAX_UNITS 4
28 OOP_Class
*SerialHIDDClass
;
30 OOP_Object
*SerialUnits
[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
41 struct class_static_data
43 OOP_Class
*serialhiddclass
;
44 OOP_Class
*serialunitclass
;
45 OOP_AttrBase hiddSerialUnitAB
;
46 OOP_AttrBase hiddUnixIOAttrBase
;
49 #define __IHidd_SerialUnitAB (CSD(cl)->hiddSerialUnitAB)
50 #define __IHidd_UnixIO (CSD(cl)->hiddUnixIOAttrBase)
52 struct HIDDSerialUnitData
54 VOID (*DataWriteCallBack
) (ULONG unitnum
, APTR userdata
);
55 VOID (*DataReceivedCallBack
)(UBYTE
*buffer
, ULONG len
, ULONG unitnum
, APTR userdata
);
56 VOID
*DataWriteUserData
;
57 VOID
*DataReceivedUserData
;
73 struct MsgPort
*replyport_read
;
74 struct Interrupt
*softint_read
;
77 struct MsgPort
*replyport_write
;
78 struct Interrupt
*softint_write
;
82 struct termios orig_termios
;
86 #define SER_DEFAULT_BAUDRATE 57600
91 struct IntHIDDSerialBase
93 struct Library hdg_LibNode
;
95 struct class_static_data hdg_csd
;
99 #define CSD(cl) (&((struct IntHIDDSerialBase *)cl->UserData)->hdg_csd)
101 #endif /* SERIAL_HIDD_INTERN_H */