hcj@lzaz.ATT.COM (HC Johnson) (03/01/89)
Here is some documentation on the rs232 ioctls for the kernel previously posted. Most are the same as termio.h, some were added. ioctl(filedes,cmd,arg) long arg; Commands: TCGETA (TC_RS232|1) : Get the terminal params and store in a struct termio pointed to by arg. TCSETA (TC_RS232|2) : Set params from a struct termio immediately. TCSETAW (TC_RS232|3) : Set params from a struct termio after waiting for output to drain. TCSETAF (TC_RS232|4) : Set params from a struct termio after waiting for output to drain and flushing the input queue. TCSBRK (TC_RS232|5) : Send a break. Duration is 100 Ms. Change the define RS232_BREAK in kernel/rs232.c to 12 if you need 240 ms. TCXONC (TC_RS232|6) : Start/stop output arg 0 is stop, 1 is start. This was to dangerous to implement. TCFLSH (TC_RS232|7) : If arg is 0, flush the input queue; if 1 flush the output queue; if 2 flush both queues. TCDSET (TC_RS232|32) : Unimplemented. TCFLOW (TC_RS232|33) : Set the TOS like flow control. Arg is 0, no flow control; 1, use XON/XOFF; 2 use thr rts/cts leads. TCFLOWON (TC_RS232|34) : Change the XON character to arg. TCFLOWOFF (TC_RS232|35) : Change the XOFF character to arg. FIONREAD (TC_RS232|36) : Tell how many characters can be read without blocking. Arg is the address of a short. Note that this is not needed in RAW mode. TCGETRS (TC_RS232|37) : Arg points to space the size of struct tty plus struct ring that is filled, first with the rstty_struct and then the ring. TCSETDTR (TC_RS232|38) : Set the state of the rts and dtr leads: The low 4 bits in arg are interpreted as |rts|dtr, where 01 sets the field to off, and 10 sets the field to on. 00 or 11 in a field leaves it unchanged. TCBAUD (TC_RS232|99) : Used by rstty.c internally to set the baud. Usually use TCSETA to set all parameters and the baud. TCBAUD will set just the baud from arg. Howard C. Johnson ATT Bell Labs att!lzaz!hcj hcj@lzaz.att.com