TTYINIT

Structure used to initialize a tty device

typedef struct ttyinit_entry {
    _Paddr64t            port;
    unsigned             port_shift;
    unsigned             intr;
    unsigned int         baud;
    unsigned int         isize;
    unsigned int         osize;
    unsigned int         csize;
    unsigned int         c_cflag;
    unsigned int         c_iflag;
    unsigned int         c_lflag;
    unsigned int         c_oflag;
    unsigned int         fifo;
    unsigned int         clk;
    unsigned int         div;
    char                 name[TTY_NAME_MAX];
    char                *reserved1;
    unsigned             reserved2;
    unsigned int         verbose;
    unsigned int         highwater;
    char                 logging_path[_POSIX_PATH_MAX];
    volatile unsigned    lflags;
    unsigned             unit;
} TTYINIT;

Description:

A character driver shares the TTYINIT structure with the io-char library. This structure is used to initialize baud rate, input, output, canonical buffer sizes, termios flags, interrupts, etc.

The members include:

port
Contains addresses of device registers.
port_shift
Used to provide spacing between registers. For example:
  • 0 is for 8-bit registers
  • 1 is for 16-bit registers
  • 2 is for 32-bit registers
intr
The interrupt number associated with the device.
baud
The device's baud rate.
isize
The input buffer size.
osize
The output buffer size.
csize
The canonical buffer size.
c_cflag
Refer to TTYDEV.
c_iflag
Refer to TTYDEV.
c_lflag
Refer to TTYDEV.
c_oflag
Refer to TTYDEV.
fifo
Refer to TTYDEV.
clk
The clock frequency used with the baud rate and divisor in stty
div
The divisor used with the baud rate and clock in stty.
name
The name of the device.
reserved1
Reserved for io-char use.
reserved2
Reserved for io-char use.
verbose
Driver verbosity.
highwater
The ibuf highwater mark for flow control.
logging_path
A path to where the logs should be created, or /dev/shmem if NULL.
lflags
Logging flags.
unit
A serial device unit number.
Page updated: