File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 1414#include "esp_bt_device.h"
1515#include "esp_log.h"
1616
17- char bt0_addr_str [18 ] = {0 };
18-
1917#define TAG "bt-0"
2018
2119void bt0_init (void )
2220{
21+ #if defined(CONFIG_ENABLE_BLUFI )
2322 ESP_ERROR_CHECK (esp_bt_controller_mem_release (ESP_BT_MODE_CLASSIC_BT ));
2423 esp_bt_controller_config_t bt_cfg = BT_CONTROLLER_INIT_CONFIG_DEFAULT ();
2524 ESP_ERROR_CHECK (esp_bt_controller_init (& bt_cfg ));
2625 ESP_ERROR_CHECK (esp_bt_controller_enable (ESP_BT_MODE_BLE ));
2726 ESP_ERROR_CHECK (esp_bluedroid_init ());
2827 ESP_ERROR_CHECK (esp_bluedroid_enable ());
29- snprintf (bt0_addr_str , sizeof (bt0_addr_str ), "" ESP_BD_ADDR_STR "" , ESP_BD_ADDR_HEX (esp_bt_dev_get_address ()));
28+ #else
29+ ESP_ERROR_CHECK (esp_bt_controller_mem_release (ESP_BT_MODE_BTDM ));
30+ #endif
3031}
3132
3233void bt0_deinit (void )
3334{
34- #if defined(CONFIG_ENABLE_BLUFI )
3535 ESP_ERROR_CHECK (esp_bluedroid_disable ());
3636 ESP_ERROR_CHECK (esp_bluedroid_deinit ());
3737 ESP_ERROR_CHECK (esp_bt_controller_disable ());
3838 ESP_ERROR_CHECK (esp_bt_controller_deinit ());
39- #endif
4039 ESP_ERROR_CHECK (esp_bt_controller_mem_release (ESP_BT_MODE_BTDM ));
4140}
You can’t perform that action at this time.
0 commit comments