mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-10 12:53:29 +00:00
Power Management: power up or down wifi power domain when wifi init or deinit
This commit is contained in:
@@ -125,6 +125,7 @@ esp_err_t esp_wifi_deinit(void)
|
||||
esp_unregister_mac_bb_pd_callback(pm_mac_sleep);
|
||||
esp_unregister_mac_bb_pu_callback(pm_mac_wakeup);
|
||||
#endif
|
||||
esp_wifi_power_domain_off();
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -169,6 +170,7 @@ static void esp_wifi_config_info(void)
|
||||
|
||||
esp_err_t esp_wifi_init(const wifi_init_config_t *config)
|
||||
{
|
||||
esp_wifi_power_domain_on();
|
||||
#ifdef CONFIG_PM_ENABLE
|
||||
if (s_wifi_modem_sleep_lock == NULL) {
|
||||
esp_err_t err = esp_pm_lock_create(ESP_PM_APB_FREQ_MAX, 0, "wifi",
|
||||
|
Reference in New Issue
Block a user