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:
h2zero committed 2020-05-13 22:03:56 -06:00
1 parent 3d6f8b691e
commit 03cb7b21d9
53 files changed
+2335 -2012

No files matched your search

+6 -2
View File
@@ -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_ */