esp_system: move sleep modes to esp_hw_support, power down light sleep to esp_pm

This commit is contained in:
Renz Bagaporo
2021-03-10 21:55:49 +08:00
parent c112bd8b57
commit 586023790e
63 changed files with 107 additions and 117 deletions

View File

@@ -60,7 +60,6 @@
#include "esp32c3/clk.h"
#include "esp32c3/pm.h"
#include "driver/gpio.h"
#include "esp_private/sleep_modes.h"
#endif
#define MHZ (1000000)
@@ -307,7 +306,7 @@ esp_err_t esp_pm_configure(const void* vconfig)
esp_sleep_enable_gpio_switch(config->light_sleep_enable);
#endif
#if CONFIG_ESP_SYSTEM_PM_POWER_DOWN_CPU && SOC_PM_SUPPORT_CPU_PD
#if CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP && SOC_PM_SUPPORT_CPU_PD
esp_err_t ret = esp_sleep_cpu_pd_low_init(config->light_sleep_enable);
if (config->light_sleep_enable && ret != ESP_OK) {
ESP_LOGW(TAG, "Failed to enable CPU power down during light sleep.");