переименовала обработчики прерываний все к одному виду

This commit is contained in:
klassents committed 2024-10-10 21:53:28 +07:00
1 parent d7010fba6e
commit 9e7aed4aa7
5 files changed
+14 -14

No files matched your search

+1 -1
View File
@@ -140,7 +140,7 @@ void HardwareSerial::rx_complete_irq(void)
} }
// wrapper for use in С-files // 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) if (uartNumInt == 0)
{ {
+2 -2
View File
@@ -114,8 +114,8 @@ void enableInterrupt(uint8_t interruptNum)
} }
// common gpio interrupt handler // common gpio interrupt handler
void gpio_interrupts_handler(void) __attribute__((noinline, section(".ram_text"))); void gpio_interrupt_handler(void) __attribute__((noinline, section(".ram_text")));
void gpio_interrupts_handler(void) void gpio_interrupt_handler(void)
{ {
// go through all the interrupts and call the handler for the triggered line // go through all the interrupts and call the handler for the triggered line
for (uint8_t i = 0; i < EXTERNAL_NUM_INTERRUPTS; i++) for (uint8_t i = 0; i < EXTERNAL_NUM_INTERRUPTS; i++)
+7 -7
View File
@@ -2,10 +2,10 @@
#include "wiring_LL.h" #include "wiring_LL.h"
// isr functions // isr functions
extern void serial_handler_wrapper(uint8_t uartNumInt); extern void serial_interrupt_handler(uint8_t uartNumInt);
extern void gpio_interrupts_handler(void); extern void gpio_interrupt_handler(void);
extern void tone_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 // 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 // gpio interrupt
if (EPIC_CHECK_GPIO_IRQ()) if (EPIC_CHECK_GPIO_IRQ())
gpio_interrupts_handler(); gpio_interrupt_handler();
// tone timer interrupt // tone timer interrupt
if (EPIC_CHECK_TIMER16_1()) if (EPIC_CHECK_TIMER16_1())
@@ -23,15 +23,15 @@ void __attribute__((noinline, section(".ram_text"))) trap_handler(void)
// uart0 interrupt // uart0 interrupt
if (EPIC_CHECK_UART_0()) if (EPIC_CHECK_UART_0())
serial_handler_wrapper(0); serial_interrupt_handler(0);
// uart1 interrupt // uart1 interrupt
if (EPIC_CHECK_UART_1()) if (EPIC_CHECK_UART_1())
serial_handler_wrapper(1); serial_interrupt_handler(1);
// i2c interrupt // i2c interrupt
if (EPIC_CHECK_I2C_1()) if (EPIC_CHECK_I2C_1())
wire_handler_wrapper(); wire_interrupt_handler();
// reset all interrupts // reset all interrupts
EPIC_CLEAR_ALL(); EPIC_CLEAR_ALL();
@@ -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_interrupt_handler(void) __attribute__((noinline, section(".ram_text")));
extern "C" void softSerial_handler_wrapper(void) extern "C" void softSerial_interrupt_handler(void)
{ {
SoftwareSerial::handle_interrupt(); SoftwareSerial::handle_interrupt();
} }
@@ -197,7 +197,7 @@ void SoftwareSerial::setRX(uint8_t rx)
_int_maskLine = digitalPinToGpioIntLine(_receivePin); _int_maskLine = digitalPinToGpioIntLine(_receivePin);
// attach interrupt to rx pin if available // 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 // turn on pull up for rx if logic is not inverse
if (!_inverse_logic) if (!_inverse_logic)
{ {
+1 -1
View File
@@ -309,7 +309,7 @@ void TwoWire::onRequest( void (*function)(void) )
} }
// С function for trap handler // С function for trap handler
extern "C" void wire_handler_wrapper(void) extern "C" void wire_interrupt_handler(void)
{ {
twi_interruptHandler(); twi_interruptHandler();
} }