27bool serial_get_options(serial_port_t* port)
29 if (port->got_options)
31 if (tcgetattr(port->file.descriptor, &port->options.termios) != 0)
33 log_error(
"Unable to get the attributes of the terminal: %s", strerror(errno));
36 port->got_options =
true;
Simplistic logging utilities.
#define log_error(...)
Report a condition causing the current operation to abort.
Configure and read from serial ports as buffered input streams.
Dynamic string implementation.