UART(3)                                                   UART(3)

     NAME
          duart, uart, eia, astar - serial communication control

     SYNOPSIS
          bind -a #t /dev

          /dev/eia0
          /dev/eia0ctl
          /dev/eia1
          /dev/eia1ctl

          bind -a #G /dev

          /dev/astar0ctl
          /dev/astar0mem
          /dev/eia000
          /dev/eia000ctl
          /dev/eia000stat
          /dev/eia001
          /dev/eia001ctl
          /dev/eia001stat
          ...

     DESCRIPTION
          The serial line devices serve a one-level directory, giving
          access to the serial ports.  There are several devices serv-
          ing the same files; the particular one used depends on the
          machine involved.  Eia0 is the data file.  It can be read
          and written to use that port.  Reads will block until at
          least one character is available.  Eia0ctl is a control file
          associated with the port.  Eia1 and eia1ctl are similar, but
          for a second serial line.

          The ctl configures the port.  It accepts the following com-
          mands:

          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 input FIFO if n is non-zero; else disable.

          pc   Set parity to odd if c is o, to even if c is e; else

     Page 1                       Plan 9             (printed 4/26/24)

     UART(3)                                                   UART(3)

               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.

          The Star Gate Avanstar intelligent serial board has a sepa-
          rate driver.  The individual data and ctl files behave like
          regular UART files, but there are 16 per controller.  The
          stat files contain a textual representation of the status of
          the line, in the format of the commands used on the ctl
          file.  The astar0ctl and astar0mem files are used by the
          aux/astarld program to download the controller software for
          the boards.

     FILES
          /sys/lib/astar/* download files for the Avanstar

          /bin/aux/astarld download program for the Avanstar

     SOURCE
          /sys/src/9/port/devns16552.c
          /sys/src/9/ch/devz8530.c
          /sys/src/9/pc/devastar.c

     Page 2                       Plan 9             (printed 4/26/24)