File tree Expand file tree Collapse file tree 2 files changed +5
-10
lines changed
Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Original file line number Diff line number Diff line change 3030#include " services/gap/ble_svc_gap.h"
3131#include " services/gatt/ble_svc_gatt.h"
3232
33- #ifdef ARDUINO_ARCH_ESP32
34- #include " esp32-hal-bt.h"
33+ #ifdef CONFIG_ENABLE_ARDUINO_DEPENDS
34+ extern " C" bool btInUse ();
35+ bool btInUse (){ return true ; }
3536#endif
3637
3738#include " NimBLELog.h"
@@ -739,12 +740,6 @@ NimBLEAddress NimBLEDevice::getWhiteListAddress(size_t index) {
739740 if (!initialized){
740741 int rc=0 ;
741742 esp_err_t errRc = ESP_OK;
742-
743- #ifdef ARDUINO_ARCH_ESP32
744- // make sure the linker includes esp32-hal-bt.c so ardruino init doesn't release BLE memory.
745- btStarted ();
746- #endif
747-
748743 errRc = nvs_flash_init ();
749744
750745 if (errRc == ESP_ERR_NVS_NO_FREE_PAGES || errRc == ESP_ERR_NVS_NEW_VERSION_FOUND) {
Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ NimBLEScan::~NimBLEScan() {
110110
111111 advertisedDevice->m_timestamp = time (nullptr );
112112 advertisedDevice->setRSSI (event->disc .rssi );
113- advertisedDevice->setPayload (event->disc .data , event->disc .length_data ,
113+ advertisedDevice->setPayload (event->disc .data , event->disc .length_data ,
114114 event->disc .event_type == BLE_HCI_ADV_RPT_EVTYPE_SCAN_RSP);
115115
116116 if (pScan->m_pAdvertisedDeviceCallbacks ) {
@@ -128,7 +128,7 @@ NimBLEScan::~NimBLEScan() {
128128 advertisedDevice->m_callbackSent = true ;
129129 pScan->m_pAdvertisedDeviceCallbacks ->onResult (advertisedDevice);
130130 }
131- // If not storing results and we have invoked the callback, delete the device.
131+ // If not storing results and we have invoked the callback, delete the device.
132132 if (pScan->m_maxResults == 0 && advertisedDevice->m_callbackSent ) {
133133 pScan->erase (advertisedAddress);
134134 }
You can’t perform that action at this time.
0 commit comments