瀏覽代碼

Add static qualifier to s_light_sleep_wakeup variable to prevent it from being global.

Closes https://github.com/espressif/esp-idf/pull/2793
Michael Reutman 7 年之前
父節點
當前提交
02da4154a1
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      components/esp32/sleep_modes.c

+ 3 - 1
components/esp32/sleep_modes.c

@@ -81,7 +81,9 @@ static sleep_config_t s_config = {
     .wakeup_triggers = 0
     .wakeup_triggers = 0
 };
 };
 
 
-bool s_light_sleep_wakeup = false;
+/* Internal variable used to track if light sleep wakeup sources are to be
+   expected when determining wakeup cause. */
+static bool s_light_sleep_wakeup = false;
 
 
 /* Updating RTC_MEMORY_CRC_REG register via set_rtc_memory_crc()
 /* Updating RTC_MEMORY_CRC_REG register via set_rtc_memory_crc()
    is not thread-safe. */
    is not thread-safe. */