Module for reliable communication over UARTE.
More...
Module for reliable communication over UARTE.
Enumerator |
---|
NRF_LIBUARTE_EVT_RX_DATA |
Data received.
|
NRF_LIBUARTE_EVT_RX_BUF_REQ |
Requesting new buffer for receiving data.
|
NRF_LIBUARTE_EVT_TX_DONE |
Requested TX transfer completed.
|
NRF_LIBUARTE_EVT_ERROR |
Error reported by the UARTE peripheral.
|
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. |