Pārlūkot izejas kodu

EventResponder runFromYield shortcut

Add quick test at start of function to return if there are no events pending.

Do this before checking if in ISR and the like.  Cut timing down a lot in yield.
teensy4-core
Kurt Eckhardt pirms 5 gadiem
vecāks
revīzija
9828bd7188
1 mainītis faili ar 1 papildinājumiem un 0 dzēšanām
  1. +1
    -0
      teensy4/EventResponder.h

+ 1
- 0
teensy4/EventResponder.h Parādīt failu

@@ -170,6 +170,7 @@ public:
EventResponder * waitForEvent(EventResponder *list, int listsize, int timeout);

static void runFromYield() {
if (!firstYield) return;
// First, check if yield was called from an interrupt
// never call normal handler functions from any interrupt context
uint32_t ipsr;

Notiek ielāde…
Atcelt
Saglabāt