Modified to be compatible with the new version of sdk, compatible with esp32s3

This commit is contained in:
lewis
2022-09-03 23:38:40 +08:00
parent 8d5ffb7262
commit f767fd5075
8 changed files with 127 additions and 6 deletions

View File

@@ -284,7 +284,12 @@ void enableModemSleep()
{
static esp_pm_config_esp32_t esp32_config; // filled with zeros because bss
#if CONFIG_IDF_TARGET_ESP32S3
esp32_config.max_freq_mhz = CONFIG_ESP32S3_DEFAULT_CPU_FREQ_MHZ;
#else
esp32_config.max_freq_mhz = CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ;
#endif
esp32_config.min_freq_mhz = 20; // 10Mhz is minimum recommended
esp32_config.light_sleep_enable = false;
int rv = esp_pm_configure(&esp32_config);