Use more stable arduino detection methods (#38)

* Use a more stable arduino detection macro.

* Detection method for both IDF config phases. Newer IDF API and targets.
This commit is contained in:
Aron Rubin
2021-03-04 21:00:21 -07:00
committed by GitHub
parent ef049ddf19
commit cf3227503b
2 changed files with 31 additions and 29 deletions
+2 -2
View File
@@ -30,7 +30,7 @@
#include "services/gap/ble_svc_gap.h"
#include "services/gatt/ble_svc_gatt.h"
#ifdef ARDUINO_ARCH_ESP32
#ifdef CONFIG_ENABLE_ARDUINO_DEPENDS
#include "esp32-hal-bt.h"
#endif
@@ -534,7 +534,7 @@ void NimBLEDevice::setScanFilterMode(uint8_t mode) {
int rc=0;
esp_err_t errRc = ESP_OK;
#ifdef ARDUINO_ARCH_ESP32
#ifdef CONFIG_ENABLE_ARDUINO_DEPENDS
// make sure the linker includes esp32-hal-bt.c so ardruino init doesn't release BLE memory.
btStarted();
#endif