mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-23 19:21:59 +03:00
never yield within an ISR
This commit is contained in:
@ -88,7 +88,8 @@ extern "C" void __yield() {
|
||||
extern "C" void yield(void) __attribute__ ((weak, alias("__yield")));
|
||||
|
||||
extern "C" void optimistic_yield() {
|
||||
if (system_get_time() - g_micros_at_last_task_yield > OPTIMISTIC_YIELD_TIME_US)
|
||||
if (!ETS_INTR_WITHINISR() &&
|
||||
(system_get_time() - g_micros_at_last_task_yield) > OPTIMISTIC_YIELD_TIME_US)
|
||||
{
|
||||
__yield();
|
||||
}
|
||||
|
Reference in New Issue
Block a user