Implementation of uart serialize interface.
Copyright (c) 2020 Microchip Technology Inc. and its subsidiaries.
Macros | |
#define | USART_DOUBLE_SPEED 1ul |
Sets USART U2Xn bit value. More... | |
Typedefs | |
typedef SercomUsart * | UsartChannel_t |
Functions | |
bool | getByteUsart (uint8_t *p) |
Receive byte on uart. More... | |
static void | hwInit (void) |
Startup initialization of the usart. More... | |
void | hwInitUsart0 (void) |
Startup initialization of the usart0. More... | |
static void | hwUnInit (void) |
Clear startup initialization parameters to start user application. More... | |
void | hwUnInitUsart0 (void) |
Clear startup initialization parameters to start user application. More... | |
void | setByteUsart (uint16_t length, uint8_t *data) |
Transmit byte to uart. More... | |
void | usart_disable0 (void) |
Variables | |
struct usart_module | host_uart_module |
UsartChannel_t | usartTty |
#define USART_DOUBLE_SPEED 1ul |
Sets USART U2Xn bit value.
typedef SercomUsart* UsartChannel_t |
bool getByteUsart | ( | uint8_t * | p | ) |
Receive byte on uart.
[out] | p | - pointer to byte memory; |
References host_uart_module, STATUS_OK, and usart_read_wait().
|
inlinestatic |
Startup initialization of the usart.
Referenced by hwInitUsart0().
void hwInitUsart0 | ( | void | ) |
Startup initialization of the usart0.
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, hwInit(), usart_config::mux_setting, usart_config::pinmux_pad0, usart_config::pinmux_pad1, usart_config::pinmux_pad2, usart_config::pinmux_pad3, STATUS_OK, usart_enable(), usart_enable_transceiver(), usart_get_config_defaults(), USART_HOST, USART_HOST_BAUDRATE, usart_init(), USART_TRANSCEIVER_RX, and USART_TRANSCEIVER_TX.
|
inlinestatic |
Clear startup initialization parameters to start user application.
Referenced by hwUnInitUsart0().
void hwUnInitUsart0 | ( | void | ) |
Clear startup initialization parameters to start user application.
References host_uart_module, hwUnInit(), usart_disable_transceiver(), usart_reset(), USART_TRANSCEIVER_RX, and USART_TRANSCEIVER_TX.
Referenced by usart_disable0().
void setByteUsart | ( | uint16_t | length, |
uint8_t * | data | ||
) |
Transmit byte to uart.
[in] | len | - number of bytes to transmit; |
[in] | p | - pointer to byte memory; |
References host_uart_module, STATUS_OK, and usart_write_wait().
void usart_disable0 | ( | void | ) |
References _sercom_get_default_pad(), HOST_SERCOM_PINMUX_PAD0, HOST_SERCOM_PINMUX_PAD1, HOST_SERCOM_PINMUX_PAD2, HOST_SERCOM_PINMUX_PAD3, hwUnInitUsart0(), system_pinmux_config::mux_position, PINMUX_DEFAULT, PINMUX_UNUSED, system_pinmux_get_config_defaults(), system_pinmux_pin_set_config(), and USART_HOST.
Referenced by lowLevelUnInit().
struct usart_module host_uart_module |
Referenced by getByteUsart(), hwInitUsart0(), hwUnInitUsart0(), and setByteUsart().
UsartChannel_t usartTty |