Skip to content

making UART/USART handler weak to allow custom external handlers #3023

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions hardware/arduino/sam/variants/arduino_due_x/variant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ void serialEvent() __attribute__((weak));
void serialEvent() { }

// IT handlers
void UART_Handler(void) __attribute__((weak));
void UART_Handler(void)
{
Serial.IrqHandler();
Expand Down Expand Up @@ -333,16 +334,19 @@ void serialEvent3() __attribute__((weak));
void serialEvent3() { }

// IT handlers
void USART0_Handler(void) __attribute__((weak));
void USART0_Handler(void)
{
Serial1.IrqHandler();
}

void USART1_Handler(void) __attribute__((weak));
void USART1_Handler(void)
{
Serial2.IrqHandler();
}

void USART3_Handler(void) __attribute__((weak));
void USART3_Handler(void)
{
Serial3.IrqHandler();
Expand Down