Function nrf_softdevice_s132::sd_ble_gatts_descriptor_add
source · pub unsafe fn sd_ble_gatts_descriptor_add(
char_handle: u16,
p_attr: *const ble_gatts_attr_t,
p_handle: *mut u16
) -> u32
Expand description
@brief 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).
@mscs @mmsc{@ref BLE_GATTS_ATT_TABLE_POP_MSC} @endmscs
@param[in] char_handle Handle of the characteristic where the descriptor is to be placed, if @ref BLE_GATT_HANDLE_INVALID is used, it will be placed sequentially. @param[in] p_attr Pointer to the attribute structure. @param[out] p_handle Pointer to a 16-bit word where the assigned handle will be stored.
@retval ::NRF_SUCCESS Successfully added a descriptor. @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied, characteristic handle, Vendor Specific UUIDs, lengths, and permissions need to adhere to the constraints. @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation, a characteristic context is required. @retval ::NRF_ERROR_FORBIDDEN Forbidden value supplied, certain UUIDs are reserved for the stack. @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation. @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied, attribute lengths are restricted by @ref BLE_GATTS_ATTR_LENS_MAX.