This module performs serial input/output functionalities via UART.
Functions | |
void | sio2host_deinit (void) |
DeInitializes the Serial IO Module. More... | |
void | sio2host_disable (void) |
Disables the Serial IO Module. More... | |
void | sio2host_enable (void) |
Enables the Serial IO Module. More... | |
uint8_t | sio2host_getchar (void) |
This function performs a blocking character receive functionality. More... | |
int | sio2host_getchar_nowait (void) |
This function performs a non-blocking character receive functionality. More... | |
void | sio2host_init (void) |
Initializes the Serial IO Module. More... | |
void | sio2host_putchar (uint8_t) |
This function prints the character to the host. More... | |
uint8_t | sio2host_rx (uint8_t *data, uint8_t max_length) |
Receives data from UART. More... | |
uint8_t | sio2host_tx (uint8_t *data, uint8_t length) |
Transmits data via UART. More... | |
void | USART_HOST_ISR_VECT (uint8_t instance) |
void sio2host_deinit | ( | void | ) |
DeInitializes the Serial IO Module.
References host_uart_module, usart_disable(), usart_disable_transceiver(), USART_TRANSCEIVER_RX, and USART_TRANSCEIVER_TX.
void sio2host_disable | ( | void | ) |
void sio2host_enable | ( | void | ) |
uint8_t sio2host_getchar | ( | void | ) |
This function performs a blocking character receive functionality.
References sio2host_rx().
int sio2host_getchar_nowait | ( | void | ) |
This function performs a non-blocking character receive functionality.
References sio2host_rx().
void sio2host_init | ( | void | ) |
Initializes the Serial IO Module.
References usart_config::baudrate, HOST_SERCOM_MUX_SETTING, HOST_SERCOM_PINMUX_PAD0, HOST_SERCOM_PINMUX_PAD1, HOST_SERCOM_PINMUX_PAD2, HOST_SERCOM_PINMUX_PAD3, host_uart_module, usart_config::mux_setting, usart_config::pinmux_pad0, usart_config::pinmux_pad1, usart_config::pinmux_pad2, usart_config::pinmux_pad3, usart_enable(), usart_enable_transceiver(), usart_get_config_defaults(), USART_HOST, USART_HOST_BAUDRATE, USART_HOST_RX_ISR_ENABLE, USART_TRANSCEIVER_RX, and USART_TRANSCEIVER_TX.
Referenced by wsndemo_init().
void sio2host_putchar | ( | uint8_t | ) |
This function prints the character to the host.
References sio2host_tx().
Referenced by appUartSendMessage().
uint8_t sio2host_rx | ( | uint8_t * | data, |
uint8_t | max_length | ||
) |
Receives data from UART.
data | pointer to the buffer where the received data is to be stored |
max_length | maximum length of data to be received |
References serial_rx_buf, serial_rx_buf_head, SERIAL_RX_BUF_SIZE_HOST, serial_rx_buf_tail, and serial_rx_count.
Referenced by APP_TaskHandler(), sio2host_getchar(), and sio2host_getchar_nowait().
uint8_t sio2host_tx | ( | uint8_t * | data, |
uint8_t | length | ||
) |
Transmits data via UART.
data | Pointer to the buffer where the data to be transmitted is present |
length | Number of bytes to be transmitted |
References host_uart_module, STATUS_OK, USART_HOST, and usart_serial_write_packet().
Referenced by sio2host_putchar().
void USART_HOST_ISR_VECT | ( | uint8_t | instance | ) |