Skip to content

Commit

Permalink
Merge pull request #1 from adamvoss/serialEventUSB
Browse files Browse the repository at this point in the history
add serialEventUSB to USART0_Handler
  • Loading branch information
Macchina authored and adamvoss committed Jul 31, 2017
2 parents ffab321 + dcb385d commit 86cf8cb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sam/variants/m2/variant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,9 @@ UARTClass Serial(UART, UART_IRQn, ID_UART, &rx_buffer1, &tx_buffer1);
void serialEvent() __attribute__((weak));
void serialEvent() { }

void serialEventUSB() __attribute__((weak));
void serialEventUSB() { }

// IT handlers
void UART_Handler(void)
{
Expand Down Expand Up @@ -395,6 +398,7 @@ void serialEventRun(void)
if (Serial1.available()) serialEvent1();
if (Serial2.available()) serialEvent2();
if (Serial3.available()) serialEvent3();
if (SerialUSB.available()) serialEventUSB();
}

// ----------------------------------------------------------------------------
Expand Down

0 comments on commit 86cf8cb

Please sign in to comment.