mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-07 20:00:53 +00:00
Merge branch 'feature/rainmaker_BT_configurable' into 'master'
Doc: Made bluetooth configurable after wifi provisioning is completed See merge request espressif/esp-idf!18014
This commit is contained in:
@@ -38,4 +38,13 @@ menu "Wi-Fi Provisioning Manager"
|
||||
help
|
||||
Used to enforce link encryption when attempting to read / write characteristic
|
||||
|
||||
config WIFI_PROV_KEEP_BLE_ON_AFTER_PROV
|
||||
bool "Keep BT on after provisioning is done"
|
||||
depends on BT_ENABLED
|
||||
|
||||
config WIFI_PROV_DISCONNECT_AFTER_PROV
|
||||
bool "Terminate connection after provisioning is done"
|
||||
depends on WIFI_PROV_KEEP_BLE_ON_AFTER_PROV
|
||||
default y
|
||||
|
||||
endmenu
|
||||
|
@@ -207,6 +207,7 @@ void wifi_prov_scheme_ble_event_cb_free_btdm(void *user_data, wifi_prov_cb_event
|
||||
break;
|
||||
|
||||
case WIFI_PROV_DEINIT:
|
||||
#ifndef CONFIG_WIFI_PROV_KEEP_BLE_ON_AFTER_PROV
|
||||
/* Release memory used by BLE and Bluedroid host stack */
|
||||
err = esp_bt_mem_release(ESP_BT_MODE_BTDM);
|
||||
if (err != ESP_OK) {
|
||||
@@ -214,6 +215,7 @@ void wifi_prov_scheme_ble_event_cb_free_btdm(void *user_data, wifi_prov_cb_event
|
||||
} else {
|
||||
ESP_LOGI(TAG, "BTDM memory released");
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -247,6 +249,7 @@ void wifi_prov_scheme_ble_event_cb_free_ble(void *user_data, wifi_prov_cb_event_
|
||||
esp_err_t err;
|
||||
switch (event) {
|
||||
case WIFI_PROV_DEINIT:
|
||||
#ifndef CONFIG_WIFI_PROV_KEEP_BLE_ON_AFTER_PROV
|
||||
/* Release memory used by BLE stack */
|
||||
err = esp_bt_mem_release(ESP_BT_MODE_BLE);
|
||||
if (err != ESP_OK) {
|
||||
@@ -254,6 +257,7 @@ void wifi_prov_scheme_ble_event_cb_free_ble(void *user_data, wifi_prov_cb_event_
|
||||
} else {
|
||||
ESP_LOGI(TAG, "BLE memory released");
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
|
||||
default:
|
||||
|
Reference in New Issue
Block a user