Embassy
nrf-softdevice-s132

Crates

git

Versions

default

Flavors

pub unsafe fn sd_ble_cfg_set(
cfg_id: u32,
p_cfg: *const ble_cfg_t,
app_ram_base: u32
) -> u32
Expand description

@brief Add configurations for the BLE stack

@param[in] cfg_id Config ID, see @ref BLE_CONN_CFGS, @ref BLE_COMMON_CFGS, @ref BLE_GAP_CFGS or @ref BLE_GATTS_CFGS. @param[in] p_cfg Pointer to a ble_cfg_t structure containing the configuration value. @param[in] app_ram_base The start address of the application RAM region (APP_RAM_BASE). See @ref sd_ble_enable for details about APP_RAM_BASE.

@note The memory requirement for a specific configuration will not increase between SoftDevices with the same major version number.

@note If a configuration is set more than once, the last one set is the one that takes effect on @ref sd_ble_enable.

@note Any part of the BLE stack that is NOT configured with @ref sd_ble_cfg_set will have default configuration.

@note @ref sd_ble_cfg_set may be called at any time when the SoftDevice is enabled (see @ref sd_softdevice_enable) while the BLE part of the SoftDevice is not enabled (see @ref sd_ble_enable).

@note Error codes for the configurations are described in the configuration structs.

@mscs @mmsc{@ref BLE_COMMON_ENABLE} @endmscs

@retval ::NRF_SUCCESS The configuration has been added successfully. @retval ::NRF_ERROR_INVALID_STATE The BLE stack had already been initialized. @retval ::NRF_ERROR_INVALID_ADDR Invalid or not sufficiently aligned pointer supplied. @retval ::NRF_ERROR_INVALID_PARAM Invalid cfg_id supplied. @retval ::NRF_ERROR_NO_MEM The amount of memory assigned to the SoftDevice by app_ram_base is not large enough to fit this configuration’s memory requirement.