]> cloudbase.mooo.com Git - z180-stamp-cpm3.git/blame - cbios/ioctl.inc
Add TCGETA, TCSETA
[z180-stamp-cpm3.git] / cbios / ioctl.inc
CommitLineData
6dd88c25
L
1\r
2b2m macro name,nr\r
3name equ nr\r
4M_&name equ 1 shl nr\r
5 endm\r
6\r
7\r
8TCINIT equ 00h ;CP/M 3 DEVINI function\r
9TCGETA equ 01h ;Get the current serial port settings.\r
10TCSETA equ 02h ;Set the current serial port settings.\r
11TCSETAW equ 03h ;Allow the output buffer to drain\r
12TCSETAF equ 04h ;Allow the output buffer to drain, discard pending input\r
13TCSBRK equ 05h ;Sending a break (250ms .. 500ms)\r
14TCSBRKP equ 06h ;arg is timeinterval in 0.1sec\r
15TIOCSBRK equ 07h ;Turn break on\r
16TIOCCBRK equ 08h ;Turn break off\r
17TCXONC equ 09h ;Software flow control (TCOOFF, TCOON, TCIOFF, TCION)\r
18TCFLSH equ 0Ah ;Flush input/output buffer (TCIFLUSH, TCOFLUSH, TCIOFLUSH)\r
19FIONREAD equ 0Bh ;Get the number of bytes in the input buffer.\r
20TIOCOUTQ equ 0Ch ;Get the number of bytes in the output buffer.\r
21TIOCMGET equ 0Dh ;get the status of modem bits.\r
22TIOCMBIS equ 0Eh ;set the indicated modem bits.\r
23TIOCMBIC equ 0Fh ;clear the indicated modem bits.\r
24TIOCMSET equ 10h ;set the status of modem bits.\r
25TIOCGSOFTCAR equ 11h ;Get the status of the CLOCAL flag in the c_cflag field\r
26TIOCSSOFTCAR equ 12h ;Set the CLOCAL flag when *argp is nonzero, and clear it otherwise.\r
27\r
28\r
1c7e3963 29; iflags bits (0)\r
6dd88c25
L
30 b2m IGNBRK, 0 ;Ignore BREAK condition on input.\r
31 b2m BRKINT, 1\r
32 b2m INPCK, 2 ;Enable input parity checking.\r
33 b2m IGNPAR, 3 ;Ignore framing errors and parity errors.\r
34 b2m PARMRK, 4 ;Prefix a character with a parity error or framing error with FFH 00H.\r
35 b2m ISTRIP, 5 ;Strip off eighth bit.\r
36 b2m PARODD, 6 ;If set, then parity for input and output is odd.\r
1c7e3963 37; fflags bits (1)\r
6dd88c25
L
38 b2m IXON, 0 ;Enable XON/XOFF flow control on output.\r
39 b2m IXANY, 1 ;Typing any character will restart stopped output.\r
40 b2m IXOFF, 2 ;Enable XON/XOFF flow control on input.\r
41 b2m CRTS_IFLOW, 3 ;RTS flow control of input.\r
42 b2m CCTS_OFLOW, 4 ;CTS flow control of output.\r
43 b2m CLOCAL, 5 ;Ignore modem control lines.\r
44 b2m CREAD, 6 ;Enable receiver.\r
45\r
46\r
1c7e3963 47; cflags (2)\r
6dd88c25
L
48M_CBAUD equ 01Fh ;Baud speed mask\r
49 B0 equ 000h ;hang up\r
50 B50 equ 011h\r
51 B75 equ 012h\r
52 B110 equ 013h\r
53 B134 equ 014h\r
54 B150 equ 005h\r
55 B300 equ 006h\r
56 B600 equ 007h\r
57 B1200 equ 008h\r
58 B1800 equ 009h\r
59 B2400 equ 00Ah\r
60 B3600 equ 00Bh\r
61 B4800 equ 00Ch\r
62 B7200 equ 00Dh\r
63 B9600 equ 00Eh\r
64 B19200 equ 00Fh\r
65 B28800 equ 001h\r
66 B38400 equ 002h\r
67 B57600 equ 003h\r
68 B115200 equ 004h\r
69 B144000 equ 014h\r
70 B192000 equ 016h\r
71 B288000 equ 017h\r
72M_CSIZE equ 020h ;Character size mask.\r
1c7e3963
L
73 M_CS7 equ 000h ;\r
74 M_CS8 equ 020h ;\r
75 CS8 equ 5 ;\r
6dd88c25
L
76 b2m CSTOPB, 6 ;Set two stop bits, rather than one.\r
77 b2m PARENB, 7 ;Enable parity generation on output and parity checking for input.\r
78\r
79\r
80; tcflag_t c_lflag; /* local mode flags */\r
81;ECHO equ 00000001B\r
82\r
83\r
84; Parameter for TCXONC\r
85TCOOFF equ 0 ;suspends output.\r
86TCOON equ 1 ;restarts suspended output.\r
87TCIOFF equ 2 ;transmits a STOP character\r
88TCION equ 3 ;transmits a START character\r
89\r
90; Parameter for TCFLSH\r
91TCIFLUSH equ 0 ;flushes data received but not read.\r
92TCOFLUSH equ 1 ;flushes data written but not transmitted.\r
93TCIOFLUSH equ 2 ;flushes both.\r
94\r
95; modem lines\r
96\r
97TIOCM_LE equ 001h ;DSR (data set ready/line enable)\r
98TIOCM_DTR equ 002h ;DTR (data terminal ready)\r
99TIOCM_RTS equ 004h ;RTS (request to send)\r
100TIOCM_CTS equ 008h ;CTS (clear to send)\r
101TIOCM_CD equ 010h ;DCD (data carrier detect)\r
102TIOCM_RI equ 020h ;RNG (ring)\r
103TIOCM_DSR equ 040h ;DSR (data set ready)\r
104TIOCM_OUT1 equ 080h ;\r