Function nrf_softdevice_s140::sd_ble_enable
source · pub unsafe fn sd_ble_enable(p_app_ram_base: *mut u32) -> u32
Expand description
@brief Enable the BLE stack
@param[in, out] p_app_ram_base Pointer to a variable containing the start address of the application RAM region (APP_RAM_BASE). On return, this will contain the minimum start address of the application RAM region required by the SoftDevice for this configuration.
@note The memory requirement for a specific configuration will not increase between SoftDevices with the same major version number.
@note At runtime the IC’s RAM is split into 2 regions: The SoftDevice RAM region is located between 0x20000000 and APP_RAM_BASE-1 and the application’s RAM region is located between APP_RAM_BASE and the start of the call stack.
@details This call initializes the BLE stack, no BLE related function other than @ref sd_ble_cfg_set can be called before this one.
@mscs @mmsc{@ref BLE_COMMON_ENABLE} @endmscs
@retval ::NRF_SUCCESS The BLE stack has been initialized successfully. @retval ::NRF_ERROR_INVALID_STATE The BLE stack had already been initialized and cannot be reinitialized. @retval ::NRF_ERROR_INVALID_ADDR Invalid or not sufficiently aligned pointer supplied. @retval ::NRF_ERROR_NO_MEM One or more of the following is true: - The amount of memory assigned to the SoftDevice by *p_app_ram_base is not large enough to fit this configuration’s memory requirement. Check *p_app_ram_base and set the start address of the application RAM region accordingly. - Dynamic part of the SoftDevice RAM region is larger then 64 kB which is currently not supported. @retval ::NRF_ERROR_RESOURCES The total number of L2CAP Channels configured using @ref sd_ble_cfg_set is too large.