From fd81fd0ac33f4fdddbf173333652feba78998601 Mon Sep 17 00:00:00 2001 From: me-no-dev Date: Wed, 12 Apr 2017 20:53:21 +0300 Subject: [PATCH] Fix BT init compilation error Fixes: https://github.com/espressif/arduino-esp32/issues/309 --- cores/esp32/esp32-hal-bt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cores/esp32/esp32-hal-bt.c b/cores/esp32/esp32-hal-bt.c index fe479d46..0bed8e80 100644 --- a/cores/esp32/esp32-hal-bt.c +++ b/cores/esp32/esp32-hal-bt.c @@ -23,11 +23,13 @@ bool btStarted(){ } bool btStart(){ + esp_bt_controller_config_t cfg; + memset(&cfg, 0, sizeof(esp_bt_controller_config_t)); if(esp_bt_controller_get_status() == ESP_BT_CONTROLLER_STATUS_ENABLED){ return true; } if(esp_bt_controller_get_status() == ESP_BT_CONTROLLER_STATUS_IDLE){ - esp_bt_controller_init(); + esp_bt_controller_init(&cfg); while(esp_bt_controller_get_status() == ESP_BT_CONTROLLER_STATUS_IDLE){} } if(esp_bt_controller_get_status() == ESP_BT_CONTROLLER_STATUS_INITED){