2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
6 #ifndef SERIAL_HIDD_INTERN_H
7 #define SERIAL_HIDD_INTERN_H
11 #ifndef EXEC_LIBRARIES_H
12 # include <exec/libraries.h>
18 # include <hidd/serial.h>
22 #define SER_MAX_UNITS 2
26 OOP_Class
*SerialHIDDClass
;
28 OOP_Object
*SerialUnits
[SER_MAX_UNITS
];
32 #define SER_UNIT_0_F 1
33 #define SER_UNIT_1_F 2
35 struct HIDDSerialUnitData
37 VOID (*DataWriteCallBack
) (ULONG unitnum
, APTR userdata
);
38 VOID (*DataReceivedCallBack
)(UBYTE
*buffer
, ULONG len
, ULONG unitnum
, APTR userdata
);
39 VOID
*DataWriteUserData
;
40 VOID
*DataReceivedUserData
;
53 struct class_static_data
55 struct ExecBase
* sysbase
;
56 struct Library
* utilitybase
;
57 struct Library
* oopbase
;
59 OOP_Class
*serialhiddclass
;
60 OOP_Class
*serialunitclass
;
64 struct HIDDSerialUnitData
*units
[SER_MAX_UNITS
];
65 OOP_AttrBase hiddSerialUnitAB
;
68 #define __IHidd_SerialUnitAB (csd->hiddSerialUnitAB)
70 #define SER_DEFAULT_BAUDRATE 57600
76 struct IntHIDDSerialBase
78 struct Library hdg_LibNode
;
80 struct ExecBase
*hdg_SysBase
;
81 struct Library
*hdg_UtilityBase
;
83 struct class_static_data
*hdg_csd
;
87 #define CSD(x) ((struct class_static_data *)x)
90 #define SysBase (CSD(cl->UserData)->sysbase)
93 #define UtilityBase (CSD(cl->UserData)->utilitybase)
96 #define OOPBase (CSD(cl->UserData)->oopbase)
99 /* pre declarations */
101 OOP_Class
*init_serialhiddclass(struct class_static_data
*csd
);
102 void free_serialhiddclass(struct class_static_data
*csd
);
104 OOP_Class
*init_serialunitclass(struct class_static_data
*csd
);
105 void free_serialunitclass(struct class_static_data
*csd
);
107 #endif /* SERIAL_HIDD_INTERN_H */