Contiki-NG
Files

Driver for the CC13xx/CC26xx UART controller. More...

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. More...
 
void cc26xx_uart_set_input (int(*input)(unsigned char c))
 Assigns a callback to be called when the UART receives a byte. More...
 
uint8_t cc26xx_uart_busy (void)
 Returns the UART busy status. More...
 

Detailed Description

Driver for the CC13xx/CC26xx UART controller.

Function Documentation

◆ cc26xx_uart_busy()

uint8_t cc26xx_uart_busy ( void  )

Returns the UART busy status.

Returns
UART_IDLE or UART_BUSY

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 347 of file cc26xx-uart.c.

◆ cc26xx_uart_set_input()

void cc26xx_uart_set_input ( int(*)(unsigned char c)  input)

Assigns a callback to be called when the UART receives a byte.

Parameters
inputA 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.

Note
This has a significant impact on overall energy consumption, so you should only enabled UART RX input when it's actually required.

Definition at line 313 of file cc26xx-uart.c.

◆ cc26xx_uart_write_byte()

void cc26xx_uart_write_byte ( uint8_t  b)

Sends a single character down the UART.

Parameters
bThe character to transmit

Definition at line 298 of file cc26xx-uart.c.