|
Appiko
|
Hardware abstraction layer of the UART peripheral. This is compatible with both nrf51 and nRF52 SoCs. More...
Macros | |
| #define | UART_USED HAL_UART_PERIPH_USED |
| #define | LINE_END '\n' |
Enumerations | |
| enum | hal_uart_baud_t { HAL_UART_BAUD_1200 = (0x0004F000UL), HAL_UART_BAUD_2400 = (0x0009D000UL), HAL_UART_BAUD_4800 = (0x0013B000UL), HAL_UART_BAUD_9600 = (0x00275000UL), HAL_UART_BAUD_14400 = (0x003AF000UL), HAL_UART_BAUD_19200 = (0x004EA000UL), HAL_UART_BAUD_28800 = (0x0075C000UL), HAL_UART_BAUD_38400 = (0x009D0000UL), HAL_UART_BAUD_57600 = (0x00EB0000UL), HAL_UART_BAUD_76800 = (0x013A9000UL), HAL_UART_BAUD_115200 = (0x01D60000UL), HAL_UART_BAUD_230400 = (0x03B00000UL), HAL_UART_BAUD_250000 = (0x04000000UL), HAL_UART_BAUD_460800 = (0x07400000UL), HAL_UART_BAUD_921600 = (0x0F000000UL), HAL_UART_BAUD_1M = (0x10000000UL) } |
Functions | |
| void | hal_uart_init (hal_uart_baud_t baud, void(*handler)(uint8_t *ptr)) |
| void | hal_uart_putchar (uint8_t cr) |
| Send a single character through UART This function is used by printf_callback so that printf can be used. More... | |
| #define LINE_END '\n' |
The character that is checked by rx_collect to determine if a line of characters is received
Definition at line 47 of file hal_uart.h.
| #define UART_USED HAL_UART_PERIPH_USED |
Specify which TWIM peripheral is used for this HAL module
Definition at line 44 of file hal_uart.h.
| enum hal_uart_baud_t |
Defines to specify the baudrate options for the uart data transfer
Definition at line 52 of file hal_uart.h.
| void hal_uart_init | ( | hal_uart_baud_t | baud, |
| void(*)(uint8_t *ptr) | handler | ||
| ) |
Function to initialize the parameters of UART based on the configurations in boards.h
| baud | The baud rate of operation for the UART module |
| handler | The handler which is called with a pointer to the data received on UART reception. If NULL, the UART reception is disabled |
(UARTE_CONFIG_HWFC_Disabled << UARTE_CONFIG_HWFC_Pos) | (UARTE_CONFIG_PARITY_Excluded << UARTE_CONFIG_PARITY_Pos)
Definition at line 145 of file hal_uart.c.
Referenced by main().
| void hal_uart_putchar | ( | uint8_t | cr | ) |
| cr | The character to be sent |
Definition at line 115 of file hal_uart.c.
1.8.15