mirror of
https://github.com/h2zero/esp-nimble-cpp.git
synced 2024-11-22 05:00:55 +01:00
Code cleanup
This commit is contained in:
parent
6be6a111d0
commit
2e1d78ff78
1 changed files with 2 additions and 7 deletions
|
@ -31,7 +31,8 @@
|
||||||
#include "services/gatt/ble_svc_gatt.h"
|
#include "services/gatt/ble_svc_gatt.h"
|
||||||
|
|
||||||
#ifdef CONFIG_ENABLE_ARDUINO_DEPENDS
|
#ifdef CONFIG_ENABLE_ARDUINO_DEPENDS
|
||||||
#include "esp32-hal-bt.h"
|
extern "C" bool btInUse();
|
||||||
|
bool btInUse(){ return true; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "NimBLELog.h"
|
#include "NimBLELog.h"
|
||||||
|
@ -739,12 +740,6 @@ NimBLEAddress NimBLEDevice::getWhiteListAddress(size_t index) {
|
||||||
if(!initialized){
|
if(!initialized){
|
||||||
int rc=0;
|
int rc=0;
|
||||||
esp_err_t errRc = ESP_OK;
|
esp_err_t errRc = ESP_OK;
|
||||||
|
|
||||||
#ifdef CONFIG_ENABLE_ARDUINO_DEPENDS
|
|
||||||
// make sure the linker includes esp32-hal-bt.c so ardruino init doesn't release BLE memory.
|
|
||||||
btStarted();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
errRc = nvs_flash_init();
|
errRc = nvs_flash_init();
|
||||||
|
|
||||||
if (errRc == ESP_ERR_NVS_NO_FREE_PAGES || errRc == ESP_ERR_NVS_NEW_VERSION_FOUND) {
|
if (errRc == ESP_ERR_NVS_NO_FREE_PAGES || errRc == ESP_ERR_NVS_NEW_VERSION_FOUND) {
|
||||||
|
|
Loading…
Reference in a new issue