File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -865,9 +865,11 @@ void NimBLEDevice::init(const std::string &deviceName) {
865
865
866
866
ESP_ERROR_CHECK (errRc);
867
867
868
+ #ifdef CONFIG_IDF_TARGET_ESP32
868
869
esp_bt_controller_mem_release (ESP_BT_MODE_CLASSIC_BT);
870
+ #endif
869
871
870
- # if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 0, 0)
872
+ # if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 0, 0) || !defined(CONFIG_NIMBLE_CPP_IDF)
871
873
esp_bt_controller_config_t bt_cfg = BT_CONTROLLER_INIT_CONFIG_DEFAULT ();
872
874
# if defined (CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32S3)
873
875
bt_cfg.bluetooth_mode = ESP_BT_MODE_BLE;
@@ -929,7 +931,7 @@ void NimBLEDevice::deinit(bool clearAll) {
929
931
int ret = nimble_port_stop ();
930
932
if (ret == 0 ) {
931
933
nimble_port_deinit ();
932
- #if defined( CONFIG_NIMBLE_CPP_IDF)
934
+ #ifdef CONFIG_NIMBLE_CPP_IDF
933
935
# if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 0, 0)
934
936
ret = esp_nimble_hci_and_controller_deinit ();
935
937
if (ret != ESP_OK) {
Original file line number Diff line number Diff line change 293
293
#define CONFIG_IDF_TARGET_ESP32 1
294
294
#endif
295
295
296
+ #if !defined(CONFIG_BT_NIMBLE_LEGACY_VHCI_ENABLE )
297
+ #define CONFIG_BT_NIMBLE_LEGACY_VHCI_ENABLE 1
298
+ #endif
299
+
300
+ #if !defined(CONFIG_BT_CONTROLLER_DISABLED )
301
+ #define CONFIG_BT_CONTROLLER_DISABLED 0
302
+ #endif
303
+
296
304
#if CONFIG_BT_NIMBLE_EXT_ADV || CONFIG_BT_NIMBLE_ENABLE_PERIODIC_ADV
297
305
# if defined(CONFIG_IDF_TARGET_ESP32 )
298
306
# error Extended advertising is not supported on ESP32.
You can’t perform that action at this time.
0 commit comments