Merge branch 'bugfix/fix_deprecated_warning_with_dfs_init_auto_config_v3.3' into 'release/v3.3'

cpu_start: fix warnings with CONFIG_PM_DFS_INIT_AUTO option (v3.3)

See merge request idf/esp-idf!4790
This commit is contained in:
Jiang Jiang Jian 2019-04-16 20:32:51 +08:00
commit 208d87742c

View File

@ -393,11 +393,10 @@ void start_cpu0_default(void)
#ifdef CONFIG_PM_ENABLE #ifdef CONFIG_PM_ENABLE
esp_pm_impl_init(); esp_pm_impl_init();
#ifdef CONFIG_PM_DFS_INIT_AUTO #ifdef CONFIG_PM_DFS_INIT_AUTO
rtc_cpu_freq_t max_freq; int xtal_freq = (int) rtc_clk_xtal_freq_get();
rtc_clk_cpu_freq_from_mhz(CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ, &max_freq);
esp_pm_config_esp32_t cfg = { esp_pm_config_esp32_t cfg = {
.max_cpu_freq = max_freq, .max_freq_mhz = CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ,
.min_cpu_freq = RTC_CPU_FREQ_XTAL .min_freq_mhz = xtal_freq,
}; };
esp_pm_configure(&cfg); esp_pm_configure(&cfg);
#endif //CONFIG_PM_DFS_INIT_AUTO #endif //CONFIG_PM_DFS_INIT_AUTO