make.tmpl: add missing compiler attribute to build_progs
[AROS.git] / arch / all-unix / hidd / serial / serial_intern.h
blobae65532da9aa23c60beb97fa5ef0da3f85ef7800
1 /*
2 Copyright © 1995-2007, 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>
24 #define SER_MAX_UNITS 4
26 struct HIDDSerialData
28 OOP_Class *SerialHIDDClass;
30 OOP_Object *SerialUnits[SER_MAX_UNITS];
31 UBYTE usedunits;
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;
59 ULONG unitnum;
60 int filedescriptor;
61 ULONG baudrate;
62 UBYTE datalength;
63 BOOL parity;
64 UBYTE paritytype;
65 UBYTE stopbits;
66 BOOL breakcontrol;
68 BOOL stopped;
70 OOP_Object *unixio;
72 #if 0
73 struct MsgPort *replyport_read;
74 struct Interrupt *softint_read;
75 HIDD unixio_read;
77 struct MsgPort *replyport_write;
78 struct Interrupt *softint_write;
79 HIDD unixio_write;
80 #endif
82 struct termios orig_termios;
86 #define SER_DEFAULT_BAUDRATE 57600
89 /* Library base */
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 */