revert between 56095 -> 55830 in arch
[AROS.git] / arch / i386-pc / drivers / serial.hidd / serial_intern.h
blob03757e2b0a2e84f6835f4d45a0efcd459d2cead6
1 /*
2 Copyright © 1995-2011, 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 // #include <sys/termios.h>
13 #ifndef EXEC_LIBRARIES_H
14 # include <exec/libraries.h>
15 #endif
16 #ifndef OOP_OOP_H
17 # include <oop/oop.h>
18 #endif
19 #ifndef HIDD_SERIAL_H
20 # include <hidd/serial.h>
21 #endif
22 #include <dos/dos.h>
23 #include <exec/interrupts.h>
24 #include <hardware/uart.h>
26 #define SER_MAX_UNITS 4
28 struct HIDDSerialData
30 OOP_Class *SerialHIDDClass;
32 OOP_Object *SerialUnits[SER_MAX_UNITS];
33 UBYTE usedunits;
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;
48 ULONG unitnum;
49 ULONG baseaddr;
50 ULONG baudrate;
51 UBYTE datalength;
52 BOOL parity;
53 UBYTE paritytype;
54 UBYTE stopbits;
55 BOOL breakcontrol;
56 BOOL stopped;
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
75 /* Library base */
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 */