National Instruments PCI-232/2 Isolated Tablet User Manual


 
© National Instruments Corporation 9 Using PCI Serial with Linux
The hardware issues a transmit empty interrupt when the number of
characters in the transmit FIFO falls below the trigger level. Also, the
hardware issues a receive full interrupt when the number of characters in
the receive FIFO rises above the trigger level. For more information on
FIFO buffers, refer to your PCI serial getting started manual.
FIFO Example
Enter the following to set the receive FIFO trigger level to 56 and the
transmit trigger level to 32 for
/dev/ttyS5:
linux PCI-SERIAL# ./FIFOtrigger 5 0x80 0x20
Configure struct termios
Every serial port has an associated struct termios. By using this
struct termios in a program, you can set the baud rate, character size
(number of data bits), parity, control characters, flow control, and input and
output mode. For more information about the termios structure, refer to the
termios man page. To view the termios man page, enter the
following:
linux# man termios
To configure your serial port, use a program segment similar to the
termios_program.c in your PCI-SERIAL directory.
Table 1.
tx_trigger Values
Transmit FIFO Trigger Level tx_trigger
8 0x00
16 0x10
32 0x20
56 0x30
Table 2.
rx_trigger Values
Receive FIFO Trigger Level rx_trigger
8 0x00
16 0x40
56 0x80
60 0xC0