-
-
- #include <Arduino.h>
- #include "EventResponder.h"
-
- void yield(void) __attribute__ ((weak));
- void yield(void)
- {
- static uint8_t running=0;
-
- if (running) return;
- running = 1;
- if (Serial.available()) serialEvent();
- if (Serial1.available()) serialEvent1();
- if (Serial2.available()) serialEvent2();
- if (Serial3.available()) serialEvent3();
- #ifdef HAS_KINETISK_UART3
- if (Serial4.available()) serialEvent4();
- #endif
- #ifdef HAS_KINETISK_UART4
- if (Serial5.available()) serialEvent5();
- #endif
- #if defined(HAS_KINETISK_UART5) || defined (HAS_KINETISK_LPUART0)
- if (Serial6.available()) serialEvent6();
- #endif
- running = 0;
- EventResponder::runFromYield();
- };
|