Module for reliable communication over UARTE. More...
Modules |
|
| libUARTE library configuration | |
Data Structures |
|
| struct | nrf_libuarte_data_t |
| struct | nrf_libuarte_evt_t |
| struct | nrf_libuarte_config_t |
Typedefs |
|
| typedef void(* | nrf_libuarte_evt_handler_t )( nrf_libuarte_evt_t *p_evt) |
Enumerations |
|
| enum |
nrf_libuarte_evt_type_t
{
NRF_LIBUARTE_EVT_RX_DATA , NRF_LIBUARTE_EVT_RX_BUF_REQ , NRF_LIBUARTE_EVT_TX_DONE , NRF_LIBUARTE_EVT_ERROR } |
Functions |
|
| ret_code_t | nrf_libuarte_init ( nrf_libuarte_config_t *p_config, nrf_libuarte_evt_handler_t evt_handler) |
|
Function for initializing the libUARTE library.
More...
|
|
| void | nrf_libuarte_uninit (void) |
|
Function for uninitializing the libUARTE library.
|
|
| ret_code_t | nrf_libuarte_tx (uint8_t *p_data, size_t len) |
|
Function for sending data over UARTE using EasyDMA.
More...
|
|
| ret_code_t | nrf_libuarte_rx_start (uint8_t *p_data, size_t len, bool ext_trigger_en) |
|
Function for starting receiving data with additional configuration of external trigger to start receiving.
More...
|
|
| void | nrf_libuarte_rx_buf_rsp (uint8_t *p_data, size_t len) |
|
Function for setting a buffer for data that will be later received in UARTE.
More...
|
|
| void | nrf_libuarte_rx_stop (void) |
|
Function for stopping receiving data over UARTE.
|
|
Detailed Description
Module for reliable communication over UARTE.
Enumeration Type Documentation
Function Documentation
| ret_code_t nrf_libuarte_init | ( | nrf_libuarte_config_t * | p_config , |
| nrf_libuarte_evt_handler_t | evt_handler | ||
| ) |
Function for initializing the libUARTE library.
- Parameters
-
[in] p_config Pointer to the structure with initial configuration. [in] evt_handler Event handler provided by the user. Must not be NULL.
- Returns
- NRF_SUCCESS when properly initialized. NRF_ERROR_INTERNAL otherwise.
| void nrf_libuarte_rx_buf_rsp | ( | uint8_t * | p_data , |
| size_t | len | ||
| ) |
Function for setting a buffer for data that will be later received in UARTE.
- Parameters
-
p_data Pointer to data. len Number of bytes to receive. Maximum possible length is dependent on the used SoC (see the MAXCNT register description in the Product Specification). The library checks it with an assertion.
| ret_code_t nrf_libuarte_rx_start | ( | uint8_t * | p_data , |
| size_t | len , | ||
| bool | ext_trigger_en | ||
| ) |
Function for starting receiving data with additional configuration of external trigger to start receiving.
- Parameters
-
p_data Pointer to data. len Number of bytes to receive. Maximum possible length is dependent on the used SoC (see the MAXCNT register description in the Product Specification). The library checks it with an assertion. ext_trigger_en True to disable immediate start.
- Return values
-
NRF_ERROR_INTERNAL Error during PPI channel configuration. NRF_SUCCESS Buffer set for receiving.
| ret_code_t nrf_libuarte_tx | ( | uint8_t * | p_data , |
| size_t | len | ||
| ) |
Function for sending data over UARTE using EasyDMA.
- Parameters
-
[in] p_data Pointer to data. [in] len Number of bytes to send.
- Return values
-
NRF_ERROR_BUSY Data is transferring. NRF_ERROR_INTERNAL Error during PPI channel configuration. NRF_SUCCESS Buffer set for sending.