File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 1717#if SOC_BT_SUPPORTED
1818#ifdef CONFIG_BT_BLUEDROID_ENABLED
1919
20+ #if __has_include ("esp_bt.h" )
21+ #include "esp_bt.h"
22+
2023#if CONFIG_IDF_TARGET_ESP32
2124bool btInUse () {
2225 return true;
@@ -28,8 +31,6 @@ __attribute__((weak)) bool btInUse() {
2831}
2932#endif
3033
31- #include "esp_bt.h"
32-
3334#ifdef CONFIG_BTDM_CONTROLLER_MODE_BTDM
3435#define BT_MODE ESP_BT_MODE_BTDM
3536#elif defined(CONFIG_BTDM_CONTROLLER_MODE_BR_EDR_ONLY )
@@ -56,7 +57,7 @@ bool btStartMode(bt_mode mode) {
5657 case BT_MODE_BTDM : esp_bt_mode = ESP_BT_MODE_BTDM ; break ;
5758 default : esp_bt_mode = BT_MODE ; break ;
5859 }
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().
6061 cfg .mode = esp_bt_mode ;
6162 if (cfg .mode == ESP_BT_MODE_CLASSIC_BT ) {
6263 esp_bt_controller_mem_release (ESP_BT_MODE_BLE );
@@ -116,6 +117,7 @@ bool btStop() {
116117 return false;
117118}
118119
120+ #endif // __has_include("esp_bt.h")
119121#else // CONFIG_BT_ENABLED
120122bool btStarted () {
121123 return false;
@@ -132,3 +134,4 @@ bool btStop() {
132134#endif /* CONFIG_BT_ENABLED */
133135
134136#endif /* SOC_BT_SUPPORTED */
137+
You can’t perform that action at this time.
0 commit comments