Skip to content

Commit d99740f

Browse files
committed
guard SimpleBLE
1 parent 64b51f9 commit d99740f

File tree

5 files changed

+10
-12
lines changed

5 files changed

+10
-12
lines changed

cores/esp32/esp32-hal-bt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
#include "sdkconfig.h"
1616
#include "soc/soc_caps.h"
17-
#if defined(CONFIG_BT_ENABLED) && defined(CONFIG_BLUEDROID_ENABLED) && SOC_BLE_SUPPORTED
17+
#if defined(CONFIG_BT_ENABLED) && defined(CONFIG_BLUEDROID_ENABLED) && SOC_BT_SUPPORTED
1818

1919
#include "esp_bt.h"
2020
#include "esp_bt_main.h"
@@ -102,4 +102,4 @@ bool btStop() {
102102
return true;
103103
}
104104

105-
#endif
105+
#endif /* CONFIG_BT_ENABLED CONFIG_BLUEDROID_ENABLED SOC_BT_SUPPORTED */

cores/esp32/esp32-hal-bt.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#define _ESP32_ESP32_HAL_BT_H_
1717

1818
#include "soc/soc_caps.h"
19-
#if SOC_BLE_SUPPORTED
19+
#if SOC_BT_SUPPORTED
2020

2121
#include "esp32-hal.h"
2222

@@ -40,6 +40,6 @@ bool btStop();
4040
}
4141
#endif
4242

43-
#endif /* SOC_BLE_SUPPORTED */
43+
#endif /* SOC_BT_SUPPORTED */
4444

4545
#endif /* _ESP32_ESP32_HAL_BT_H_ */

cores/esp32/esp32-hal-misc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include "esp_ota_ops.h"
2727
#endif //CONFIG_APP_ROLLBACK_ENABLE
2828
#include "esp_private/startup_internal.h"
29-
#if defined(CONFIG_BT_ENABLED) && defined(CONFIG_BLUEDROID_ENABLED) && SOC_BLE_SUPPORTED
29+
#if defined(CONFIG_BT_ENABLED) && defined(CONFIG_BLUEDROID_ENABLED) && SOC_BT_SUPPORTED
3030
#include "esp_bt.h"
3131
#if CONFIG_IDF_TARGET_ESP32
3232
bool btInUse() __attribute__((weak));
@@ -304,7 +304,7 @@ void initArduino() {
304304
if (err) {
305305
log_e("Failed to initialize NVS! Error: %u", err);
306306
}
307-
#if defined(CONFIG_BLUEDROID_ENABLED) && SOC_BLE_SUPPORTED
307+
#if defined(CONFIG_BLUEDROID_ENABLED) && SOC_BT_SUPPORTED
308308
if (!btInUse()) {
309309
esp_bt_controller_mem_release(ESP_BT_MODE_BTDM);
310310
}

libraries/SimpleBLE/src/SimpleBLE.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,9 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#include "sdkconfig.h"
16-
17-
#if defined(CONFIG_BT_ENABLED) && defined(CONFIG_BLUEDROID_ENABLED)
18-
1915
#include "SimpleBLE.h"
16+
#if defined(CONFIG_BT_ENABLED) && defined(CONFIG_BLUEDROID_ENABLED) && SOC_BT_SUPPORTED
17+
2018
#include "esp32-hal-log.h"
2119

2220
#include "esp_bt.h"

libraries/SimpleBLE/src/SimpleBLE.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
#define _SIMPLE_BLE_H_
1717

1818
#include "sdkconfig.h"
19-
20-
#if defined(CONFIG_BT_ENABLED) && defined(CONFIG_BLUEDROID_ENABLED)
19+
#include "soc/soc_caps.h"
20+
#if defined(CONFIG_BT_ENABLED) && defined(CONFIG_BLUEDROID_ENABLED) && SOC_BT_SUPPORTED
2121

2222
#include <cstdint>
2323
#include <cstdio>

0 commit comments

Comments
 (0)