1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-05 12:42:22 +03:00

Due to 3rd party use of symbol optimistic_yield without #include <Arduino>, have to resort to preprocessor definition for inlining.

This commit is contained in:
Dirk O. Kaar
2019-12-02 11:58:45 +01:00
parent 3767791fbc
commit 554435780b
2 changed files with 13 additions and 7 deletions

View File

@ -133,6 +133,17 @@ extern "C" void __optimistic_yield(uint32_t intvl_cycles) {
}
}
#undef optimistic_yield
extern "C" void optimistic_yield(uint32_t interval_us) {
__optimistic_yield(interval_us *
#if defined(F_CPU)
clockCyclesPerMicrosecond()
#else
getCpuFreqMHz()
#endif
);
}
// Replace ets_intr_(un)lock with nestable versions
extern "C" void IRAM_ATTR ets_intr_lock() {
if (ets_intr_lock_stack_ptr < ETS_INTR_LOCK_NEST_MAX)