Contiki-NG
|
Files | |
file | cc26xx-uart.c |
Implementation of the CC13xx/CC26xx UART driver. | |
file | cc26xx-uart.h |
Header file for the CC13xx/CC26xx UART driver. | |
UART functions | |
void | cc26xx_uart_init () |
Initialises the UART controller, configures I/O control and interrupts. | |
void | cc26xx_uart_write_byte (uint8_t b) |
Sends a single character down the UART. | |
void | cc26xx_uart_set_input (int(*input)(unsigned char c)) |
Assigns a callback to be called when the UART receives a byte. | |
uint8_t | cc26xx_uart_busy (void) |
Returns the UART busy status. | |
Driver for the CC13xx/CC26xx UART controller
uint8_t cc26xx_uart_busy | ( | void | ) |
Returns the UART busy status.
ti_lib_uart_busy() will access UART registers. It is our responsibility to first make sure the UART is accessible before calling it. Hence this wrapper.
Return values are defined in CC26xxware's uart.h
Definition at line 344 of file cc26xx-uart.c.
Referenced by dbg_send_bytes().
void cc26xx_uart_set_input | ( | int(*)(unsigned char c) | input | ) |
Assigns a callback to be called when the UART receives a byte.
input | A pointer to the function |
If input is NULL, the UART driver will assume that RX functionality is not required and it will be disabled. It will also disable the module's clocks under sleep and deep sleep and allow the SERIAL PD to be powered off.
If input is not NULL, the UART driver will assume that RX is in fact required and it will be enabled. The module's clocks will be enabled under sleep and deep sleep and the driver will not allow the SERIAL PD to turn off during deep sleep, so that the UART can still receive bytes.
Definition at line 310 of file cc26xx-uart.c.
Referenced by platform_init_stage_two().
void cc26xx_uart_write_byte | ( | uint8_t | b | ) |
Sends a single character down the UART.
b | The character to transmit |
Definition at line 295 of file cc26xx-uart.c.
Referenced by dbg_putchar(), and dbg_send_bytes().