Skip to content

Commit 4931b99

Browse files
committed
fix(nimble): Fix core guards
1 parent afc7615 commit 4931b99

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

cores/esp32/esp32-hal-bt.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
#include "esp32-hal-bt.h"
1616

1717
#if SOC_BT_SUPPORTED
18-
#if defined(CONFIG_BLUEDROID_ENABLED) || defined(CONFIG_NIMBLE_ENABLED)
19-
#if defined(CONFIG_BT_BLUEDROID_ENABLED) && __has_include("esp_bt.h")
18+
#if (defined(CONFIG_BLUEDROID_ENABLED) || defined(CONFIG_NIMBLE_ENABLED)) && __has_include("esp_bt.h")
2019

2120
#if CONFIG_IDF_TARGET_ESP32
2221
bool btInUse() {
@@ -117,7 +116,7 @@ bool btStop() {
117116
return false;
118117
}
119118

120-
#else // !defined(CONFIG_BLUEDROID_ENABLED) && !defined(CONFIG_NIMBLE_ENABLED)
119+
#else // !__has_include("esp_bt.h") || !(defined(CONFIG_BLUEDROID_ENABLED) || defined(CONFIG_NIMBLE_ENABLED))
121120
bool btStarted() {
122121
return false;
123122
}
@@ -130,6 +129,6 @@ bool btStop() {
130129
return false;
131130
}
132131

133-
#endif /* !defined(CONFIG_BLUEDROID_ENABLED) && !defined(CONFIG_NIMBLE_ENABLED) */
132+
#endif /* !__has_include("esp_bt.h") || !(defined(CONFIG_BLUEDROID_ENABLED) || defined(CONFIG_NIMBLE_ENABLED)) */
134133

135134
#endif /* SOC_BT_SUPPORTED */

0 commit comments

Comments
 (0)