From 3f761e1a833b0088dac4171f16b6eb0689379f56 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Fri, 22 Sep 2017 11:41:30 +0800 Subject: [PATCH] light sleep: make sure code to be placed into IRAM is not inlined --- components/esp32/sleep_modes.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/esp32/sleep_modes.c b/components/esp32/sleep_modes.c index e305b96eb..6924b2ec2 100644 --- a/components/esp32/sleep_modes.c +++ b/components/esp32/sleep_modes.c @@ -197,7 +197,10 @@ static void rtc_wdt_disable() * Helper function which handles entry to and exit from light sleep * Placed into IRAM as flash may need some time to be powered on. */ -static esp_err_t IRAM_ATTR esp_light_sleep_inner(uint32_t pd_flags, +static esp_err_t esp_light_sleep_inner(uint32_t pd_flags, + rtc_cpu_freq_t cpu_freq, uint32_t flash_enable_time_us) IRAM_ATTR __attribute__((noinline)); + +static esp_err_t esp_light_sleep_inner(uint32_t pd_flags, rtc_cpu_freq_t cpu_freq, uint32_t flash_enable_time_us) { // Enter sleep