UART(3)
NAME
uart, eia − serial communication control
SYNOPSIS
bind -a #t /dev
/dev/eia0
/dev/eia0ctl
/dev/eia0status
/dev/eia1
/dev/eia1ctl
/dev/eia1status
...
DESCRIPTION
The serial line devices serve a one-level directory, giving access to the serial ports. Device n is accessed through eian (the data file), eianctl (the control file), and eianstatus (the read-only status file). Reads of the data file will block until at least one byte is available. The control file configures the port. It accepts the following commands:
bn Set the baud rate to n.
dn Set DTR if n is non-zero; else clear it.
kn Send a break lasting n milliseconds.
rn Set RTS if n is non-zero; else clear it.
mn Obey modem CTS signal if n is non-zero; else clear it.
in Enable/disable the FIFOs. If n is zero the FIFOs are disabled; otherwise n is taken as a trigger level for the FIFOs. The trigger levels supported are device dependant, but usually include 1, 4 and 8. An unrecognised, but non-zero, value of n causes the maximum-supported trigger level to be set.
pc Set parity to odd if c is o, to even if c is e; else set no parity.
sn Set number of stop bits to n. Legal values are 1 or 2.
ln Set number of bits per byte to n. Legal values are 5, 6, 7, or 8.
wn Set the uart clock timer to n times 100us.
The status files contain a textual representation of the status of the line, in the format of the commands used on the control file.
SOURCE
/sys/src/9/port/devuart.c
/sys/src/9/∗/uart∗.c
Plan 9 — December 03, 2004