mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
ble : adjust the log initialization sequence of ESP32C6 and ESP32H2
This commit is contained in:
parent
2c64d8d302
commit
d4327c47a1
@ -780,13 +780,6 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
|
|||||||
coex_init();
|
coex_init();
|
||||||
#endif // CONFIG_SW_COEXIST_ENABLE
|
#endif // CONFIG_SW_COEXIST_ENABLE
|
||||||
|
|
||||||
ret = ble_controller_init(cfg);
|
|
||||||
if (ret != ESP_OK) {
|
|
||||||
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "ble_controller_init failed %d", ret);
|
|
||||||
goto modem_deint;
|
|
||||||
}
|
|
||||||
|
|
||||||
ESP_LOGI(NIMBLE_PORT_LOG_TAG, "ble controller commit:[%s]", ble_controller_get_compile_version());
|
|
||||||
#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;
|
||||||
@ -804,10 +797,16 @@ 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 controller_init_err;
|
goto modem_deint;
|
||||||
}
|
}
|
||||||
#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;
|
||||||
|
}
|
||||||
|
|
||||||
|
ESP_LOGI(NIMBLE_PORT_LOG_TAG, "ble controller commit:[%s]", ble_controller_get_compile_version());
|
||||||
esp_ble_change_rtc_freq(slow_clk_freq);
|
esp_ble_change_rtc_freq(slow_clk_freq);
|
||||||
|
|
||||||
ble_controller_scan_duplicate_config();
|
ble_controller_scan_duplicate_config();
|
||||||
@ -835,13 +834,12 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
|
|||||||
|
|
||||||
free_controller:
|
free_controller:
|
||||||
controller_sleep_deinit();
|
controller_sleep_deinit();
|
||||||
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
|
||||||
controller_init_err:
|
|
||||||
r_ble_log_deinit_async();
|
|
||||||
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
|
||||||
os_msys_deinit();
|
os_msys_deinit();
|
||||||
ble_controller_deinit();
|
ble_controller_deinit();
|
||||||
modem_deint:
|
modem_deint:
|
||||||
|
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
||||||
|
r_ble_log_deinit_async();
|
||||||
|
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
||||||
esp_phy_modem_deinit();
|
esp_phy_modem_deinit();
|
||||||
modem_clock_deselect_lp_clock_source(PERIPH_BT_MODULE);
|
modem_clock_deselect_lp_clock_source(PERIPH_BT_MODULE);
|
||||||
modem_clock_module_disable(PERIPH_BT_MODULE);
|
modem_clock_module_disable(PERIPH_BT_MODULE);
|
||||||
@ -872,10 +870,10 @@ esp_err_t esp_bt_controller_deinit(void)
|
|||||||
modem_clock_deselect_lp_clock_source(PERIPH_BT_MODULE);
|
modem_clock_deselect_lp_clock_source(PERIPH_BT_MODULE);
|
||||||
modem_clock_module_disable(PERIPH_BT_MODULE);
|
modem_clock_module_disable(PERIPH_BT_MODULE);
|
||||||
|
|
||||||
|
ble_controller_deinit();
|
||||||
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
||||||
r_ble_log_deinit_async();
|
r_ble_log_deinit_async();
|
||||||
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
||||||
ble_controller_deinit();
|
|
||||||
|
|
||||||
#if CONFIG_BT_NIMBLE_ENABLED
|
#if CONFIG_BT_NIMBLE_ENABLED
|
||||||
/* De-initialize default event queue */
|
/* De-initialize default event queue */
|
||||||
|
@ -752,14 +752,6 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
|
|||||||
#if CONFIG_SW_COEXIST_ENABLE
|
#if CONFIG_SW_COEXIST_ENABLE
|
||||||
coex_init();
|
coex_init();
|
||||||
#endif // CONFIG_SW_COEXIST_ENABLE
|
#endif // CONFIG_SW_COEXIST_ENABLE
|
||||||
|
|
||||||
ret = ble_controller_init(cfg);
|
|
||||||
if (ret != ESP_OK) {
|
|
||||||
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "ble_controller_init failed %d", ret);
|
|
||||||
goto modem_deint;
|
|
||||||
}
|
|
||||||
|
|
||||||
ESP_LOGI(NIMBLE_PORT_LOG_TAG, "ble controller commit:[%s]", ble_controller_get_compile_version());
|
|
||||||
#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;
|
||||||
@ -777,10 +769,18 @@ 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 controller_init_err;
|
goto modem_deint;
|
||||||
}
|
}
|
||||||
#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;
|
||||||
|
}
|
||||||
|
|
||||||
|
ESP_LOGI(NIMBLE_PORT_LOG_TAG, "ble controller commit:[%s]", ble_controller_get_compile_version());
|
||||||
|
|
||||||
esp_ble_change_rtc_freq(slow_clk_freq);
|
esp_ble_change_rtc_freq(slow_clk_freq);
|
||||||
|
|
||||||
ble_controller_scan_duplicate_config();
|
ble_controller_scan_duplicate_config();
|
||||||
@ -809,13 +809,12 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
|
|||||||
|
|
||||||
free_controller:
|
free_controller:
|
||||||
controller_sleep_deinit();
|
controller_sleep_deinit();
|
||||||
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
|
||||||
controller_init_err:
|
|
||||||
r_ble_log_deinit_async();
|
|
||||||
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
|
||||||
os_msys_deinit();
|
os_msys_deinit();
|
||||||
ble_controller_deinit();
|
ble_controller_deinit();
|
||||||
modem_deint:
|
modem_deint:
|
||||||
|
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
||||||
|
r_ble_log_deinit_async();
|
||||||
|
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
||||||
modem_clock_deselect_lp_clock_source(PERIPH_BT_MODULE);
|
modem_clock_deselect_lp_clock_source(PERIPH_BT_MODULE);
|
||||||
modem_clock_module_disable(PERIPH_BT_MODULE);
|
modem_clock_module_disable(PERIPH_BT_MODULE);
|
||||||
#if CONFIG_BT_NIMBLE_ENABLED
|
#if CONFIG_BT_NIMBLE_ENABLED
|
||||||
@ -844,10 +843,10 @@ esp_err_t esp_bt_controller_deinit(void)
|
|||||||
modem_clock_deselect_lp_clock_source(PERIPH_BT_MODULE);
|
modem_clock_deselect_lp_clock_source(PERIPH_BT_MODULE);
|
||||||
modem_clock_module_disable(PERIPH_BT_MODULE);
|
modem_clock_module_disable(PERIPH_BT_MODULE);
|
||||||
|
|
||||||
|
ble_controller_deinit();
|
||||||
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
||||||
r_ble_log_deinit_async();
|
r_ble_log_deinit_async();
|
||||||
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
||||||
ble_controller_deinit();
|
|
||||||
|
|
||||||
#if CONFIG_BT_NIMBLE_ENABLED
|
#if CONFIG_BT_NIMBLE_ENABLED
|
||||||
/* De-initialize default event queue */
|
/* De-initialize default event queue */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user