![]() |
O2S C Library 1.8.2
Provide high-level data-structures and other fundamental tools for C projects
|
Verbose alternative to termios.c_cflag. More...
#include <serial_options.h>
Data Fields | |
uint32_t | character_size:2 |
Number of bits used by a single character. | |
uint32_t | two_stop_bits:1 |
Set two stop bits, rather than one. | |
uint32_t | read:1 |
Enable receiver. | |
uint32_t | enable_parity:1 |
Enable parity generation on output and parity checking for input. | |
uint32_t | odd_parity:1 |
If set, then parity for input and output is odd; otherwise even parity is used. | |
uint32_t | hang_up:1 |
Lower modem control lines after last process closes the device (hang up). | |
uint32_t | is_local:1 |
Ignore modem control lines. |
Verbose alternative to termios.c_cflag.
Documentation source: https://www.gnu.org/software/libc/manual/html_node/Control-Modes.html.
This structures stores the terminal flags and fields that control parameters usually associated with asynchronous serial data transmission. These flags may not make sense for other kinds of terminal ports (such as a network connection pseudo-terminal).
Definition at line 82 of file serial_options.h.
uint32_t serial_control_modes::character_size |
Number of bits used by a single character.
See the character_size enum for possible values.
Definition at line 85 of file serial_options.h.
uint32_t serial_control_modes::enable_parity |
Enable parity generation on output and parity checking for input.
If this bit is set, generation and detection of a parity bit are enabled.
See serial_input_modes, for information on how input parity errors are handled.
If this bit is not set, no parity bit is added to output characters, and input characters are not checked for correct parity.
Definition at line 89 of file serial_options.h.
uint32_t serial_control_modes::hang_up |
Lower modem control lines after last process closes the device (hang up).
If this bit is set, a modem disconnect is generated when all processes that have the terminal device open have either closed the file or exited.
Definition at line 93 of file serial_options.h.
uint32_t serial_control_modes::is_local |
Ignore modem control lines.
If this bit is set, it indicates that the terminal is connected “locally” and that the modem status lines (such as carrier detect) should be ignored.
On many systems if this bit is not set and you call open without the O_NONBLOCK flag set, open blocks until a modem connection is established.
If this bit is not set and a modem disconnect is detected, a SIGHUP signal is sent to the controlling process group for the terminal (if it has one). Normally, this causes the process to exit; see Signal Handling. Reading from the terminal after a disconnect causes an end-of-file condition, and writing causes an EIO error to be returned. The terminal device must be closed and reopened to clear the condition.
Definition at line 94 of file serial_options.h.
uint32_t serial_control_modes::odd_parity |
If set, then parity for input and output is odd; otherwise even parity is used.
This bit is only useful if enable_parity is set.
If odd_parity is set, odd parity is used, otherwise even parity is used.
Definition at line 91 of file serial_options.h.
uint32_t serial_control_modes::read |
Enable receiver.
If this bit is set, input can be read from the terminal.
Otherwise, input is discarded when it arrives.
Definition at line 87 of file serial_options.h.
uint32_t serial_control_modes::two_stop_bits |
Set two stop bits, rather than one.
If this bit is set, two stop bits are used.
Otherwise, only one stop bit is used.
Definition at line 86 of file serial_options.h.