Skip to content

Commit fd81fd0

Browse files
committed
Fix BT init compilation error
Fixes: espressif#309
1 parent 6519a35 commit fd81fd0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cores/esp32/esp32-hal-bt.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,13 @@ bool btStarted(){
2323
}
2424

2525
bool btStart(){
26+
esp_bt_controller_config_t cfg;
27+
memset(&cfg, 0, sizeof(esp_bt_controller_config_t));
2628
if(esp_bt_controller_get_status() == ESP_BT_CONTROLLER_STATUS_ENABLED){
2729
return true;
2830
}
2931
if(esp_bt_controller_get_status() == ESP_BT_CONTROLLER_STATUS_IDLE){
30-
esp_bt_controller_init();
32+
esp_bt_controller_init(&cfg);
3133
while(esp_bt_controller_get_status() == ESP_BT_CONTROLLER_STATUS_IDLE){}
3234
}
3335
if(esp_bt_controller_get_status() == ESP_BT_CONTROLLER_STATUS_INITED){

0 commit comments

Comments
 (0)