Function nrf_softdevice_s113::sd_ble_gatts_value_set
source · pub unsafe fn sd_ble_gatts_value_set(
conn_handle: u16,
handle: u16,
p_value: *mut ble_gatts_value_t
) -> u32
Expand description
@brief Set the value of a given attribute.
@note Values other than system attributes can be set at any time, regardless of whether any active connections exist.
@mscs @mmsc{@ref BLE_GATTS_QUEUED_WRITE_QUEUE_FULL_MSC} @mmsc{@ref BLE_GATTS_QUEUED_WRITE_NOBUF_NOAUTH_MSC} @endmscs
@param[in] conn_handle Connection handle. Ignored if the value does not belong to a system attribute. @param[in] handle Attribute handle. @param[in,out] p_value Attribute value information.
@retval ::NRF_SUCCESS Successfully set the value of the attribute. @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. @retval ::NRF_ERROR_NOT_FOUND Attribute not found. @retval ::NRF_ERROR_FORBIDDEN Forbidden handle supplied, certain attributes are not modifiable by the application. @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied, attribute lengths are restricted by @ref BLE_GATTS_ATTR_LENS_MAX. @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied on a system attribute.