51 int rc_uart_init(
int bus,
int baudrate,
float timeout,
int canonical_en,
int stop_bits,
int parity_en);
int rc_uart_read_line(int bus, uint8_t *buf, size_t max_bytes)
reads a line of characters ending in newline ' '
int rc_uart_read_bytes(int bus, uint8_t *buf, size_t bytes)
reads bytes from the UART bus
int rc_uart_write(int bus, uint8_t *data, size_t bytes)
Sends data out the uart port.
int rc_uart_get_fd(int bus)
Fetches the file descriptor to a uart bus after the bus has been initialized.
int rc_uart_init(int bus, int baudrate, float timeout, int canonical_en, int stop_bits, int parity_en)
Initializes a UART bus /dev/ttyO{bus} at specified baudrate and timeout.
int rc_uart_flush(int bus)
flushes (discards) any data received but not read, or data written but not sent.
int rc_uart_close(int bus)
closes a UART bus
int rc_uart_bytes_available(int bus)
Fetches the number of bytes ready to be read from a bus.