S115 SoftDevice for nRF54L15/nRF54L10/nRF54L05 API documentation 10.0.0
Loading...
Searching...
No Matches

◆ sd_ble_gatts_descriptor_add()

uint32_t sd_ble_gatts_descriptor_add ( uint16_t char_handle,
ble_gatts_attr_t const * p_attr,
uint16_t * p_handle )

#include <ble_gatts.h>

Add a descriptor to the Attribute Table.

Note
It is currently only possible to add a descriptor to the last added characteristic (i.e. only sequential population is supported at this time).
Relevant Message Sequence Charts
GATTS ATT Table Population
Parameters
[in]char_handleHandle of the characteristic where the descriptor is to be placed, if BLE_GATT_HANDLE_INVALID is used, it will be placed sequentially.
[in]p_attrPointer to the attribute structure.
[out]p_handlePointer to a 16-bit word where the assigned handle will be stored.
Return values
NRF_SUCCESSSuccessfully added a descriptor.
NRF_ERROR_INVALID_ADDRInvalid pointer supplied.
NRF_ERROR_INVALID_PARAMInvalid parameter(s) supplied, characteristic handle, Vendor Specific UUIDs, lengths, and permissions need to adhere to the constraints.
NRF_ERROR_INVALID_STATEInvalid state to perform operation, a characteristic context is required.
NRF_ERROR_FORBIDDENForbidden value supplied, certain UUIDs are reserved for the stack.
NRF_ERROR_NO_MEMNot enough memory to complete operation.
NRF_ERROR_DATA_SIZEInvalid data size(s) supplied, attribute lengths are restricted by Maximum attribute lengths.