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 @@ -119,22 +119,19 @@ void app_main(void)
119119 // Configure dynamic frequency scaling:
120120 // maximum and minimum frequencies are set in sdkconfig,
121121 // automatic light sleep is enabled if tickless idle support is enabled.
122- #ifdef CONFIG_IDF_TARGET_ESP32S2
123- esp_pm_config_esp32s2_t pm_config = {};
124- #elif CONFIG_IDF_TARGET_ESP32C3
125- esp_pm_config_esp32c3_t pm_config = {};
126- #else
127- esp_pm_config_esp32_t pm_config = {};
128- #endif
122+ esp_pm_config_t pm_config = {};
129123 pm_config .max_freq_mhz = 240 ;
124+
130125#ifdef CONFIG_IDF_TARGET_ESP32S2
131126 pm_config .min_freq_mhz = 10 ;
132127#else
133128 pm_config .min_freq_mhz = 20 ;
134- #endif
129+ #endif /* CONFIG_IDF_TARGET_ESP32S2 */
130+
135131#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
136132 pm_config .light_sleep_enable = true;
137- #endif
133+ #endif /* CONFIG_FREERTOS_USE_TICKLESS_IDLE */
134+
138135 ESP_ERROR_CHECK (esp_pm_configure (& pm_config ));
139136#endif /* CONFIG_PM_ENABLE */
140137
You can’t perform that action at this time.
0 commit comments