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.
cn    Set hangup on DCD if n is non–zero; else clear it.
dn    Set DTR if n is non–zero; else clear it.
en    Set hangup on DSR if n is non–zero; else clear it.
f     Flush output queue.
h     Close input and output queues.
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. kn    Send a break lasting n milliseconds.
ln    Set number of bits per byte to n. Legal values are 5, 6, 7, or 8.
mn    Obey modem CTS signal if n is non–zero; else clear it.
n     Make writes non–blocking.
pc    Set parity to odd if c is o, to even if c is e; else set no parity.
qn    Set input and output queue limits to n.
rn    Set RTS if n is non–zero; else clear it.
sn    Set number of stop bits to n. Legal values are 1 or 2.
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
Copyright © 2024 Alcatel-Lucent. All rights reserved.