From 05680897bd9860fc98b26d753247e04461a85a93 Mon Sep 17 00:00:00 2001 From: Andrey Klimov Date: Thu, 17 Oct 2019 13:22:09 +0300 Subject: [PATCH] added weak attribute to UART handlers added __weak__ attribute to UART handlers to allow custom handlers override default UART routine That is vital changes to implement DMX512 protocol over UART (for example) without manual changes of CORE libraries --- variants/arduino_due_x/variant.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/variants/arduino_due_x/variant.cpp b/variants/arduino_due_x/variant.cpp index 7a0de80a..abccf6bd 100644 --- a/variants/arduino_due_x/variant.cpp +++ b/variants/arduino_due_x/variant.cpp @@ -336,21 +336,25 @@ 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(); } + // ---------------------------------------------------------------------------- void serialEventRun(void)