forked from h2zero/esp-nimble-cpp
Conditionally compile code for specific roles.
This allows NimBLE options in menuconfig to reduce code size based on the roles selected (scan/advertising/central/peripheral). Significant code space can be saved by removing unnecessary roles for the application.
This commit is contained in:
1 parent
3d6f8b691e
commit
03cb7b21d9
53 files changed
+2335
-2012
No files matched your search
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Created: on Jan 24 2020
|
||||
* Author H2zero
|
||||
*
|
||||
*
|
||||
* Originally:
|
||||
*
|
||||
* BLEAdvertisedDevice.h
|
||||
@@ -17,6 +17,9 @@
|
||||
#include "sdkconfig.h"
|
||||
#if defined(CONFIG_BT_ENABLED)
|
||||
|
||||
#include "nimconfig.h"
|
||||
#if defined(CONFIG_BT_NIMBLE_ROLE_OBSERVER)
|
||||
|
||||
#include "NimBLEAddress.h"
|
||||
#include "NimBLEScan.h"
|
||||
#include "NimBLEUUID.h"
|
||||
@@ -24,7 +27,7 @@
|
||||
#include "host/ble_hs_adv.h"
|
||||
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <vector>
|
||||
|
||||
|
||||
class NimBLEScan;
|
||||
@@ -129,5 +132,6 @@ public:
|
||||
virtual void onResult(NimBLEAdvertisedDevice* advertisedDevice) = 0;
|
||||
};
|
||||
|
||||
#endif // #if defined( CONFIG_BT_NIMBLE_ROLE_CENTRAL)
|
||||
#endif /* CONFIG_BT_ENABLED */
|
||||
#endif /* COMPONENTS_NIMBLEADVERTISEDDEVICE_H_ */
|
||||
Reference in new issue
Block a user