From 9e7aed4aa7cfd863d450125ccddab5996229678e Mon Sep 17 00:00:00 2001 From: klassents Date: Thu, 10 Oct 2024 21:53:28 +0700 Subject: [PATCH] =?UTF-8?q?=D0=BF=D0=B5=D1=80=D0=B5=D0=B8=D0=BC=D0=B5?= =?UTF-8?q?=D0=BD=D0=BE=D0=B2=D0=B0=D0=BB=D0=B0=20=D0=BE=D0=B1=D1=80=D0=B0?= =?UTF-8?q?=D0=B1=D0=BE=D1=82=D1=87=D0=B8=D0=BA=D0=B8=20=D0=BF=D1=80=D0=B5?= =?UTF-8?q?=D1=80=D1=8B=D0=B2=D0=B0=D0=BD=D0=B8=D0=B9=20=D0=B2=D1=81=D0=B5?= =?UTF-8?q?=20=D0=BA=20=D0=BE=D0=B4=D0=BD=D0=BE=D0=BC=D1=83=20=D0=B2=D0=B8?= =?UTF-8?q?=D0=B4=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cores/arduino/HardwareSerial.cpp | 2 +- cores/arduino/WInterrupts.c | 4 ++-- cores/arduino/trap_handler.c | 14 +++++++------- libraries/SoftwareSerial/src/SoftwareSerial.cpp | 6 +++--- libraries/Wire/src/Wire.cpp | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/cores/arduino/HardwareSerial.cpp b/cores/arduino/HardwareSerial.cpp index 0ee296f..3a6f656 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_handler_wrapper(uint8_t uartNumInt) +extern "C" void serial_interrupt_handler(uint8_t uartNumInt) { if (uartNumInt == 0) { diff --git a/cores/arduino/WInterrupts.c b/cores/arduino/WInterrupts.c index 78bcd08..c1c92f4 100644 --- a/cores/arduino/WInterrupts.c +++ b/cores/arduino/WInterrupts.c @@ -114,8 +114,8 @@ void enableInterrupt(uint8_t interruptNum) } // common gpio interrupt handler -void gpio_interrupts_handler(void) __attribute__((noinline, section(".ram_text"))); -void gpio_interrupts_handler(void) +void gpio_interrupt_handler(void) __attribute__((noinline, section(".ram_text"))); +void gpio_interrupt_handler(void) { // go through all the interrupts and call the handler for the triggered line for (uint8_t i = 0; i < EXTERNAL_NUM_INTERRUPTS; i++) diff --git a/cores/arduino/trap_handler.c b/cores/arduino/trap_handler.c index 9e6fc21..4b709df 100644 --- a/cores/arduino/trap_handler.c +++ b/cores/arduino/trap_handler.c @@ -2,10 +2,10 @@ #include "wiring_LL.h" // isr functions -extern void serial_handler_wrapper(uint8_t uartNumInt); -extern void gpio_interrupts_handler(void); +extern void serial_interrupt_handler(uint8_t uartNumInt); +extern void gpio_interrupt_handler(void); extern void tone_interrupt_handler(void); -void __attribute__((weak)) wire_handler_wrapper(void) +void __attribute__((weak)) wire_interrupt_handler(void) { // dummy function for case when wire library is not in use } @@ -15,7 +15,7 @@ void __attribute__((noinline, section(".ram_text"))) trap_handler(void) { // gpio interrupt if (EPIC_CHECK_GPIO_IRQ()) - gpio_interrupts_handler(); + gpio_interrupt_handler(); // tone timer interrupt if (EPIC_CHECK_TIMER16_1()) @@ -23,15 +23,15 @@ void __attribute__((noinline, section(".ram_text"))) trap_handler(void) // uart0 interrupt if (EPIC_CHECK_UART_0()) - serial_handler_wrapper(0); + serial_interrupt_handler(0); // uart1 interrupt if (EPIC_CHECK_UART_1()) - serial_handler_wrapper(1); + serial_interrupt_handler(1); // i2c interrupt if (EPIC_CHECK_I2C_1()) - wire_handler_wrapper(); + wire_interrupt_handler(); // reset all interrupts EPIC_CLEAR_ALL(); diff --git a/libraries/SoftwareSerial/src/SoftwareSerial.cpp b/libraries/SoftwareSerial/src/SoftwareSerial.cpp index 001eb0b..3bee87d 100644 --- a/libraries/SoftwareSerial/src/SoftwareSerial.cpp +++ b/libraries/SoftwareSerial/src/SoftwareSerial.cpp @@ -145,8 +145,8 @@ void SoftwareSerial::handle_interrupt() // .ram_text } } -extern "C" void softSerial_handler_wrapper(void) __attribute__((noinline, section(".ram_text"))); -extern "C" void softSerial_handler_wrapper(void) +extern "C" void softSerial_interrupt_handler(void) __attribute__((noinline, section(".ram_text"))); +extern "C" void softSerial_interrupt_handler(void) { SoftwareSerial::handle_interrupt(); } @@ -197,7 +197,7 @@ void SoftwareSerial::setRX(uint8_t rx) _int_maskLine = digitalPinToGpioIntLine(_receivePin); // attach interrupt to rx pin if available - attachInterrupt(digitalPinToInterrupt(_receivePin), softSerial_handler_wrapper, _inverse_logic ? RISING : FALLING); + attachInterrupt(digitalPinToInterrupt(_receivePin), softSerial_interrupt_handler, _inverse_logic ? RISING : FALLING); // turn on pull up for rx if logic is not inverse if (!_inverse_logic) { diff --git a/libraries/Wire/src/Wire.cpp b/libraries/Wire/src/Wire.cpp index f5824d0..1593e47 100644 --- a/libraries/Wire/src/Wire.cpp +++ b/libraries/Wire/src/Wire.cpp @@ -309,7 +309,7 @@ void TwoWire::onRequest( void (*function)(void) ) } // С function for trap handler -extern "C" void wire_handler_wrapper(void) +extern "C" void wire_interrupt_handler(void) { twi_interruptHandler(); }