Fixed compatibility of output.
[AROS.git] / arch / .unmaintained / m68k-pp-native / Drivers / serial.hidd / serial_intern.h
blob936cc36f73c242209683d4b76d95ee14614979af
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #ifndef SERIAL_HIDD_INTERN_H
7 #define SERIAL_HIDD_INTERN_H
9 /* Include files */
11 #ifndef EXEC_LIBRARIES_H
12 # include <exec/libraries.h>
13 #endif
14 #ifndef OOP_OOP_H
15 # include <oop/oop.h>
16 #endif
17 #ifndef HIDD_SERIAL_H
18 # include <hidd/serial.h>
19 #endif
20 #include <dos/dos.h>
22 #define SER_MAX_UNITS 2
24 struct HIDDSerialData
26 OOP_Class *SerialHIDDClass;
28 OOP_Object *SerialUnits[SER_MAX_UNITS];
29 UBYTE usedunits;
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;
42 ULONG unitnum;
43 ULONG baseaddr;
44 ULONG baudrate;
45 UBYTE datalength;
46 BOOL parity;
47 UBYTE paritytype;
48 UBYTE stopbits;
49 BOOL breakcontrol;
50 BOOL stopped;
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;
62 OOP_Object *irqhidd;
64 struct HIDDSerialUnitData *units[SER_MAX_UNITS];
65 OOP_AttrBase hiddSerialUnitAB;
68 #define __IHidd_SerialUnitAB (csd->hiddSerialUnitAB)
70 #define SER_DEFAULT_BAUDRATE 57600
74 /* Library base */
76 struct IntHIDDSerialBase
78 struct Library hdg_LibNode;
79 BPTR hdg_SegList;
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)
89 #undef SysBase
90 #define SysBase (CSD(cl->UserData)->sysbase)
92 #undef UtilityBase
93 #define UtilityBase (CSD(cl->UserData)->utilitybase)
95 #undef OOPBase
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 */