light sleep: libphy optimization for esp32c3

This commit is contained in:
Li Shuai
2021-01-19 14:57:52 +08:00
parent f168ac3b39
commit 27ddbf5fcc
4 changed files with 24 additions and 13 deletions

View File

@@ -239,6 +239,10 @@ IRAM_ATTR void esp_phy_disable(void)
if (s_phy_access_ref == 0) {
// Disable PHY and RF.
phy_close_rf();
#if CONFIG_IDF_TARGET_ESP32C3
// Disable PHY temperature sensor
phy_xpd_tsens();
#endif
#if CONFIG_IDF_TARGET_ESP32
// Update WiFi MAC time before disalbe WiFi/BT common peripheral clock
phy_update_wifi_mac_time(true, esp_timer_get_time());