From 80def6663bf0618c54f875e753cf5154ca75160b Mon Sep 17 00:00:00 2001 From: h2zero Date: Sun, 4 May 2025 17:16:03 -0600 Subject: [PATCH] Fix preprocessor statement --- src/NimBLEDevice.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/NimBLEDevice.cpp b/src/NimBLEDevice.cpp index 6758c29..95343ea 100644 --- a/src/NimBLEDevice.cpp +++ b/src/NimBLEDevice.cpp @@ -889,7 +889,7 @@ bool NimBLEDevice::init(const std::string& deviceName) { esp_bt_controller_mem_release(ESP_BT_MODE_CLASSIC_BT); # endif -# if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 0, 0) | !defined(CONFIG_NIMBLE_CPP_IDF) +# if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 0, 0) || !defined(CONFIG_NIMBLE_CPP_IDF) esp_bt_controller_config_t bt_cfg = BT_CONTROLLER_INIT_CONFIG_DEFAULT(); # if defined(CONFIG_IDF_TARGET_ESP32) bt_cfg.mode = ESP_BT_MODE_BLE; @@ -916,11 +916,13 @@ bool NimBLEDevice::init(const std::string& deviceName) { return false; } +# if CONFIG_BT_NIMBLE_LEGACY_VHCI_ENABLE err = esp_nimble_hci_init(); if (err != ESP_OK) { NIMBLE_LOGE(LOG_TAG, "esp_nimble_hci_init() failed; err=%d", err); return false; } +# endif # endif # endif nimble_port_init();