76#define Serial __attribute__((cleanup(serial_close))) serial_port_t
bool serial_make_raw(serial_port_t *port, int64_t speed_bps)
General configuration for non-canonical mode.
speed_t serial_encode_baudrate(int64_t speed_in_bps)
Convert the baudrate to a system specific enum.
bool serial_set_options_speed(serial_port_t *port, int64_t speed_bps)
Modify the copy of the options about speed, but do not apply them.
int64_t serial_decode_baudrate(speed_t flag)
Convert the baudrate from termios to bits per second.
serial_port_t serial_open_readwrite(const char *port_name)
Open the port in read and write, and allocate the buffer.
serial_port_t serial_open_readonly(const char *port_name)
Open the port in read-only, and allocate the buffer.
void serial_free(serial_port_t **port)
Close and free a serial port created with serial_new_readwrite.
bool serial_set_options_raw(serial_port_t *port)
Modify the copy of the options, but do not apply them.
void serial_close(serial_port_t *port)
Closes the specified serial port.
bool serial_apply_options(serial_port_t *port)
Apply the options immediatly.
serial_port_t * serial_new_readwrite(const char *port_name)
Allocates a serial port and opens it.
bool serial_get_options(serial_port_t *port)
Ask the port for its configuration.
Verbose alternative to the termios structure.
Serial port handler, includes a buffer.
serial_options_t options
Terminal options.
bool got_options
Is options filled ?
ifstream_t file
Input file buffered stream.