revert between 56095 -> 55830 in arch
[AROS.git] / compiler / include / devices / serial.h
blob4439ab7b3f3a4e335764ad29afda973d1ead84fa
1 #ifndef DEVICES_SERIAL_H
2 #define DEVICES_SERIAL_H
4 /*
5 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
6 $Id$
8 Desc: Serial device commands, structures, defintions etc.
9 Lang: english
12 #include "exec/io.h"
14 struct IOTArray
16 ULONG TermArray0;
17 ULONG TermArray1;
20 #define SER_DEFAULT_CTLCHAR 0x11130000
22 struct IOExtSer
24 struct IOStdReq IOSer;
25 ULONG io_CtlChar;
26 ULONG io_RBufLen;
27 ULONG io_ExtFlags;
28 ULONG io_Baud;
29 ULONG io_BrkTime;
30 struct IOTArray io_TermArray;
31 UBYTE io_ReadLen;
32 UBYTE io_WriteLen;
33 UBYTE io_StopBits;
34 UBYTE io_SerFlags;
35 UWORD io_Status;
38 #define SDCMD_QUERY CMD_NONSTD
39 #define SDCMD_BREAK (CMD_NONSTD+1)
40 #define SDCMD_SETPARAMS (CMD_NONSTD+2)
43 ** The follwoing flags(bits) are to be set in IOExtSer->IOSer.io_Flags
46 #define SERB_PARTY_ON 0
47 #define SERF_PARTY_ON (1<<0)
48 #define SERB_PARTY_ODD 1
49 #define SERF_PARTY_ODD (1<<1)
50 #define SERB_7WIRE 2
51 #define SERF_7WIRE (1<<2)
52 #define SERB_QUEUEDBRK 3
53 #define SERF_QUEUEDBRK (1<<3)
54 #define SERB_RAD_BOOGIE 4
55 #define SERF_RAD_BOOGIE (1<<4)
56 #define SERB_SHARED 5
57 #define SERF_SHARED (1<<5)
58 #define SERB_EOFMODE 6
59 #define SERF_EOFMODE (1<<6)
60 #define SERB_XDISABLED 7
61 #define SERF_XDISABLED (1<<7)
64 ** The following flags(bits) are to be found in IOExtSer->io_Status
67 #define IO_STATB_OVERRUN 8
68 #define IO_STATF_OVERRUN (1<<8)
69 #define IO_STATB_WROTEBREAK 9
70 #define IO_STATF_WROTEBREAK (1<<9)
71 #define IO_STATB_READBREAK 10
72 #define IO_STATF_READBREAK (1<<10)
73 #define IO_STATB_XOFFWRITE 11
74 #define IO_STATF_XOFFWRITE (1<<11)
75 #define IO_STATB_XOFFREAD 12
76 #define IO_STATF_XOFFREAD (1<<12)
81 #define SEXTB_MARK 0
82 #define SEXTF_MARK (1<<0)
83 #define SEXTB_MSPON 1
84 #define SEXTF_MSPON (1<<1)
88 ** The follwoing error codes are to be found in IOExtSer->IOSer.io_Error
91 #define SerErr_DevBusy 1
92 #define SerErr_BaudMismatch 2
93 #define SerErr_BufErr 4
94 #define SerErr_InvParam 5
95 #define SerErr_LineErr 6
96 #define SerErr_ParityErr 9
97 #define SerErr_TimerErr 11
98 #define SerErr_BufOverflow 12
99 #define SerErr_NoDSR 13
100 #define SerErr_DetectedBreak 15
102 #define SERIALNAME "serial.device"
105 ** Anything below this point is obsolete.
108 #ifdef DEVICES_SERIAL_H_OBSOLETE
109 #define SerErr_InvBaud 3
110 #define SerErr_NotOpen 7
111 #define SerErr_PortReset 8
112 #define SerErr_InitErr 10
113 #define SerErr_NoCTS 14
116 #define IOSTB_OVERRUN 0
117 #define IOSTF_OVERRUN (1<<0)
118 #define IOSTB_WROTEBREAK 1
119 #define IOSTF_WROTEBREAK (1<<1)
120 #define IOSTB_READBREAK 2
121 #define IOSTF_READBREAK (1<<2)
122 #define IOSTB_XOFFWRITE 3
123 #define IOSTF_XOFFWRITE (1<<3)
124 #define IOSTB_XOFFREAD 4
125 #define IOSTF_XOFFREAD (1<<4)
127 #define IOSERB_ACTIVE 4
128 #define IOSERF_ACTIVE (1<<4)
129 #define IOSERB_ABORT 5
130 #define IOSERF_ABORT (1<<5)
131 #define IOSERB_QUEUED 6
132 #define IOSERF_QUEUED (1<<6)
133 #define IOSERB_BUFRREAD 7
134 #define IOSERF_BUFRREAD (1<<7)
135 #endif
138 #endif /* DEVICES_SERIAL_H */