File tree Expand file tree Collapse file tree
examples/low_consumption/main Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,11 +21,7 @@ else()
2121set (submake "make" )
2222endif ()
2323
24- if (${IDF_VERSION_MAJOR} EQUAL 5)
25- set (CMAKE_C_STANDARD 17)
26- else ()
27- set (CMAKE_C_STANDARD 11)
28- endif ()
24+ set (CMAKE_C_STANDARD 17)
2925
3026set (APP_COLCON_META "${PROJECT_DIR} /app-colcon.meta" )
3127if (NOT EXISTS "${APP_COLCON_META} " )
Original file line number Diff line number Diff line change @@ -120,22 +120,19 @@ void app_main(void)
120120 // Configure dynamic frequency scaling:
121121 // maximum and minimum frequencies are set in sdkconfig,
122122 // automatic light sleep is enabled if tickless idle support is enabled.
123- #ifdef CONFIG_IDF_TARGET_ESP32S2
124- esp_pm_config_esp32s2_t pm_config = {};
125- #elif CONFIG_IDF_TARGET_ESP32C3
126- esp_pm_config_esp32c3_t pm_config = {};
127- #else
128- esp_pm_config_esp32_t pm_config = {};
129- #endif
123+ esp_pm_config_t pm_config = {};
130124 pm_config .max_freq_mhz = 240 ;
125+
131126#ifdef CONFIG_IDF_TARGET_ESP32S2
132127 pm_config .min_freq_mhz = 10 ;
133128#else
134129 pm_config .min_freq_mhz = 20 ;
135- #endif
130+ #endif /* CONFIG_IDF_TARGET_ESP32S2 */
131+
136132#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
137133 pm_config .light_sleep_enable = true;
138- #endif
134+ #endif /* CONFIG_FREERTOS_USE_TICKLESS_IDLE */
135+
139136 ESP_ERROR_CHECK (esp_pm_configure (& pm_config ));
140137#endif /* CONFIG_PM_ENABLE */
141138
You can’t perform that action at this time.
0 commit comments