Skip to content

Commit b8a95de

Browse files
committed
Reviewer noticed that esp_suspend is part of the core for awhile now and should be used unconditionally.
1 parent 9847e1f commit b8a95de

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

cores/esp8266/Esp.cpp

-12
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,7 @@ bool EspClass::forcedModemSleep(uint32_t duration_us, fpm_wakeup_cb wakeupCb)
167167
return false;
168168
}
169169
// SDK turns on forced modem sleep in idle task
170-
#ifdef HAVE_ESP_SUSPEND
171170
esp_delay(10);
172-
#else
173-
delay(10);
174-
#endif
175171
return true;
176172
}
177173

@@ -256,11 +252,7 @@ void EspClass::forcedLightSleepEnd(bool cancel)
256252
{
257253
if (!cancel) {
258254
// SDK turns on forced light sleep in idle task
259-
#ifdef HAVE_ESP_SUSPEND
260255
esp_suspend();
261-
#else
262-
esp_yield();
263-
#endif
264256
}
265257
#ifdef DEBUG_SERIAL
266258
walk_timer_list();
@@ -275,11 +267,7 @@ void EspClass::forcedLightSleepEnd(bool cancel)
275267
saved_sleep_type = NONE_SLEEP_T;
276268
if (cancel) {
277269
// let the SDK catch up in idle task
278-
#ifdef HAVE_ESP_SUSPEND
279270
esp_delay(10);
280-
#else
281-
delay(10);
282-
#endif
283271
}
284272
}
285273

0 commit comments

Comments
 (0)