fix(esp_hw_support): fix modem power enable failed after modem state wakeup

This commit is contained in:
wuzhenghui
2024-12-23 14:49:29 +08:00
parent 8c1e9489e5
commit a6de0b8446
4 changed files with 31 additions and 6 deletions

View File

@@ -1,14 +1,19 @@
/*
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdint.h>
#include "sdkconfig.h"
#include "esp_log.h"
#include "esp_timer.h"
#include "esp_phy_init.h"
#include "esp_private/phy.h"
#include <stdint.h>
#if CONFIG_ESP_WIFI_ENHANCED_LIGHT_SLEEP
#include "hal/temperature_sensor_ll.h"
#endif
static volatile uint16_t s_phy_modem_flag = 0;
@@ -119,3 +124,10 @@ esp_phy_modem_t phy_get_modem_flag(void)
{
return s_phy_modem_flag;
}
#if CONFIG_ESP_WIFI_ENHANCED_LIGHT_SLEEP
void phy_wakeup_from_modem_state_extra_init(void)
{
temperature_sensor_ll_enable(true);
}
#endif