Contiki-NG
Files | Functions

This particular driver utilizes the UART0 peripheral specifically. More...

Files

file  uart0-arch.c
 Implementation of UART driver for CC13xx/CC26xx.
 
file  uart0-arch.h
 Header file of UART driver for CC13xx/CC26xx.
 

Functions

void uart0_init (void)
 Initializes the UART driver.
 
int_fast32_t uart0_write (const void *buf, size_t buf_size)
 Writes data from a memory buffer to the UART interface. More...
 
int_fast32_t uart0_write_byte (uint8_t byte)
 Writes a single byte to the UART interface. More...
 
int_fast32_t uart0_set_callback (uart0_input_fxn_t input_cb)
 Set the callback function for when bytes are received on UART0. More...
 

Detailed Description

This particular driver utilizes the UART0 peripheral specifically.

Driver for the CC13xx/CC26xx UART controller.

Function Documentation

◆ uart0_set_callback()

int_fast32_t uart0_set_callback ( uart0_input_fxn_t  input_cb)

Set the callback function for when bytes are received on UART0.

Parameters
input_cbPointer to the callback function. A valid pointer subscribes for UART0 callbacks when bytes are received, while a NULL pointer unsubscribes.
Returns
0 for success, negative value for errors.

Definition at line 124 of file uart0-arch.c.

Referenced by slip_arch_init().

◆ uart0_write()

int_fast32_t uart0_write ( const void *  buf,
size_t  buf_size 
)

Writes data from a memory buffer to the UART interface.

Parameters
bufA pointer to the data buffer.
buf_sizeSize of the data buffer.
Returns
Number of bytes that has been written to the UART. If an error occurs, a negative value is returned.

Definition at line 106 of file uart0-arch.c.

◆ uart0_write_byte()

int_fast32_t uart0_write_byte ( uint8_t  byte)

Writes a single byte to the UART interface.

Parameters
byteByte to write.
Returns
Number of bytes that has been written to the UART. If an error occurs, a negative value is returned.

Definition at line 115 of file uart0-arch.c.