nRF5 SDK for Mesh v5.0.0
Typedefs | Functions
Serial UART bearer

Typedefs

typedef void(* serial_uart_rx_cb_t) (uint8_t byte)
 Serial UART RX callback type. More...
 
typedef void(* serial_uart_tx_cb_t) (void)
 Serial UART TX callback type. More...
 

Functions

uint32_t serial_uart_init (serial_uart_rx_cb_t rx_cb, serial_uart_tx_cb_t tx_cb)
 Initializes the serial interface. More...
 
void serial_uart_process (void)
 Sends and receives any pending data on the UART line if possible.
 
void serial_uart_receive_set (bool enable_rx)
 Enable/disable reception of data from the peer device. More...
 
static void serial_uart_tx_start (void)
 Starts a transfer. More...
 
static void serial_uart_tx_stop (void)
 Stops a transfer. More...
 
static void serial_uart_byte_send (uint8_t value)
 Sets the next byte to send. More...
 

Detailed Description

Typedef Documentation

◆ serial_uart_rx_cb_t

typedef void(* serial_uart_rx_cb_t) (uint8_t byte)

Serial UART RX callback type.

Called upon reception of a byte on the UART interface.

Parameters
[in]byteThe received byte on the UART interface.

Definition at line 56 of file serial_uart.h.

◆ serial_uart_tx_cb_t

typedef void(* serial_uart_tx_cb_t) (void)

Serial UART TX callback type.

Called after each successful transfer.

Definition at line 62 of file serial_uart.h.

Function Documentation

◆ serial_uart_init()

uint32_t serial_uart_init ( serial_uart_rx_cb_t  rx_cb,
serial_uart_tx_cb_t  tx_cb 
)

Initializes the serial interface.

Parameters
[in]rx_cbThe receive callback.
[in]tx_cbThe transmit callback.
Return values
NRF_SUCCESSThe UART is successfully initialized.
NRF_ERROR_NULLNone of the parameters can be an invalid pointer.

◆ serial_uart_receive_set()

void serial_uart_receive_set ( bool  enable_rx)

Enable/disable reception of data from the peer device.

Parameters
[in]enable_rxSet to true in order to enable the reception of data form peer.

◆ serial_uart_tx_start()

static void serial_uart_tx_start ( void  )
inlinestatic

Starts a transfer.

Definition at line 88 of file serial_uart.h.

◆ serial_uart_tx_stop()

static void serial_uart_tx_stop ( void  )
inlinestatic

Stops a transfer.

Definition at line 95 of file serial_uart.h.

◆ serial_uart_byte_send()

static void serial_uart_byte_send ( uint8_t  value)
inlinestatic

Sets the next byte to send.

Definition at line 101 of file serial_uart.h.


Documentation feedback | Developer Zone | Subscribe | Updated