Sleep: fix wrong debug level

Fix usage of ESP_LOGD in sleep_modes.c which triggers a panic when
used in debug log level.

* Closes https://github.com/espressif/esp-idf/issues/7942
pull/7964/head
Omar Chebib 2021-11-22 10:36:46 +08:00
rodzic 0c8fb540b2
commit e615a9546b
1 zmienionych plików z 4 dodań i 3 usunięć

Wyświetl plik

@ -1324,11 +1324,12 @@ static uint32_t get_power_down_flags(void)
#endif
const char *option_str[] = {"OFF", "ON", "AUTO(OFF)" /* Auto works as OFF */};
ESP_LOGD(TAG, "RTC_PERIPH: %s", option_str[s_config.pd_options[ESP_PD_DOMAIN_RTC_PERIPH]]);
/* This function is called from a critical section, log with ESP_EARLY_LOGD. */
ESP_EARLY_LOGD(TAG, "RTC_PERIPH: %s", option_str[s_config.pd_options[ESP_PD_DOMAIN_RTC_PERIPH]]);
#if SOC_RTC_SLOW_MEM_SUPPORTED
ESP_LOGD(TAG, "RTC_SLOW_MEM: %s", option_str[s_config.pd_options[ESP_PD_DOMAIN_RTC_SLOW_MEM]]);
ESP_EARLY_LOGD(TAG, "RTC_SLOW_MEM: %s", option_str[s_config.pd_options[ESP_PD_DOMAIN_RTC_SLOW_MEM]]);
#endif
ESP_LOGD(TAG, "RTC_FAST_MEM: %s", option_str[s_config.pd_options[ESP_PD_DOMAIN_RTC_FAST_MEM]]);
ESP_EARLY_LOGD(TAG, "RTC_FAST_MEM: %s", option_str[s_config.pd_options[ESP_PD_DOMAIN_RTC_FAST_MEM]]);
// Prepare flags based on the selected options
uint32_t pd_flags = 0;