diff --git a/cores/arduino/HardwareSerial.cpp b/cores/arduino/HardwareSerial.cpp index 3a6f656..87794aa 100644 --- a/cores/arduino/HardwareSerial.cpp +++ b/cores/arduino/HardwareSerial.cpp @@ -140,7 +140,7 @@ void HardwareSerial::rx_complete_irq(void) } // wrapper for use in ะก-files -extern "C" void serial_interrupt_handler(uint8_t uartNumInt) +extern "C" void __attribute__((optimize("O3"))) serial_interrupt_handler(uint8_t uartNumInt) { if (uartNumInt == 0) { diff --git a/cores/arduino/HardwareSerial.h b/cores/arduino/HardwareSerial.h index d763cd6..7ff9700 100644 --- a/cores/arduino/HardwareSerial.h +++ b/cores/arduino/HardwareSerial.h @@ -100,7 +100,7 @@ class HardwareSerial : public Stream using Print::write; // pull in write(str) operator bool() { return isInited; } - void rx_complete_irq(void); + void rx_complete_irq(void) __attribute__((optimize("O3"))); }; extern HardwareSerial Serial; diff --git a/cores/arduino/WInterrupts.c b/cores/arduino/WInterrupts.c index c1c92f4..472ab82 100644 --- a/cores/arduino/WInterrupts.c +++ b/cores/arduino/WInterrupts.c @@ -114,7 +114,7 @@ void enableInterrupt(uint8_t interruptNum) } // common gpio interrupt handler -void gpio_interrupt_handler(void) __attribute__((noinline, section(".ram_text"))); +void gpio_interrupt_handler(void) __attribute__((noinline, section(".ram_text"), optimize("O3"))); void gpio_interrupt_handler(void) { // go through all the interrupts and call the handler for the triggered line