mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
fix(phy): Fix ble phy_enable/disable api invoking issue for esp32c2,esp32h2 and esp32c6
This commit is contained in:
parent
9337525cdc
commit
0bbc2805fc
@ -240,7 +240,7 @@ struct ext_funcs_t ext_funcs_ro = {
|
||||
._ecc_gen_key_pair = esp_ecc_gen_key_pair,
|
||||
._ecc_gen_dh_key = esp_ecc_gen_dh_key,
|
||||
._esp_reset_rpa_moudle = esp_reset_rpa_moudle,
|
||||
._esp_bt_track_pll_cap = bt_track_pll_cap,
|
||||
._esp_bt_track_pll_cap = NULL,
|
||||
.magic = EXT_FUNC_MAGIC_VALUE,
|
||||
};
|
||||
|
||||
@ -465,7 +465,7 @@ IRAM_ATTR void controller_sleep_cb(uint32_t enable_tick, void *arg)
|
||||
r_ble_rtc_wake_up_state_clr();
|
||||
esp_pm_lock_release(s_pm_lock);
|
||||
#endif // CONFIG_PM_ENABLE
|
||||
esp_phy_disable();
|
||||
esp_phy_disable(PHY_MODEM_BT);
|
||||
s_ble_active = false;
|
||||
}
|
||||
|
||||
@ -474,7 +474,7 @@ IRAM_ATTR void controller_wakeup_cb(void *arg)
|
||||
if (s_ble_active) {
|
||||
return;
|
||||
}
|
||||
esp_phy_enable();
|
||||
esp_phy_enable(PHY_MODEM_BT);
|
||||
// need to check if need to call pm lock here
|
||||
#ifdef CONFIG_PM_ENABLE
|
||||
esp_pm_lock_acquire(s_pm_lock);
|
||||
@ -750,7 +750,7 @@ esp_err_t esp_bt_controller_enable(esp_bt_mode_t mode)
|
||||
esp_pm_lock_acquire(s_pm_lock);
|
||||
#endif // CONFIG_PM_ENABLE
|
||||
// init phy
|
||||
esp_phy_enable();
|
||||
esp_phy_enable(PHY_MODEM_BT);
|
||||
s_ble_active = true;
|
||||
}
|
||||
// init bb
|
||||
@ -772,7 +772,7 @@ error:
|
||||
coex_disable();
|
||||
#endif
|
||||
if (s_ble_active) {
|
||||
esp_phy_disable();
|
||||
esp_phy_disable(PHY_MODEM_BT);
|
||||
#if CONFIG_PM_ENABLE
|
||||
esp_pm_lock_release(s_pm_lock);
|
||||
#endif // CONFIG_PM_ENABLE
|
||||
@ -792,7 +792,7 @@ esp_err_t esp_bt_controller_disable(void)
|
||||
}
|
||||
|
||||
if (s_ble_active) {
|
||||
esp_phy_disable();
|
||||
esp_phy_disable(PHY_MODEM_BT);
|
||||
#if CONFIG_PM_ENABLE
|
||||
esp_pm_lock_release(s_pm_lock);
|
||||
#endif // CONFIG_PM_ENABLE
|
||||
|
@ -487,7 +487,7 @@ IRAM_ATTR void controller_sleep_cb(uint32_t enable_tick, void *arg)
|
||||
sleep_retention_do_extra_retention(true);
|
||||
#endif // SOC_PM_RETENTION_HAS_CLOCK_BUG
|
||||
#endif /* CONFIG_FREERTOS_USE_TICKLESS_IDLE */
|
||||
esp_phy_disable();
|
||||
esp_phy_disable(PHY_MODEM_BT);
|
||||
#ifdef CONFIG_PM_ENABLE
|
||||
esp_pm_lock_release(s_pm_lock);
|
||||
#endif // CONFIG_PM_ENABLE
|
||||
@ -506,7 +506,7 @@ IRAM_ATTR void controller_wakeup_cb(void *arg)
|
||||
sleep_retention_do_extra_retention(false);
|
||||
#endif /* CONFIG_FREERTOS_USE_TICKLESS_IDLE && SOC_PM_RETENTION_HAS_CLOCK_BUG */
|
||||
#endif //CONFIG_PM_ENABLE
|
||||
esp_phy_enable();
|
||||
esp_phy_enable(PHY_MODEM_BT);
|
||||
s_ble_active = true;
|
||||
}
|
||||
|
||||
@ -889,7 +889,7 @@ esp_err_t esp_bt_controller_enable(esp_bt_mode_t mode)
|
||||
#if CONFIG_PM_ENABLE
|
||||
esp_pm_lock_acquire(s_pm_lock);
|
||||
#endif // CONFIG_PM_ENABLE
|
||||
esp_phy_enable();
|
||||
esp_phy_enable(PHY_MODEM_BT);
|
||||
esp_btbb_enable();
|
||||
s_ble_active = true;
|
||||
}
|
||||
@ -910,7 +910,7 @@ error:
|
||||
#endif
|
||||
if (s_ble_active) {
|
||||
esp_btbb_disable();
|
||||
esp_phy_disable();
|
||||
esp_phy_disable(PHY_MODEM_BT);
|
||||
#if CONFIG_PM_ENABLE
|
||||
esp_pm_lock_release(s_pm_lock);
|
||||
#endif // CONFIG_PM_ENABLE
|
||||
@ -933,7 +933,7 @@ esp_err_t esp_bt_controller_disable(void)
|
||||
#endif
|
||||
if (s_ble_active) {
|
||||
esp_btbb_disable();
|
||||
esp_phy_disable();
|
||||
esp_phy_disable(PHY_MODEM_BT);
|
||||
#if CONFIG_PM_ENABLE
|
||||
esp_pm_lock_release(s_pm_lock);
|
||||
#endif // CONFIG_PM_ENABLE
|
||||
|
@ -473,7 +473,7 @@ IRAM_ATTR void controller_sleep_cb(uint32_t enable_tick, void *arg)
|
||||
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
|
||||
r_ble_rtc_wake_up_state_clr();
|
||||
#endif /* CONFIG_FREERTOS_USE_TICKLESS_IDLE */
|
||||
esp_phy_disable();
|
||||
esp_phy_disable(PHY_MODEM_BT);
|
||||
#ifdef CONFIG_PM_ENABLE
|
||||
esp_pm_lock_release(s_pm_lock);
|
||||
#endif // CONFIG_PM_ENABLE
|
||||
@ -489,7 +489,7 @@ IRAM_ATTR void controller_wakeup_cb(void *arg)
|
||||
esp_pm_lock_acquire(s_pm_lock);
|
||||
r_ble_rtc_wake_up_state_clr();
|
||||
#endif //CONFIG_PM_ENABLE
|
||||
esp_phy_enable();
|
||||
esp_phy_enable(PHY_MODEM_BT);
|
||||
s_ble_active = true;
|
||||
}
|
||||
|
||||
@ -867,7 +867,7 @@ esp_err_t esp_bt_controller_enable(esp_bt_mode_t mode)
|
||||
#if CONFIG_PM_ENABLE
|
||||
esp_pm_lock_acquire(s_pm_lock);
|
||||
#endif // CONFIG_PM_ENABLE
|
||||
esp_phy_enable();
|
||||
esp_phy_enable(PHY_MODEM_BT);
|
||||
s_ble_active = true;
|
||||
}
|
||||
esp_btbb_enable();
|
||||
@ -888,7 +888,7 @@ error:
|
||||
#endif
|
||||
esp_btbb_disable();
|
||||
if (s_ble_active) {
|
||||
esp_phy_disable();
|
||||
esp_phy_disable(PHY_MODEM_BT);
|
||||
#if CONFIG_PM_ENABLE
|
||||
esp_pm_lock_release(s_pm_lock);
|
||||
#endif // CONFIG_PM_ENABLE
|
||||
@ -911,7 +911,7 @@ esp_err_t esp_bt_controller_disable(void)
|
||||
#endif
|
||||
esp_btbb_disable();
|
||||
if (s_ble_active) {
|
||||
esp_phy_disable();
|
||||
esp_phy_disable(PHY_MODEM_BT);
|
||||
#if CONFIG_PM_ENABLE
|
||||
esp_pm_lock_release(s_pm_lock);
|
||||
#endif // CONFIG_PM_ENABLE
|
||||
|
Loading…
x
Reference in New Issue
Block a user