From 31f6b3536ca5b2c3302cdd4b233ffa585359e12b Mon Sep 17 00:00:00 2001 From: zhanghaipeng Date: Tue, 7 May 2024 10:59:42 +0800 Subject: [PATCH] feat(ble/controller): Display BLE controller init status for ESP32 and ESP32C3/S3 --- components/bt/controller/esp32/bt.c | 5 ++++- components/bt/controller/esp32c3/bt.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/components/bt/controller/esp32/bt.c b/components/bt/controller/esp32/bt.c index 42207893c0..f4d47d64a1 100644 --- a/components/bt/controller/esp32/bt.c +++ b/components/bt/controller/esp32/bt.c @@ -1634,7 +1634,10 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg) btdm_cfg_mask = btdm_config_mask_load(); - if (btdm_controller_init(btdm_cfg_mask, cfg) != 0) { + err = btdm_controller_init(btdm_cfg_mask, cfg); + + if (err != 0) { + ESP_LOGE(BTDM_LOG_TAG, "%s %d\n",__func__,err); err = ESP_ERR_NO_MEM; goto error; } diff --git a/components/bt/controller/esp32c3/bt.c b/components/bt/controller/esp32c3/bt.c index b9b30aa965..0c838e5bcd 100644 --- a/components/bt/controller/esp32c3/bt.c +++ b/components/bt/controller/esp32c3/bt.c @@ -1433,7 +1433,10 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg) periph_module_enable(PERIPH_BT_MODULE); periph_module_reset(PERIPH_BT_MODULE); - if (btdm_controller_init(cfg) != 0) { + err = btdm_controller_init(cfg); + + if (err != 0) { + ESP_LOGE(BT_LOG_TAG, "%s %d\n",__func__,err); err = ESP_ERR_NO_MEM; goto error; }