Skip to content

Commit 46ef06e

Browse files
committed
Added and modified compatibility safeguards for BLE5 examples
1 parent fb660b5 commit 46ef06e

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

Diff for: libraries/BLE/examples/BLE5_extended_scan/BLE5_extended_scan.ino

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
author: chegewara
99
*/
1010
#ifndef CONFIG_BT_BLE_50_FEATURES_SUPPORTED
11-
#warning "Not compatible hardware"
11+
#error "This SoC does not support BLE5. Try using ESP32-C3, or ESP32-S3"
1212
#else
13+
1314
#include <BLEDevice.h>
1415
#include <BLEUtils.h>
1516
#include <BLEScan.h>

Diff for: libraries/BLE/examples/BLE5_multi_advertising/BLE5_multi_advertising.ino

+5
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
author: chegewara
77
*/
88

9+
#ifndef CONFIG_BT_BLE_50_FEATURES_SUPPORTED
10+
#error "This SoC does not support BLE5. Try using ESP32-C3, or ESP32-S3"
11+
#else
12+
913
#include <BLEDevice.h>
1014
#include <BLEAdvertising.h>
1115

@@ -140,3 +144,4 @@ void setup() {
140144
void loop() {
141145
delay(2000);
142146
}
147+
#endif

Diff for: libraries/BLE/examples/BLE5_periodic_advertising/BLE5_periodic_advertising.ino

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
author: chegewara
66
*/
77

8+
#ifndef CONFIG_BT_BLE_50_FEATURES_SUPPORTED
9+
#error "This SoC does not support BLE5. Try using ESP32-C3, or ESP32-S3"
10+
#else
811
#include <BLEDevice.h>
912
#include <BLEAdvertising.h>
1013

@@ -70,3 +73,4 @@ void setup() {
7073
void loop() {
7174
delay(2000);
7275
}
76+
#endif

Diff for: libraries/BLE/examples/BLE5_periodic_sync/BLE5_periodic_sync.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
author: chegewara
99
*/
1010
#ifndef CONFIG_BT_BLE_50_FEATURES_SUPPORTED
11-
#warning "Not compatible hardware"
11+
#error "This SoC does not support BLE5. Try using ESP32-C3, or ESP32-S3"
1212
#else
1313
#include <BLEDevice.h>
1414
#include <BLEUtils.h>

0 commit comments

Comments
 (0)