8000 Add compile guards to esp322 legacy HCI code for newer chips · h2zero/NimBLE-Arduino@875b54f · GitHub
[go: up one dir, main page]

Skip to content

Commit 875b54f

Browse files
committed
Add compile guards to esp322 legacy HCI code for newer chips
1 parent 25eb1f0 commit 875b54f

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/NimBLEDevice.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -891,11 +891,13 @@ bool NimBLEDevice::init(const std::string& deviceName) {
891891
return false;
892892
}
893893

894+
# if CONFIG_BT_NIMBLE_LEGACY_VHCI_ENABLE
894895
err = esp_nimble_hci_init();
895896
if (err != ESP_OK) {
896897
NIMBLE_LOGE(LOG_TAG, "esp_nimble_hci_init() failed; err=%d", err);
897898
return false;
898899
}
900+
# endif
899901
# endif
900902
# endif
901903
nimble_port_init();

src/nimble/esp_port/esp-hci/src/esp_nimble_hci.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
55
*/
66

77
#ifdef ESP_PLATFORM
8+
#include "syscfg/syscfg.h"
9+
#if CONFIG_BT_NIMBLE_LEGACY_VHCI_ENABLE
810

911
#include <assert.h>
1012
#include "nimble/porting/nimble/include/sysinit/sysinit.h"
@@ -342,4 +344,5 @@ esp_err_t esp_nimble_hci_deinit(void)
342344
return ESP_OK;
343345
}
344346

347+
#endif
345348
#endif //ESP_PLATFORM

0 commit comments

Comments
 (0)
0