4#include <Settings/NamespaceSettings.hpp>
6#ifdef ARDUINO_ARCH_NRF52840
7#include <pins_arduino.h>
13#if defined(CORE_NUM_INTERRUPT)
18#define CORE_NUM_INTERRUPT NUM_EXTERNAL_INTERRUPTS
21#elif defined(EXTERNAL_NUM_INTERRUPTS)
22#define CORE_NUM_INTERRUPT EXTERNAL_NUM_INTERRUPTS
25#elif defined(__AVR_ATmega328P__) || defined(__AVR_ATmega328PB__) || \
26 defined(__AVR_ATmega168__) || defined(__AVR_ATmega8__)
27#define CORE_NUM_INTERRUPT 2
30#elif defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
31#define CORE_NUM_INTERRUPT 6
34#elif defined(__AVR_ATmega4809__)
35#define CORE_NUM_INTERRUPT 22
38#elif defined(__AVR_ATmega32U4__) && !defined(CORE_TEENSY)
39#define CORE_NUM_INTERRUPT 5
42#elif defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644__) || \
43 defined(__AVR_ATmega1284P__)
44#define CORE_NUM_INTERRUPT 3
47#elif defined(__AVR_ATmega32U2__) || defined(__AVR_ATmega16U2__)
48#define CORE_NUM_INTERRUPT 8
50#elif defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__)
51#define CORE_NUM_INTERRUPT 1
54#elif defined(__AVR_ATtinyX313__)
55#define CORE_NUM_INTERRUPT 2
58#elif defined(__AVR_ATtiny167__)
59#define CORE_NUM_INTERRUPT 2
62#elif defined(__SAM3X8E__)
63#define CORE_NUM_INTERRUPT 54
67#define CORE_NUM_INTERRUPT EXTERNAL_NUM_INTERRUPTS
71#define CORE_NUM_INTERRUPT 40
75#elif defined(__SAMD21G18A__) || defined(__SAMD21E18A__)
76#define CORE_NUM_INTERRUPT 31
79#elif defined(__SAMD51__)
80#define CORE_NUM_INTERRUPT 26
83#elif defined(ARDUINO_ARCH_NRF52840)
84#define CORE_NUM_INTERRUPT NUM_DIGITAL_PINS
87#elif defined(ARDUINO_NANO_RP2040_CONNECT)
88#define CORE_NUM_INTERRUPT 20
90#elif defined(ARDUINO_ARCH_RP2040)
91#define CORE_NUM_INTERRUPT 32
94#elif defined(ARDUINO_ARCH_MBED)
95#define CORE_NUM_INTERRUPT NUM_DIGITAL_PINS
98#elif defined(ARDUINO_UNOR4_MINIMA) || defined(ARDUINO_UNOR4_WIFI)
99#define CORE_NUM_INTERRUPT 13
101#ifdef NOT_AN_INTERRUPT
103 "This version of the ArduinoCore-renesas is not supported. Please open an issue on GitHub: https://github.com/tttapa/Control-Surface/issues"
107using not_an_interrupt_t = pin_size_t;
108using interrupt_t = not_an_interrupt_t;
110#define NOT_AN_INTERRUPT ((::AH::not_an_interrupt_t)255)
112using AH::interrupt_t;
113constexpr interrupt_t pin_to_interrupt_index[] {
135inline interrupt_t digitalPinToInterrupt(pin_size_t pin) {
136 if (pin_to_interrupt_index[pin] == NOT_AN_INTERRUPT)
137 return NOT_AN_INTERRUPT;
138 return ::digitalPinToInterrupt(pin);
141 return pin_to_interrupt_index[interrupt];
143#define CS_CUSTOM_INTERRUPT_TO_INDEX 1
147#warning "Unknown board. Please specify the number of external interrupts."
148#define CORE_NUM_INTERRUPT NUM_DIGITAL_PINS
static interrupt_index_t interruptToIndex(interrupt_index_t i)
#define BEGIN_AH_NAMESPACE
#define BEGIN_CS_NAMESPACE