Serial
Functions
Section titled “Functions”serial_open
Section titled “serial_open”TODO: Error management…
int serial_open(serial_config_t const *config)serial_is_open
Section titled “serial_is_open”bool serial_is_open(void)serial_write_async
Section titled “serial_write_async”void serial_write_async(void const *data, size_t size, gint_call_t callback)serial_write_sync
Section titled “serial_write_sync”void serial_write_sync(void const *data, size_t size)serial_read_async
Section titled “serial_read_async”void serial_read_async(void const *data, size_t size, gint_call_t callback)serial_read_sync
Section titled “serial_read_sync”void serial_read_sync(void const *data, size_t size)serial_wait
Section titled “serial_wait”Waits for communications to finish
void serial_wait(void)serial_close
Section titled “serial_close”Calls serial_wait() automatically
void serial_close(void)TODO: This is a template for a future implementation.
typedef enum{ SERIAL_PARITY_NONE, SERIAL_PARITY_EVEN, SERIAL_PARITY_ODD,}GPACKEDENUM serial_parity_ttypedef struct{ /* Baud rate (valid options are 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600 and 115200) */ int baudrate; /* Parity */ serial_parity_t parity; /* Data width (valid options are 7 and 8) */ uint8_t data_width; /* Stop bits (valid options are 1 and 2) */ uint8_t stop_bits;}serial_config_t