Structure used to initialize a tty device
typedef struct ttyinit_entry {
_Paddr64t port;
unsigned port_shift;
unsigned intr;
int baud;
int isize;
int osize;
int csize;
int c_cflag;
int c_iflag;
int c_lflag;
int c_oflag;
int fifo;
int clk;
int div;
char name[TTY_NAME_MAX];
char *pmm_parent;
unsigned pmflags;
int verbose;
int highwater;
} TTYINIT;
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
- See TTYDEV.
- c_iflag
- See TTYDEV.
- c_lflag
- See TTYDEV.
- c_oflag
- See TTYDEV.
- fifo
- See 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.
- pmm_parent
- Power manager namespace.
- pmflags
- Common power-management flags. One of:
- PWR_INIT_DRVREG — register as a power-managed device.
- PWR_INIT_DRVPSTORE — driver wants its own persistent storage object .
- PWR_INIT_DRVSAVE — driver wants to store data for HWVOL or NORAM
- PWR_INIT_DRVOVERRIDE — driver will assume all setpower functionality.
- PWR_INIT_DRVNOFLOWCTL —driver should delay
before powering down for flow control.
- PWR_INIT_NOPMM —indicates that there is not power manager running on init.
- verbose
- Driver verbosity.
- highwater
- ibuf highwater mark for flow control.
QNX Neutrino
TTYDEV