forked from espressif/esp-idf
Merge branch 'bugfix/ble_update_lib_1110_5.0' into 'release/v5.0'
Bugfix/ble update lib 1110 5.0 See merge request espressif/esp-idf!27063
This commit is contained in:
@@ -646,6 +646,12 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
|
|||||||
coex_init();
|
coex_init();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
ret = ble_controller_init(cfg);
|
||||||
|
if (ret != ESP_OK) {
|
||||||
|
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "ble_controller_init failed %d", ret);
|
||||||
|
goto modem_deint;
|
||||||
|
}
|
||||||
|
|
||||||
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
||||||
interface_func_t bt_controller_log_interface;
|
interface_func_t bt_controller_log_interface;
|
||||||
bt_controller_log_interface = esp_bt_controller_log_interface;
|
bt_controller_log_interface = esp_bt_controller_log_interface;
|
||||||
@@ -663,16 +669,10 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
|
|||||||
#endif // CONFIG_BT_CONTROLLER_LOG_DUMP
|
#endif // CONFIG_BT_CONTROLLER_LOG_DUMP
|
||||||
if (ret != ESP_OK) {
|
if (ret != ESP_OK) {
|
||||||
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "ble_controller_log_init failed %d", ret);
|
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "ble_controller_log_init failed %d", ret);
|
||||||
goto modem_deint;
|
goto controller_init_err;
|
||||||
}
|
}
|
||||||
#endif // CONFIG_BT_CONTROLLER_LOG_ENABLED
|
#endif // CONFIG_BT_CONTROLLER_LOG_ENABLED
|
||||||
|
|
||||||
ret = ble_controller_init(cfg);
|
|
||||||
if (ret != ESP_OK) {
|
|
||||||
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "ble_controller_init failed %d", ret);
|
|
||||||
goto modem_deint;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = controller_sleep_init();
|
ret = controller_sleep_init();
|
||||||
if (ret != ESP_OK) {
|
if (ret != ESP_OK) {
|
||||||
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "controller_sleep_init failed %d", ret);
|
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "controller_sleep_init failed %d", ret);
|
||||||
@@ -693,11 +693,12 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
|
|||||||
return ESP_OK;
|
return ESP_OK;
|
||||||
free_controller:
|
free_controller:
|
||||||
controller_sleep_deinit();
|
controller_sleep_deinit();
|
||||||
ble_controller_deinit();
|
|
||||||
modem_deint:
|
|
||||||
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
||||||
|
controller_init_err:
|
||||||
ble_log_deinit_async();
|
ble_log_deinit_async();
|
||||||
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
||||||
|
ble_controller_deinit();
|
||||||
|
modem_deint:
|
||||||
esp_phy_modem_deinit();
|
esp_phy_modem_deinit();
|
||||||
periph_module_disable(PERIPH_BT_MODULE);
|
periph_module_disable(PERIPH_BT_MODULE);
|
||||||
#if CONFIG_BT_NIMBLE_ENABLED
|
#if CONFIG_BT_NIMBLE_ENABLED
|
||||||
|
Submodule components/bt/controller/lib_esp32c2/esp32c2-bt-lib updated: ea33fbad1f...1e8bbd6f1a
@@ -720,12 +720,12 @@ npl_freertos_callout_deinit(struct ble_npl_callout *co)
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
xTimerDelete(callout->handle, portMAX_DELAY);
|
xTimerDelete(callout->handle, portMAX_DELAY);
|
||||||
|
#endif // BLE_NPL_USE_ESP_TIMER
|
||||||
#if OS_MEM_ALLOC
|
#if OS_MEM_ALLOC
|
||||||
os_memblock_put(&ble_freertos_co_pool,callout);
|
os_memblock_put(&ble_freertos_co_pool,callout);
|
||||||
#else
|
#else
|
||||||
free((void *)callout);
|
free((void *)callout);
|
||||||
#endif // OS_MEM_ALLOC
|
#endif // OS_MEM_ALLOC
|
||||||
#endif // BLE_NPL_USE_ESP_TIMER
|
|
||||||
co->co = NULL;
|
co->co = NULL;
|
||||||
memset(co, 0, sizeof(struct ble_npl_callout));
|
memset(co, 0, sizeof(struct ble_npl_callout));
|
||||||
}
|
}
|
||||||
|
@@ -699,7 +699,11 @@ void esp_phy_load_cal_and_init(void)
|
|||||||
// Set PHY whether in combo module
|
// Set PHY whether in combo module
|
||||||
// For comode mode, phy enable will be not in WiFi RX state
|
// For comode mode, phy enable will be not in WiFi RX state
|
||||||
#if SOC_PHY_COMBO_MODULE
|
#if SOC_PHY_COMBO_MODULE
|
||||||
|
#if CONFIG_IDF_TARGET_ESP32C2
|
||||||
|
phy_init_param_set(1);
|
||||||
|
#else
|
||||||
phy_init_param_set(0);
|
phy_init_param_set(0);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
esp_phy_calibration_data_t* cal_data =
|
esp_phy_calibration_data_t* cal_data =
|
||||||
|
Reference in New Issue
Block a user