Skip to content

Commit

Permalink
Use Serial1 without Adafruit_TinyUSB
Browse files Browse the repository at this point in the history
  • Loading branch information
arms22 committed Jun 17, 2022
1 parent d75bb2a commit 1f4f503
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cores/nRF5/Uart.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,18 @@
#include "wiring_private.h"


#ifdef USE_TINYUSB
uint32_t tud_cdc_n_available(uint8_t itf) __attribute__((weak));
#endif

void serialEventRun(void)
{
#ifdef NRF52832_XXAA
if (serialEvent && Serial.available() ) serialEvent();
#endif
#ifdef USE_TINYUSB
if (serialEvent && tud_cdc_n_available && tud_cdc_n_available(0)) serialEvent();
#endif

#if defined(PIN_SERIAL1_RX) && defined(PIN_SERIAL1_TX)
if (serialEvent1 && Serial1.available() ) serialEvent1();
Expand Down

0 comments on commit 1f4f503

Please sign in to comment.