Functions

uint16_t app_uart_init (app_uart_params_t *p_params, app_uart_evt_handler_t evt_handler, app_uart_tx_buf_t *tx_buffer)
 Initialize the APP UART DRIVER according to the specified parameters in the app_uart_params_t and app_uart_evt_handler_t. More...
 
uint16_t app_uart_deinit (app_uart_id_t id)
 De-initialize the APP UART DRIVER peripheral. More...
 
uint16_t app_uart_transmit_async (app_uart_id_t id, uint8_t *p_data, uint16_t size)
 Send an amount of data in interrupt mode. More...
 
uint16_t app_uart_transmit_sync (app_uart_id_t id, uint8_t *p_data, uint16_t size, uint32_t timeout)
 Send an amount of data in blocking mode. More...
 
uint16_t app_uart_receive_async (app_uart_id_t id, uint8_t *p_data, uint16_t size)
 Receive an amount of data in interrupt mode. More...
 
uint16_t app_uart_receive_sync (app_uart_id_t id, uint8_t *p_data, uint16_t size, uint32_t timeout)
 Receive an amount of data in blocking mode. More...
 
uart_handle_tapp_uart_get_handle (app_uart_id_t id)
 Return the UART handle. More...
 
void app_uart_flush (app_uart_id_t id)
 Flush all log entries from the buffer. More...
 

Detailed Description

Function Documentation

◆ app_uart_deinit()

uint16_t app_uart_deinit ( app_uart_id_t  id)

De-initialize the APP UART DRIVER peripheral.

Parameters
[in]idDe-initialize for a specific ID.
Returns
Result of De-initialization.

◆ app_uart_flush()

void app_uart_flush ( app_uart_id_t  id)

Flush all log entries from the buffer.

Parameters
[in]idUART Channel ID.

◆ app_uart_get_handle()

uart_handle_t* app_uart_get_handle ( app_uart_id_t  id)

Return the UART handle.

Parameters
[in]idUART Channel ID.
Returns
Pointer to the specified ID's UART handle.

◆ app_uart_init()

uint16_t app_uart_init ( app_uart_params_t p_params,
app_uart_evt_handler_t  evt_handler,
app_uart_tx_buf_t tx_buffer 
)

Initialize the APP UART DRIVER according to the specified parameters in the app_uart_params_t and app_uart_evt_handler_t.

Parameters
[in]p_paramsPointer to app_uart_params_t parameter which contains the configuration information for the specified UART module.
[in]evt_handlerUART user callback function.
[in]tx_bufferPointer to tx send buffer.
Returns
Result of initialization.

◆ app_uart_receive_async()

uint16_t app_uart_receive_async ( app_uart_id_t  id,
uint8_t *  p_data,
uint16_t  size 
)

Receive an amount of data in interrupt mode.

Parameters
[in]idwhich UART module want to transmit.
[in]p_dataPointer to data buffer
[in]sizeAmount of data to be sent
Returns
Result of operation.

◆ app_uart_receive_sync()

uint16_t app_uart_receive_sync ( app_uart_id_t  id,
uint8_t *  p_data,
uint16_t  size,
uint32_t  timeout 
)

Receive an amount of data in blocking mode.

Parameters
[in]idwhich UART module want to transmit.
[in]p_dataPointer to data buffer
[in]sizeAmount of data to be sent
[in]timeoutTimeout duration
Returns
Result of operation.

◆ app_uart_transmit_async()

uint16_t app_uart_transmit_async ( app_uart_id_t  id,
uint8_t *  p_data,
uint16_t  size 
)

Send an amount of data in interrupt mode.

Parameters
[in]idwhich UART module want to receive.
[in]p_dataPointer to data buffer
[in]sizeAmount of data to be sent
Returns
Result of operation.

◆ app_uart_transmit_sync()

uint16_t app_uart_transmit_sync ( app_uart_id_t  id,
uint8_t *  p_data,
uint16_t  size,
uint32_t  timeout 
)

Send an amount of data in blocking mode.

Parameters
[in]idwhich UART module want to receive.
[in]p_dataPointer to data buffer
[in]sizeAmount of data to be sent
[in]timeoutTimeout duration
Returns
Result of operation.