void serialEventRun(void) { if (Serial.available()) serialEvent(); if (Serial1.available()) serialEvent1(); if (Serial2.available()) serialEvent2(); if (Serial3.available()) serialEvent3(); }
void serialEventRun(void) { #ifdef serialEvent_implemented if (Serial.available()) serialEvent(); #endif #ifdef serialEvent1_implemented if (Serial1.available()) serialEvent1(); #endif #ifdef serialEvent2_implemented if (Serial2.available()) serialEvent2(); #endif #ifdef serialEvent3_implemented if (Serial3.available()) serialEvent3(); #endif #ifdef transmissionFinishedEvent0_implemented if (txDataFinished0) {txDataFinished0 = 0; transmissionFinishedEvent();} #endif #ifdef transmissionFinishedEvent1_implemented if (txDataFinished1) {txDataFinished1 = 0; transmissionFinishedEvent1();} #endif #ifdef transmissionFinishedEvent2_implemented if (txDataFinished2) {txDataFinished2 = 0; transmissionFinishedEvent2();} #endif #ifdef transmissionFinishedEvent3_implemented if (txDataFinished3) {txDataFinished3 = 0; transmissionFinishedEvent3();} #endif }
static void serial_event_3(uint16_t value) { serial3_rx_buffer[serial3_rx_index] = (uint8_t)value; serialEvent3(); serial3_rx_index = (serial3_rx_index + 1) % SERIAL_RX_BUFSIZE; }
void serialEventRun(void) { if (Serial.available()) serialEvent(); if (Serial1.available()) serialEvent1(); if (Serial2.available()) serialEvent2(); if (Serial3.available()) serialEvent3(); if (Serial4.available()) serialEvent4(); if (Serial5.available()) serialEvent5(); if (Serial6.available()) serialEvent6(); if (Serial7.available()) serialEvent7(); }
void yield(void) { static uint8_t running=0; if (running) return; // TODO: does this need to be atomic? running = 1; if (Serial.available()) serialEvent(); if (Serial1.available()) serialEvent1(); if (Serial2.available()) serialEvent2(); if (Serial3.available()) serialEvent3(); running = 0; };
void serialEventRun(void) { #ifdef serialEvent_implemented if (Serial.available()) serialEvent(); #endif #ifdef serialEvent1_implemented if (Serial1.available()) serialEvent1(); #endif #ifdef serialEvent2_implemented if (Serial2.available()) serialEvent2(); #endif #ifdef serialEvent3_implemented if (Serial3.available()) serialEvent3(); #endif }
void serialEventRun(void) { #if defined(HAVE_HWSERIAL0) if (Serial0_available && serialEvent && Serial0_available()) serialEvent(); #endif #if defined(HAVE_HWSERIAL1) if (Serial1_available && serialEvent1 && Serial1_available()) serialEvent1(); #endif #if defined(HAVE_HWSERIAL2) if (Serial2_available && serialEvent2 && Serial2_available()) serialEvent2(); #endif #if defined(HAVE_HWSERIAL3) if (Serial3_available && serialEvent3 && Serial3_available()) serialEvent3(); #endif }
void yield(void) { static uint8_t running=0; if (running) return; // TODO: does this need to be atomic? 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; };