Embassy
nrf-softdevice-s112

Crates

git

Versions

default

Flavors

pub unsafe fn sd_ble_gatts_rw_authorize_reply(
conn_handle: u16,
p_rw_authorize_reply_params: *const ble_gatts_rw_authorize_reply_params_t
) -> u32
Expand description

@brief Respond to a Read/Write authorization request.

@note This call should only be used as a response to a @ref BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST event issued to the application.

@mscs @mmsc{@ref BLE_GATTS_QUEUED_WRITE_NOBUF_AUTH_MSC} @mmsc{@ref BLE_GATTS_QUEUED_WRITE_BUF_AUTH_MSC} @mmsc{@ref BLE_GATTS_QUEUED_WRITE_NOBUF_NOAUTH_MSC} @mmsc{@ref BLE_GATTS_READ_REQ_AUTH_MSC} @mmsc{@ref BLE_GATTS_WRITE_REQ_AUTH_MSC} @mmsc{@ref BLE_GATTS_QUEUED_WRITE_QUEUE_FULL_MSC} @mmsc{@ref BLE_GATTS_QUEUED_WRITE_PEER_CANCEL_MSC} @endmscs

@param[in] conn_handle Connection handle. @param[in] p_rw_authorize_reply_params Pointer to a structure with the attribute provided by the application.

@note @ref ble_gatts_authorize_params_t::p_data is ignored when this function is used to respond to a @ref BLE_GATTS_AUTHORIZE_TYPE_READ event if @ref ble_gatts_authorize_params_t::update is set to 0.

@retval ::NRF_SUCCESS Successfully queued a response to the peer, and in the case of a write operation, Attribute Table updated. @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. @retval ::NRF_ERROR_BUSY The stack is busy, process pending events and retry. @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State or no authorization request pending. @retval ::NRF_ERROR_INVALID_PARAM Authorization op invalid, handle supplied does not match requested handle, or invalid data to be written provided by the application. @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without reestablishing the connection.