mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-01 18:50:34 +03:00
feat(sleep_modem): allow multi modem to enable rf with regdma
This commit is contained in:
@@ -47,6 +47,7 @@
|
||||
|
||||
#include "esp_rom_sys.h"
|
||||
#include "hli_api.h"
|
||||
#include "esp_private/sleep_modem.h"
|
||||
|
||||
#if CONFIG_BLE_LOG_ENABLED
|
||||
#include "ble_log.h"
|
||||
@@ -1692,7 +1693,7 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
|
||||
|
||||
ESP_LOGI(BTDM_LOG_TAG, "BT controller compile version [%s]", btdm_controller_get_compile_version());
|
||||
|
||||
esp_phy_modem_init();
|
||||
esp_phy_modem_init(SLEEP_MODEM_BT);
|
||||
|
||||
esp_bt_power_domain_on();
|
||||
|
||||
@@ -1867,7 +1868,7 @@ static void bt_controller_deinit_internal(void)
|
||||
|
||||
esp_bt_power_domain_off();
|
||||
|
||||
esp_phy_modem_deinit();
|
||||
esp_phy_modem_deinit(SLEEP_MODEM_BT);
|
||||
}
|
||||
|
||||
static void bt_controller_shutdown(void* arg)
|
||||
|
||||
@@ -48,9 +48,7 @@
|
||||
#include "esp_private/esp_clk_tree_common.h"
|
||||
#include "bt_osi_mem.h"
|
||||
|
||||
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
|
||||
#include "esp_private/sleep_modem.h"
|
||||
#endif // CONFIG_FREERTOS_USE_TICKLESS_IDLE
|
||||
#include "esp_private/esp_modem_clock.h"
|
||||
|
||||
#include "freertos/FreeRTOS.h"
|
||||
@@ -957,7 +955,7 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
|
||||
|
||||
os_msys_init();
|
||||
|
||||
esp_phy_modem_init();
|
||||
esp_phy_modem_init(SLEEP_MODEM_BT);
|
||||
periph_module_enable(PERIPH_BT_MODULE);
|
||||
periph_module_reset(PERIPH_BT_MODULE);
|
||||
|
||||
@@ -1037,7 +1035,7 @@ controller_init_err:
|
||||
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
||||
ble_controller_deinit();
|
||||
modem_deint:
|
||||
esp_phy_modem_deinit();
|
||||
esp_phy_modem_deinit(SLEEP_MODEM_BT);
|
||||
periph_module_disable(PERIPH_BT_MODULE);
|
||||
|
||||
free_mem:
|
||||
@@ -1077,7 +1075,7 @@ esp_err_t esp_bt_controller_deinit(void)
|
||||
|
||||
npl_freertos_mempool_deinit();
|
||||
|
||||
esp_phy_modem_deinit();
|
||||
esp_phy_modem_deinit(SLEEP_MODEM_BT);
|
||||
|
||||
ble_controller_status = ESP_BT_CONTROLLER_STATUS_IDLE;
|
||||
|
||||
|
||||
@@ -62,6 +62,8 @@
|
||||
#endif // CONFIG_BT_CTRL_LE_LOG_STORAGE_EN
|
||||
#include "esp_rom_gpio.h"
|
||||
#if CONFIG_BT_ENABLED
|
||||
#include "esp_private/sleep_modem.h"
|
||||
|
||||
|
||||
/* Macro definition
|
||||
************************************************************************
|
||||
@@ -1850,7 +1852,7 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
|
||||
#if CONFIG_MAC_BB_PD
|
||||
esp_mac_bb_pd_mem_init();
|
||||
#endif
|
||||
esp_phy_modem_init();
|
||||
esp_phy_modem_init(SLEEP_MODEM_BT);
|
||||
esp_bt_power_domain_on();
|
||||
|
||||
btdm_controller_mem_init();
|
||||
@@ -2049,7 +2051,7 @@ static void bt_controller_deinit_internal(void)
|
||||
#if CONFIG_MAC_BB_PD
|
||||
esp_mac_bb_pd_mem_deinit();
|
||||
#endif
|
||||
esp_phy_modem_deinit();
|
||||
esp_phy_modem_deinit(SLEEP_MODEM_BT);
|
||||
|
||||
#if CONFIG_BT_CTRL_LE_LOG_EN
|
||||
esp_bt_controller_log_deinit();
|
||||
|
||||
@@ -44,8 +44,8 @@
|
||||
#include "soc/regdma.h"
|
||||
#include "bt_osi_mem.h"
|
||||
|
||||
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
|
||||
#include "esp_private/sleep_modem.h"
|
||||
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
|
||||
#include "esp_private/sleep_retention.h"
|
||||
#include "esp_private/pm_impl.h"
|
||||
#endif // CONFIG_FREERTOS_USE_TICKLESS_IDLE
|
||||
@@ -1016,7 +1016,7 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
|
||||
modem_clock_module_mac_reset(PERIPH_BT_MODULE);
|
||||
/* Select slow clock source for BT momdule */
|
||||
ble_rtc_clk_init(cfg);
|
||||
esp_phy_modem_init();
|
||||
esp_phy_modem_init(SLEEP_MODEM_BT);
|
||||
|
||||
if (ble_osi_coex_funcs_register((struct osi_coex_funcs_t *)&s_osi_coex_funcs_ro) != 0) {
|
||||
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "osi coex funcs reg failed");
|
||||
@@ -1111,7 +1111,7 @@ modem_deint:
|
||||
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
||||
esp_bt_controller_log_deinit();
|
||||
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
||||
esp_phy_modem_deinit();
|
||||
esp_phy_modem_deinit(SLEEP_MODEM_BT);
|
||||
modem_clock_deselect_lp_clock_source(PERIPH_BT_MODULE);
|
||||
modem_clock_module_disable(PERIPH_BT_MODULE);
|
||||
|
||||
@@ -1136,7 +1136,7 @@ esp_err_t esp_bt_controller_deinit(void)
|
||||
|
||||
os_msys_deinit();
|
||||
|
||||
esp_phy_modem_deinit();
|
||||
esp_phy_modem_deinit(SLEEP_MODEM_BT);
|
||||
modem_clock_deselect_lp_clock_source(PERIPH_BT_MODULE);
|
||||
modem_clock_module_disable(PERIPH_BT_MODULE);
|
||||
|
||||
|
||||
@@ -45,8 +45,8 @@
|
||||
#include "esp_private/esp_clk_tree_common.h"
|
||||
#include "bt_osi_mem.h"
|
||||
|
||||
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
|
||||
#include "esp_private/sleep_modem.h"
|
||||
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
|
||||
#include "esp_private/sleep_retention.h"
|
||||
#include "esp_private/pm_impl.h"
|
||||
#endif // CONFIG_FREERTOS_USE_TICKLESS_IDLE
|
||||
@@ -1096,7 +1096,7 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
|
||||
modem_clock_module_mac_reset(PERIPH_BT_MODULE);
|
||||
/* Select slow clock source for BT momdule */
|
||||
ble_rtc_clk_init(cfg);
|
||||
esp_phy_modem_init();
|
||||
esp_phy_modem_init(SLEEP_MODEM_BT);
|
||||
|
||||
if (ble_osi_coex_funcs_register((struct osi_coex_funcs_t *)&s_osi_coex_funcs_ro) != 0) {
|
||||
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "osi coex funcs reg failed");
|
||||
@@ -1194,7 +1194,7 @@ modem_deint:
|
||||
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
||||
esp_bt_controller_log_deinit();
|
||||
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
||||
esp_phy_modem_deinit();
|
||||
esp_phy_modem_deinit(SLEEP_MODEM_BT);
|
||||
modem_clock_deselect_lp_clock_source(PERIPH_BT_MODULE);
|
||||
modem_clock_module_disable(PERIPH_BT_MODULE);
|
||||
|
||||
@@ -1219,7 +1219,7 @@ esp_err_t esp_bt_controller_deinit(void)
|
||||
|
||||
os_msys_deinit();
|
||||
|
||||
esp_phy_modem_deinit();
|
||||
esp_phy_modem_deinit(SLEEP_MODEM_BT);
|
||||
modem_clock_deselect_lp_clock_source(PERIPH_BT_MODULE);
|
||||
modem_clock_module_disable(PERIPH_BT_MODULE);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user