pub unsafe extern "C" fn esp_bt_controller_mem_release(
mode: u32,
) -> i32Expand description
@brief Release the Controller memory as per the mode
This function releases the BSS, data and other sections of the Controller to heap. The total size is about 70 KB.
@note
- This function is optional and should be called only if you want to free up memory for other components.
- This function should only be called when the Controller is in
ESP_BT_CONTROLLER_STATUS_IDLEstatus. - Once Bluetooth Controller memory is released, the process cannot be reversed. This means you cannot use the Bluetooth Controller mode that you have released using this function.
- If your firmware will upgrade the Bluetooth Controller mode later (such as from disabled to enabled), then do not call this function.
If you never intend to use Bluetooth in a current boot-up cycle, calling esp_bt_controller_mem_release(ESP_BT_MODE_BLE) could release the BSS and data consumed by BLE Controller to heap.
@param[in] mode The Bluetooth Controller mode
@return - ESP_OK: Success - ESP_ERR_INVALID_STATE: Invalid Bluetooth Controller state - ESP_ERR_NOT_FOUND: Requested resource not found