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:
@ -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)
|
||||
|
Reference in New Issue
Block a user