mirror of
				https://github.com/espressif/esp-idf.git
				synced 2025-11-04 06:11:06 +00:00 
			
		
		
		
	esp_pm: allow dfs to swith down alltime if no lightsleep (backport to v4.3)
This commit is contained in:
		@@ -580,10 +580,12 @@ esp_err_t esp_pm_unregister_skip_light_sleep_callback(skip_light_sleep_cb_t cb)
 | 
			
		||||
 | 
			
		||||
static inline bool IRAM_ATTR periph_should_skip_light_sleep(void)
 | 
			
		||||
{
 | 
			
		||||
    for (int i = 0; i < PERIPH_SKIP_LIGHT_SLEEP_NO; i++) {
 | 
			
		||||
        if (s_periph_skip_light_sleep_cb[i]) {
 | 
			
		||||
            if (s_periph_skip_light_sleep_cb[i]() == true) {
 | 
			
		||||
                return true;
 | 
			
		||||
    if (s_light_sleep_en) {
 | 
			
		||||
        for (int i = 0; i < PERIPH_SKIP_LIGHT_SLEEP_NO; i++) {
 | 
			
		||||
            if (s_periph_skip_light_sleep_cb[i]) {
 | 
			
		||||
                if (s_periph_skip_light_sleep_cb[i]() == true) {
 | 
			
		||||
                    return true;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user