Skip to content

Struct cais_serial_opts_t

Data Structures > cais_serial_opts_t

Configuration options for opening a serial UART port.

  • #include <serial.h>

Struct Members

Type Name
int baud
int data_bits
int dtr
int flow_control
char parity
int rts
int stop_bits
int timeout_ms

Member Details

baud

int baud;

Baud rate (e.g. 9600, 115200, or cais_serial_baud_t)


data_bits

int data_bits;

Data bits length: 5, 6, 7, or 8 (cais_serial_data_bits_t)


dtr

int dtr;

Initial DTR line state: -1 (ignore), 0 (low/clear), 1 (high/set)


flow_control

int flow_control;

Flow control mode: 0 (none), 1 (RTS/CTS hardware), 2 (XON/XOFF software)


parity

char parity;

Parity scheme: 'n' (none), 'e' (even), 'o' (odd), 'm' (mark), 's' (space)


rts

int rts;

Initial RTS line state: -1 (ignore), 0 (low/clear), 1 (high/set)


stop_bits

int stop_bits;

Stop bits count: 1 or 2 (cais_serial_stop_bits_t)


timeout_ms

int timeout_ms;

I/O timeout: <0 (blocking indefinitely), 0 (non-blocking), >0 (timeout in ms)



The documentation was generated from the following file: include/cais/serial.h