forked from h2zero/esp-nimble-cpp
Refactor include directives to use different paths for arduino/idf.
* Sets macros to allow compiling when Central role is enabled and Observer disabled, or Peripheral enabled and Broadcaster disabled. * Adds a macro definition for CONFIG_NIMBLE_CPP_IDF to enable different include paths/functionality for IDF / Arduino.
This commit is contained in:
+14
-2
@@ -11,16 +11,18 @@
|
||||
* Created on: Mar 16, 2017
|
||||
* Author: kolban
|
||||
*/
|
||||
#include "sdkconfig.h"
|
||||
#if defined(CONFIG_BT_ENABLED)
|
||||
|
||||
#include "nimconfig.h"
|
||||
#if defined(CONFIG_BT_ENABLED)
|
||||
|
||||
#include "NimBLEDevice.h"
|
||||
#include "NimBLEUtils.h"
|
||||
|
||||
#include "esp_err.h"
|
||||
#include "esp_bt.h"
|
||||
#include "nvs_flash.h"
|
||||
|
||||
#if defined(CONFIG_NIMBLE_CPP_IDF)
|
||||
#include "esp_nimble_hci.h"
|
||||
#include "nimble/nimble_port.h"
|
||||
#include "nimble/nimble_port_freertos.h"
|
||||
@@ -29,6 +31,16 @@
|
||||
#include "host/util/util.h"
|
||||
#include "services/gap/ble_svc_gap.h"
|
||||
#include "services/gatt/ble_svc_gatt.h"
|
||||
#else
|
||||
#include "nimble/esp_port/esp-hci/include/esp_nimble_hci.h"
|
||||
#include "nimble/porting/nimble/include/nimble/nimble_port.h"
|
||||
#include "nimble/porting/npl/freertos/include/nimble/nimble_port_freertos.h"
|
||||
#include "nimble/nimble/host/include/host/ble_hs.h"
|
||||
#include "nimble/nimble/host/include/host/ble_hs_pvcy.h"
|
||||
#include "nimble/nimble/host/util/include/host/util/util.h"
|
||||
#include "nimble/nimble/host/services/gap/include/services/gap/ble_svc_gap.h"
|
||||
#include "nimble/nimble/host/services/gatt/include/services/gatt/ble_svc_gatt.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ENABLE_ARDUINO_DEPENDS
|
||||
#include "esp32-hal-bt.h"
|
||||
|
||||
Reference in New Issue
Block a user