File tree 4 files changed +13
-1
lines changed
4 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 14
14
15
15
#include "esp32-hal-bt.h"
16
16
17
- #if CONFIG_BT_ENABLED
17
+ #if defined(CONFIG_BT_ENABLED ) && defined(CONFIG_BLUEDROID_ENABLED )
18
+
18
19
19
20
#include "bt.h"
20
21
#include "esp_bt_defs.h"
Original file line number Diff line number Diff line change 16
16
// Useful if you want to advertise some sort of message
17
17
// Button is attached between GPIO 0 and GND, and the device name changes each time the button is pressed
18
18
19
+ #if !defined(CONFIG_BT_ENABLED) || !defined(CONFIG_BLUEDROID_ENABLED)
20
+ #error Bluetooth is not enabled! Please run `make menuconfig` to and enable it
21
+ #endif
22
+
19
23
#include " SimpleBLE.h"
20
24
SimpleBLE ble;
21
25
Original file line number Diff line number Diff line change 12
12
// See the License for the specific language governing permissions and
13
13
// limitations under the License.
14
14
15
+ #if defined(CONFIG_BT_ENABLED) && defined(CONFIG_BLUEDROID_ENABLED)
16
+
15
17
#include " SimpleBLE.h"
16
18
#include " esp32-hal-log.h"
17
19
@@ -125,3 +127,5 @@ void SimpleBLE::end()
125
127
{
126
128
_stop_gap ();
127
129
}
130
+
131
+ #endif
Original file line number Diff line number Diff line change 15
15
#ifndef _SIMPLE_BLE_H_
16
16
#define _SIMPLE_BLE_H_
17
17
18
+ #if defined(CONFIG_BT_ENABLED) && defined(CONFIG_BLUEDROID_ENABLED)
18
19
19
20
#include < cstdint>
20
21
#include < cstdio>
@@ -58,3 +59,5 @@ class SimpleBLE {
58
59
};
59
60
60
61
#endif
62
+
63
+ #endif
You can’t perform that action at this time.
0 commit comments