Embassy
nrf-softdevice-s113

Crates

git

Versions

default

Flavors

pub unsafe fn sd_ble_gap_data_length_update(
conn_handle: u16,
p_dl_params: *const ble_gap_data_length_params_t,
p_dl_limitation: *mut ble_gap_data_length_limitation_t
) -> u32
Expand description

@brief Initiate or respond to a Data Length Update Procedure.

@note If the application uses @ref BLE_GAP_DATA_LENGTH_AUTO for one or more members of p_dl_params, the SoftDevice will choose the highest value supported in current configuration and connection parameters.

@param[in] conn_handle Connection handle. @param[in] p_dl_params Pointer to local parameters to be used in Data Length Update Procedure. Set any member to @ref BLE_GAP_DATA_LENGTH_AUTO to let the SoftDevice automatically decide the value for that member. Set to NULL to use automatic values for all members. @param[out] p_dl_limitation Pointer to limitation to be written when local device does not have enough resources or does not support the requested Data Length Update parameters. Ignored if NULL.

@mscs @mmsc{@ref BLE_GAP_DATA_LENGTH_UPDATE_PROCEDURE_MSC} @endmscs

@retval ::NRF_SUCCESS Successfully set Data Length Extension initiation/response parameters. @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied. @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle parameter supplied. @retval ::NRF_ERROR_INVALID_STATE No link has been established. @retval ::NRF_ERROR_INVALID_PARAM Invalid parameters supplied. @retval ::NRF_ERROR_NOT_SUPPORTED The requested parameters are not supported by the SoftDevice. Inspect p_dl_limitation to see which parameter is not supported. @retval ::NRF_ERROR_RESOURCES The connection event length configured for this link is not sufficient for the requested parameters. Use @ref sd_ble_cfg_set with @ref BLE_CONN_CFG_GAP to increase the connection event length. Inspect p_dl_limitation to see where the limitation is. @retval ::NRF_ERROR_BUSY Peer has already initiated a Data Length Update Procedure. Process the pending @ref BLE_GAP_EVT_DATA_LENGTH_UPDATE_REQUEST event to respond.