nRF Connect SDK Bare Metal API 2.0.99
Loading...
Searching...
No Matches

◆ ble_qwr_value_get()

uint32_t ble_qwr_value_get ( struct ble_qwr * qwr,
uint16_t attr_handle,
uint8_t * mem,
uint16_t * len )

#include <ble_qwr.h>

Function for retrieving the received data for a given attribute.

Call this function after receiving an BLE_QWR_EVT_AUTH_REQUEST event to retrieve a linear copy of the data that was received for the given attribute.

Parameters
[in]qwrQueued Writes structure.
[in]attr_handleHandle of the attribute.
[out]memPointer to the application buffer where the received data will be copied.
[in,out]lenInput: length of the input buffer. Output: length of the received data.
Return values
NRF_SUCCESSIf the data was retrieved and stored successfully.
NRF_ERROR_NO_MEMIf the provided buffer was smaller than the received data.
NRF_ERROR_NULLIf qwr, mem or len is NULL.
NRF_ERROR_INVALID_STATEIf the given qwr instance has not been initialized.