dev_beta_softSerial #4
No files matched your search
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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++)
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user