diff --git a/src/NimBLEMeshModel.cpp b/src/NimBLEMeshModel.cpp index 1e52fe7..e4f57c6 100644 --- a/src/NimBLEMeshModel.cpp +++ b/src/NimBLEMeshModel.cpp @@ -10,7 +10,11 @@ #include "NimBLEUtils.h" #include "NimBLELog.h" -#include "nimble/nimble_port.h" +#if defined(CONFIG_NIMBLE_CPP_IDF) +# include "nimble/nimble_port.h" +#else +# include "nimble/porting/nimble/include/nimble/nimble_port.h" +#endif #include "NimBLEDevice.h" diff --git a/src/NimBLEMeshNode.cpp b/src/NimBLEMeshNode.cpp index fcd3fbc..d72bbaa 100644 --- a/src/NimBLEMeshNode.cpp +++ b/src/NimBLEMeshNode.cpp @@ -1,20 +1,27 @@ /* - * NimBLEMeshNoce.cpp + * NimBLEMeshNode.cpp * * Created: on July 22 2020 * Author H2zero * */ -#include "sdkconfig.h" +#include "nimconfig.h" #if defined(CONFIG_BT_ENABLED) #include "NimBLEMeshNode.h" #include "NimBLELog.h" #include "NimBLEDevice.h" -#include "services/gap/ble_svc_gap.h" -#include "services/gatt/ble_svc_gatt.h" +#if defined(CONFIG_NIMBLE_CPP_IDF) +# include "services/gap/ble_svc_gap.h" +# include "services/gatt/ble_svc_gatt.h" +#else +# 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 + + #define CID_VENDOR 0x05C3 diff --git a/src/NimBLEMeshNode.h b/src/NimBLEMeshNode.h index 23c9934..b6d56c7 100644 --- a/src/NimBLEMeshNode.h +++ b/src/NimBLEMeshNode.h @@ -9,14 +9,18 @@ #ifndef MAIN_NIMBLE_MESH_NODE_H_ #define MAIN_NIMBLE_MESH_NODE_H_ -#include "sdkconfig.h" -#if defined(CONFIG_BT_ENABLED) #include "nimconfig.h" +#if defined(CONFIG_BT_ENABLED) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wpointer-arith" -#include "mesh/glue.h" -#include "mesh/mesh.h" +#if defined(CONFIG_NIMBLE_CPP_IDF) +# include "mesh/glue.h" +# include "mesh/mesh.h" +#else +# include "nimble/nimble/host/mesh/include/mesh/glue.h" +# include "nimble/nimble/host/mesh/include/mesh/mesh.h" +#endif #pragma GCC diagnostic pop /**** FIX COMPILATION ****/