File tree 1 file changed +6
-3
lines changed 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 17
17
#if SOC_BT_SUPPORTED
18
18
#ifdef CONFIG_BT_BLUEDROID_ENABLED
19
19
20
+ #if __has_include ("esp_bt.h" )
21
+ #include "esp_bt.h"
22
+
20
23
#if CONFIG_IDF_TARGET_ESP32
21
24
bool btInUse () {
22
25
return true;
@@ -28,8 +31,6 @@ __attribute__((weak)) bool btInUse() {
28
31
}
29
32
#endif
30
33
31
- #include "esp_bt.h"
32
-
33
34
#ifdef CONFIG_BTDM_CONTROLLER_MODE_BTDM
34
35
#define BT_MODE ESP_BT_MODE_BTDM
35
36
#elif defined(CONFIG_BTDM_CONTROLLER_MODE_BR_EDR_ONLY )
@@ -56,7 +57,7 @@ bool btStartMode(bt_mode mode) {
56
57
case BT_MODE_BTDM : esp_bt_mode = ESP_BT_MODE_BTDM ; break ;
57
58
default : esp_bt_mode = BT_MODE ; break ;
58
59
}
59
- // esp_bt_controller_enable(MODE) This mode must be equal as the mode in “ cfg” of esp_bt_controller_init().
60
+ // esp_bt_controller_enable(MODE) This mode must be equal as the mode in " cfg" of esp_bt_controller_init().
60
61
cfg .mode = esp_bt_mode ;
61
62
if (cfg .mode == ESP_BT_MODE_CLASSIC_BT ) {
62
63
esp_bt_controller_mem_release (ESP_BT_MODE_BLE );
@@ -116,6 +117,7 @@ bool btStop() {
116
117
return false;
117
118
}
118
119
120
+ #endif // __has_include("esp_bt.h")
119
121
#else // CONFIG_BT_ENABLED
120
122
bool btStarted () {
121
123
return false;
@@ -132,3 +134,4 @@ bool btStop() {
132
134
#endif /* CONFIG_BT_ENABLED */
133
135
134
136
#endif /* SOC_BT_SUPPORTED */
137
+
You can’t perform that action at this time.
0 commit comments