Added arduino libs
هذا الالتزام موجود في:
66
libraries/EnableInterrupt/utility/ei_External1284.h
Normal file
66
libraries/EnableInterrupt/utility/ei_External1284.h
Normal file
@@ -0,0 +1,66 @@
|
||||
#if ! defined(EI_NOTINT0) && ! defined (EI_NOTINT1) && ! defined (EI_NOTINT2)
|
||||
#ifdef EI_SECTION_ENABLEEXTERNAL
|
||||
switch (arduinoPin) {
|
||||
#ifndef EI_NOTINT0
|
||||
case ARDUINO_PIN_D2 : // INT0 (Either 2 or 10)
|
||||
EIMSK &= ~_BV(0);
|
||||
#ifndef NEEDFORSPEED
|
||||
functionPointerArrayEXTERNAL[0] = userFunction;
|
||||
#endif
|
||||
EICRA &= (~_BV(0) & ~_BV(1)); // reset the flags prior to
|
||||
EICRA |= mode; // set them the way we want
|
||||
EIFR |= _BV(0);
|
||||
EIMSK |= _BV(0);
|
||||
break;
|
||||
#endif
|
||||
#ifndef EI_NOTINT1
|
||||
case ARDUINO_PIN_D3 : // INT1 (Either 3 or 11)
|
||||
EIMSK &= ~_BV(1);
|
||||
#ifndef NEEDFORSPEED
|
||||
functionPointerArrayEXTERNAL[1] = userFunction;
|
||||
#endif
|
||||
EICRA &= (~_BV(2) & ~_BV(3));
|
||||
EICRA |= (mode << 2);
|
||||
EIFR |= _BV(1);
|
||||
EIMSK |= _BV(1);
|
||||
break;
|
||||
#endif
|
||||
#ifndef EI_NOTINT2
|
||||
case ARDUINO_PIN_B2 : // INT2 (Either 10 or 2)
|
||||
EIMSK &= ~_BV(2);
|
||||
#ifndef NEEDFORSPEED
|
||||
functionPointerArrayEXTERNAL[2] = userFunction;
|
||||
#endif
|
||||
EICRA &= (~_BV(4) & ~_BV(5));
|
||||
EICRA |= (mode << 4);
|
||||
EIFR |= _BV(2);
|
||||
EIMSK |= _BV(2);
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
#endif // EI_SECTION_ENABLEEXTERNAL
|
||||
|
||||
#ifdef EI_SECTION_DISABLEEXTERNAL
|
||||
#ifndef EI_NOTINT0
|
||||
if (arduinoPin == ARDUINO_PIN_D2) { // INT0 (Either 2 or 10)
|
||||
EIMSK &= ~_BV(0);
|
||||
EICRA &= (~_BV(0) & ~_BV(1));
|
||||
EIFR |= _BV(0); // using a clue from the ATmega2560 datasheet.
|
||||
}
|
||||
#endif
|
||||
#ifndef EI_NOTINT1
|
||||
if (arduinoPin == ARDUINO_PIN_D3) { // INT1 (Either 3 or 11)
|
||||
EIMSK &= ~_BV(1);
|
||||
EICRA &= (~_BV(2) & ~_BV(3));
|
||||
EIFR |= _BV(1); // using a clue from the ATmega2560 datasheet.
|
||||
}
|
||||
#endif
|
||||
#ifndef EI_NOTINT2
|
||||
if (arduinoPin == ARDUINO_PIN_B2) { // INT2 (Either 10 or 2)
|
||||
EIMSK &= ~_BV(2);
|
||||
EICRA &= (~_BV(4) & ~_BV(5));
|
||||
EIFR |= _BV(2); // using a clue from the ATmega2560 datasheet.
|
||||
}
|
||||
#endif
|
||||
#endif // EI_SECTION_DISABLEEXTERNAL
|
||||
#endif // ! defined(EI_NOTINT0) && ! defined (EI_NOTINT1) && ! defined (EI_NOTINT2)
|
228
libraries/EnableInterrupt/utility/ei_External2560.h
Normal file
228
libraries/EnableInterrupt/utility/ei_External2560.h
Normal file
@@ -0,0 +1,228 @@
|
||||
#if ! defined(EI_NOTINT0) && ! defined(EI_NOTINT1) && ! defined(EI_NOTINT2) && ! defined(EI_NOTINT3) && ! defined(EI_NOTINT4) && ! defined(EI_NOTINT5) && ! defined(EI_NOTINT6) && ! defined(EI_NOTINT7)
|
||||
#ifdef EI_SECTION_ENABLEEXTERNAL
|
||||
switch (arduinoPin) {
|
||||
#ifndef EI_NOTINT0
|
||||
#if defined __AVR_ATmega1281__ || defined __AVR_ATmega2561__
|
||||
case 18 : // INT0 (xxx1 - MegaCore pinout)
|
||||
#else
|
||||
case 21 : // INT0
|
||||
#endif
|
||||
#ifndef NEEDFORSPEED
|
||||
functionPointerArrayEXTERNAL[0] = userFunction;
|
||||
#endif
|
||||
EIMSK &= ~_BV(0);
|
||||
EICRA &= (~_BV(0) & ~_BV(1));
|
||||
EICRA |= mode;
|
||||
EIFR |= _BV(0);
|
||||
EIMSK |= _BV(0);
|
||||
break;
|
||||
#endif
|
||||
#ifndef EI_NOTINT1
|
||||
#if defined __AVR_ATmega1281__ || defined __AVR_ATmega2561__
|
||||
case 19 : // INT1
|
||||
#else
|
||||
case 20 : // INT1
|
||||
#endif
|
||||
#ifndef NEEDFORSPEED
|
||||
functionPointerArrayEXTERNAL[1] = userFunction;
|
||||
#endif
|
||||
EIMSK &= ~_BV(1);
|
||||
EICRA &= (~_BV(2) & ~_BV(3));
|
||||
EICRA |= (mode << 2);
|
||||
EIFR |= _BV(1);
|
||||
EIMSK |= _BV(1);
|
||||
break;
|
||||
#endif
|
||||
#ifndef EI_NOTINT2
|
||||
#if defined __AVR_ATmega1281__ || defined __AVR_ATmega2561__
|
||||
case 20 : // INT2
|
||||
#else
|
||||
case 19 : // INT2
|
||||
#endif
|
||||
#ifndef NEEDFORSPEED
|
||||
functionPointerArrayEXTERNAL[2] = userFunction;
|
||||
#endif
|
||||
EIMSK &= ~_BV(2);
|
||||
EICRA &= (~_BV(4) & ~_BV(5));
|
||||
EICRA |= (mode << 4);
|
||||
EIFR |= _BV(2);
|
||||
EIMSK |= _BV(2);
|
||||
break;
|
||||
#endif
|
||||
#ifndef EI_NOTINT3
|
||||
#if defined __AVR_ATmega1281__ || defined __AVR_ATmega2561__
|
||||
case 21 : // INT3
|
||||
#else
|
||||
case 18 : // INT3
|
||||
#endif
|
||||
#ifndef NEEDFORSPEED
|
||||
functionPointerArrayEXTERNAL[3] = userFunction;
|
||||
#endif
|
||||
EIMSK &= ~_BV(3);
|
||||
EICRA &= (~_BV(6) & ~_BV(7));
|
||||
EICRA |= (mode << 6);
|
||||
EIFR |= _BV(3);
|
||||
EIMSK |= _BV(3);
|
||||
break;
|
||||
#endif
|
||||
#ifndef EI_NOTINT4
|
||||
#if defined __AVR_ATmega1281__ || defined __AVR_ATmega2561__
|
||||
case 4 : // INT4
|
||||
#else
|
||||
case 2 : // INT4
|
||||
#endif
|
||||
#ifndef NEEDFORSPEED
|
||||
functionPointerArrayEXTERNAL[4] = userFunction;
|
||||
#endif
|
||||
EIMSK &= ~_BV(4);
|
||||
EICRB &= (~_BV(0) & ~_BV(1));
|
||||
EICRB |= mode;
|
||||
EIFR |= _BV(4);
|
||||
EIMSK |= _BV(4);
|
||||
break;
|
||||
#endif
|
||||
#ifndef EI_NOTINT5
|
||||
#if defined __AVR_ATmega1281__ || defined __AVR_ATmega2561__
|
||||
case 5 : // INT5
|
||||
#else
|
||||
case 3 : // INT5
|
||||
#endif
|
||||
#ifndef NEEDFORSPEED
|
||||
functionPointerArrayEXTERNAL[5] = userFunction;
|
||||
#endif
|
||||
EIMSK &= ~_BV(5);
|
||||
EICRB &= (~_BV(2) & ~_BV(3));
|
||||
EICRB |= (mode << 2);
|
||||
EIFR |= _BV(5);
|
||||
EIMSK |= _BV(5);
|
||||
break;
|
||||
#endif
|
||||
#ifndef EI_NOTINT6
|
||||
#if defined __AVR_ATmega1281__ || defined __AVR_ATmega2561__
|
||||
case 6 : // INT6
|
||||
#else
|
||||
case 75 : // INT6- Fake Arduino Pin
|
||||
#endif
|
||||
#ifndef NEEDFORSPEED
|
||||
functionPointerArrayEXTERNAL[6] = userFunction;
|
||||
#endif
|
||||
EIMSK &= ~_BV(6);
|
||||
EICRB &= (~_BV(4) & ~_BV(5));
|
||||
EICRB |= (mode << 4);
|
||||
EIFR |= _BV(6);
|
||||
EIMSK |= _BV(6);
|
||||
break;
|
||||
#endif
|
||||
#ifndef EI_NOTINT7
|
||||
#if defined __AVR_ATmega1281__ || defined __AVR_ATmega2561__
|
||||
case 7 : // INT7
|
||||
#else
|
||||
case 76 : // INT7- Fake Arduino Pin
|
||||
#endif
|
||||
#ifndef NEEDFORSPEED
|
||||
functionPointerArrayEXTERNAL[7] = userFunction;
|
||||
#endif
|
||||
EIMSK &= ~_BV(7);
|
||||
EICRB &= (~_BV(6) & ~_BV(7));
|
||||
EICRB |= (mode << 6);
|
||||
EIFR |= _BV(7);
|
||||
EIMSK |= _BV(7);
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
#endif // EI_SECTION_ENABLEEXTERNAL
|
||||
|
||||
#ifdef EI_SECTION_DISABLEEXTERNAL
|
||||
switch (arduinoPin) {
|
||||
#ifndef EI_NOTINT0
|
||||
#if defined __AVR_ATmega1281__ || defined __AVR_ATmega2561__
|
||||
case 18 : // INT0
|
||||
#else
|
||||
case 21 : // INT0
|
||||
#endif
|
||||
EIMSK &= ~_BV(0);
|
||||
EICRA &= (~_BV(0) & ~_BV(1));
|
||||
EIFR |= _BV(0);
|
||||
break;
|
||||
#endif
|
||||
#ifndef EI_NOTINT1
|
||||
#if defined __AVR_ATmega1281__ || defined __AVR_ATmega2561__
|
||||
case 19 : // INT1
|
||||
#else
|
||||
case 20 : // INT1
|
||||
#endif
|
||||
EIMSK &= ~_BV(1);
|
||||
EICRA &= (~_BV(2) & ~_BV(3));
|
||||
EIFR |= _BV(1);
|
||||
break;
|
||||
#endif
|
||||
#ifndef EI_NOTINT2
|
||||
#if defined __AVR_ATmega1281__ || defined __AVR_ATmega2561__
|
||||
case 20 : // INT2
|
||||
#else
|
||||
case 19 : // INT2
|
||||
#endif
|
||||
EIMSK &= ~_BV(2);
|
||||
EICRA &= (~_BV(4) & ~_BV(5));
|
||||
EIFR |= _BV(2);
|
||||
break;
|
||||
#endif
|
||||
#ifndef EI_NOTINT3
|
||||
#if defined __AVR_ATmega1281__ || defined __AVR_ATmega2561__
|
||||
case 21 : // INT3
|
||||
#else
|
||||
case 18 : // INT3
|
||||
#endif
|
||||
EIMSK &= ~_BV(3);
|
||||
EICRA &= (~_BV(6) & ~_BV(7));
|
||||
EIFR |= _BV(3);
|
||||
break;
|
||||
#endif
|
||||
#ifndef EI_NOTINT4
|
||||
#if defined __AVR_ATmega1281__ || defined __AVR_ATmega2561__
|
||||
case 4 : // INT4
|
||||
#else
|
||||
case 2 : // INT4
|
||||
#endif
|
||||
EIMSK &= ~_BV(4);
|
||||
EICRB &= (~_BV(0) & ~_BV(1));
|
||||
EIFR |= _BV(4);
|
||||
break;
|
||||
#endif
|
||||
#ifndef EI_NOTINT5
|
||||
#if defined __AVR_ATmega1281__ || defined __AVR_ATmega2561__
|
||||
case 5 : // INT5
|
||||
#else
|
||||
case 3 : // INT5
|
||||
#endif
|
||||
EIMSK &= ~_BV(5);
|
||||
EICRB &= (~_BV(2) & ~_BV(3));
|
||||
EIFR |= _BV(5);
|
||||
break;
|
||||
#endif
|
||||
#ifndef EI_NOTINT6
|
||||
#if defined __AVR_ATmega1281__ || defined __AVR_ATmega2561__
|
||||
case 6 : // INT6
|
||||
#else
|
||||
case 75 : // INT6- Fake Arduino Pin
|
||||
#endif
|
||||
EIMSK &= ~_BV(6);
|
||||
EICRB &= (~_BV(4) & ~_BV(5));
|
||||
EIFR |= _BV(6);
|
||||
break;
|
||||
#endif
|
||||
#ifndef EI_NOTINT7
|
||||
#if defined __AVR_ATmega1281__ || defined __AVR_ATmega2561__
|
||||
case 7 : // INT7
|
||||
#else
|
||||
case 76 : // INT7- Fake Arduino Pin
|
||||
#endif
|
||||
EIMSK &= ~_BV(7);
|
||||
EICRB &= (~_BV(6) & ~_BV(7));
|
||||
EIFR |= _BV(7);
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
#endif // EI_SECTION_DISABLEEXTERNAL
|
||||
#endif // ! defined(EI_NOTINT0) && ! defined(EI_NOTINT1) && ! defined(EI_NOTINT2) && ! defined(EI_NOTINT3) && ! defined(EI_NOTINT4) && ! defined(EI_NOTINT5) && ! defined(EI_NOTINT6) && ! defined(EI_NOTINT7)
|
||||
|
45
libraries/EnableInterrupt/utility/ei_External328.h
Normal file
45
libraries/EnableInterrupt/utility/ei_External328.h
Normal file
@@ -0,0 +1,45 @@
|
||||
#if ! defined(EI_NOTINT0) && ! defined(EI_NOTINT1)
|
||||
#ifdef EI_SECTION_ENABLEEXTERNAL
|
||||
#ifndef EI_NOTINT0
|
||||
if (arduinoPin == 2) {
|
||||
#ifndef NEEDFORSPEED
|
||||
functionPointerArrayEXTERNAL[0] = userFunction;
|
||||
#endif
|
||||
EIMSK &= ~_BV(0);
|
||||
EICRA &= (~_BV(0) & ~_BV(1));
|
||||
EICRA |= mode;
|
||||
EIFR |= _BV(0); // using a clue from the ATmega2560 datasheet.
|
||||
EIMSK |= _BV(0);
|
||||
}
|
||||
#endif
|
||||
#ifndef EI_NOTINT1
|
||||
if (arduinoPin == 3) {
|
||||
#ifndef NEEDFORSPEED
|
||||
functionPointerArrayEXTERNAL[1] = userFunction;
|
||||
#endif
|
||||
EIMSK &= ~_BV(1);
|
||||
EICRA &= (~_BV(2) & ~_BV(3));
|
||||
EICRA |= mode << 2;
|
||||
EIFR |= _BV(1); // using a clue from the ATmega2560 datasheet.
|
||||
EIMSK |= _BV(1);
|
||||
}
|
||||
#endif
|
||||
#endif // EI_SECTION_ENABLEEXTERNAL
|
||||
|
||||
#ifdef EI_SECTION_DISABLEEXTERNAL
|
||||
#ifndef EI_NOTINT0
|
||||
if (arduinoPin == 2) {
|
||||
EIMSK &= ~_BV(0);
|
||||
EICRA &= (~_BV(0) & ~_BV(1));
|
||||
EIFR |= _BV(0); // using a clue from the ATmega2560 datasheet.
|
||||
}
|
||||
#endif
|
||||
#ifndef EI_NOTINT1
|
||||
if (arduinoPin == 3) {
|
||||
EIMSK &= ~_BV(1);
|
||||
EICRA &= (~_BV(2) & ~_BV(3));
|
||||
EIFR |= _BV(1); // using a clue from the ATmega2560 datasheet.
|
||||
}
|
||||
#endif
|
||||
#endif // EI_SECTION_DISABLEEXTERNAL
|
||||
#endif // ! defined(EI_NOTINT0) && ! defined(EI_NOTINT1)
|
106
libraries/EnableInterrupt/utility/ei_ExternalLeonardo.h
Normal file
106
libraries/EnableInterrupt/utility/ei_ExternalLeonardo.h
Normal file
@@ -0,0 +1,106 @@
|
||||
#if ! defined(EI_NOTINT0) && ! defined(EI_NOTINT1) && ! defined(EI_NOTINT2) && ! defined(EI_NOTINT3) && ! defined(EI_NOTINT6)
|
||||
#ifdef EI_SECTION_ENABLEEXTERNAL
|
||||
switch (arduinoPin) {
|
||||
#ifndef EI_NOTINT0
|
||||
case 3 : // INT0
|
||||
#ifndef NEEDFORSPEED
|
||||
functionPointerArrayEXTERNAL[0] = userFunction;
|
||||
#endif
|
||||
EIMSK &= ~_BV(0);
|
||||
EICRA &= (~_BV(0) & ~_BV(1));
|
||||
EICRA |= mode;
|
||||
EIFR |= _BV(0);
|
||||
EIMSK |= _BV(0);
|
||||
break;
|
||||
#endif
|
||||
#ifndef EI_NOTINT1
|
||||
case 2 : // INT1
|
||||
#ifndef NEEDFORSPEED
|
||||
functionPointerArrayEXTERNAL[1] = userFunction;
|
||||
#endif
|
||||
EIMSK &= ~_BV(1);
|
||||
EICRA &= (~_BV(2) & ~_BV(3));
|
||||
EICRA |= (mode << 2);
|
||||
EIFR |= _BV(1);
|
||||
EIMSK |= _BV(1);
|
||||
break;
|
||||
#endif
|
||||
#ifndef EI_NOTINT2
|
||||
case 0 : // INT2
|
||||
#ifndef NEEDFORSPEED
|
||||
functionPointerArrayEXTERNAL[2] = userFunction;
|
||||
#endif
|
||||
EIMSK &= ~_BV(2);
|
||||
EICRA &= (~_BV(4) & ~_BV(5));
|
||||
EICRA |= (mode << 4);
|
||||
EIFR |= _BV(2);
|
||||
EIMSK |= _BV(2);
|
||||
break;
|
||||
#endif
|
||||
#ifndef EI_NOTINT3
|
||||
case 1 : // INT3
|
||||
#ifndef NEEDFORSPEED
|
||||
functionPointerArrayEXTERNAL[3] = userFunction;
|
||||
#endif
|
||||
EIMSK &= ~_BV(3);
|
||||
EICRA &= (~_BV(6) & ~_BV(7));
|
||||
EICRA |= (mode << 6);
|
||||
EIFR |= _BV(3);
|
||||
EIMSK |= _BV(3);
|
||||
break;
|
||||
#endif
|
||||
#ifndef EI_NOTINT6
|
||||
case 7 : // INT6
|
||||
#ifndef NEEDFORSPEED
|
||||
functionPointerArrayEXTERNAL[4] = userFunction;
|
||||
#endif
|
||||
EIMSK &= ~_BV(6);
|
||||
EICRB &= (~_BV(4) & ~_BV(5));
|
||||
EICRB |= (mode << 4);
|
||||
EIFR |= _BV(6);
|
||||
EIMSK |= _BV(6);
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
#endif // EI_SECTION_ENABLEEXTERNAL
|
||||
|
||||
#ifdef EI_SECTION_DISABLEEXTERNAL
|
||||
switch (arduinoPin) {
|
||||
#ifndef EI_NOTINT0
|
||||
case 3 : // INT0
|
||||
EIMSK &= ~_BV(0);
|
||||
EICRA &= (~_BV(0) & ~_BV(1));
|
||||
EIFR |= _BV(0);
|
||||
break;
|
||||
#endif
|
||||
#ifndef EI_NOTINT1
|
||||
case 2 : // INT1
|
||||
EIMSK &= ~_BV(1);
|
||||
EICRA &= (~_BV(2) & ~_BV(3));
|
||||
EIFR |= _BV(1);
|
||||
break;
|
||||
#endif
|
||||
#ifndef EI_NOTINT2
|
||||
case 0 : // INT2
|
||||
EIMSK &= ~_BV(2);
|
||||
EICRA &= (~_BV(4) & ~_BV(5));
|
||||
EIFR |= _BV(2);
|
||||
break;
|
||||
#endif
|
||||
#ifndef EI_NOTINT3
|
||||
case 1 : // INT3
|
||||
EIMSK &= ~_BV(3);
|
||||
EICRA &= (~_BV(6) & ~_BV(7));
|
||||
EIFR |= _BV(3);
|
||||
break;
|
||||
#endif
|
||||
#ifndef EI_NOTINT6
|
||||
case 7 : // INT6
|
||||
EIMSK &= ~_BV(6);
|
||||
EICRB &= (~_BV(4) & ~_BV(5));
|
||||
EIFR |= _BV(6);
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
#endif // EI_SECTION_DISABLEEXTERNAL
|
||||
#endif // ! defined(EI_NOTINT0) && ! defined(EI_NOTINT1) && ! defined(EI_NOTINT2) && ! defined(EI_NOTINT3) && ! defined(EI_NOTINT6)
|
24
libraries/EnableInterrupt/utility/ei_ExternalTiny24.h
Normal file
24
libraries/EnableInterrupt/utility/ei_ExternalTiny24.h
Normal file
@@ -0,0 +1,24 @@
|
||||
// Support for the 14-pin ATtiny24/24A/44/44A/84/84A
|
||||
#if ! defined(EI_NOTINT0)
|
||||
#ifdef EI_SECTION_ENABLEEXTERNAL
|
||||
// NO switch (arduinoPin) { // ONLY 1 External Interrupt pin.
|
||||
#ifndef EI_NOTINT0
|
||||
GIMSK &= ~_BV(6); // Disable interrupts since we are (possibly) changing interrupt settings
|
||||
#ifndef NEEDFORSPEED
|
||||
externalFunctionPointer = userFunction;
|
||||
#endif
|
||||
MCUCR &= (~_BV(0) & ~_BV(1)); // reset the flags prior to
|
||||
MCUCR |= mode; // set them the way we want
|
||||
GIFR |= _BV(6);
|
||||
GIMSK |= _BV(6);
|
||||
#endif
|
||||
#endif // EI_SECTION_ENABLEEXTERNAL
|
||||
|
||||
#ifdef EI_SECTION_DISABLEEXTERNAL
|
||||
#ifndef EI_NOTINT0
|
||||
GIMSK &= ~_BV(6);
|
||||
MCUCR &= (~_BV(0) & ~_BV(1)); // reset the flags
|
||||
GIFR |= _BV(6); // using a clue from the ATmega2560 datasheet.
|
||||
#endif
|
||||
#endif // EI_SECTION_DISABLEEXTERNAL
|
||||
#endif // ! defined(EI_NOTINT0) && ! defined (EI_NOTINT1) && ! defined (EI_NOTINT2)
|
22
libraries/EnableInterrupt/utility/ei_ExternalTiny25.h
Normal file
22
libraries/EnableInterrupt/utility/ei_ExternalTiny25.h
Normal file
@@ -0,0 +1,22 @@
|
||||
// Support for the 8-pin ATtiny25/45/85
|
||||
#ifdef EI_SECTION_ENABLEEXTERNAL
|
||||
// NO switch (arduinoPin) { // ONLY 1 External Interrupt pin.
|
||||
#ifndef EI_NOTINT0
|
||||
GIMSK &= ~_BV(6);
|
||||
#ifndef NEEDFORSPEED
|
||||
externalFunctionPointer = userFunction;
|
||||
#endif
|
||||
MCUCR &= (~_BV(0) & ~_BV(1)); // reset the flags prior to
|
||||
MCUCR |= mode; // set them the way we want
|
||||
GIFR |= _BV(6);
|
||||
GIMSK |= _BV(6);
|
||||
#endif // ! defined (EI_NOTINT0)
|
||||
#endif // EI_SECTION_ENABLEEXTERNAL
|
||||
|
||||
#ifdef EI_SECTION_DISABLEEXTERNAL
|
||||
#ifndef EI_NOTINT0
|
||||
GIMSK &= ~_BV(6);
|
||||
GIFR |= _BV(6); // using a clue from the ATmega2560 datasheet.
|
||||
MCUCR &= (~_BV(0) & ~_BV(1));
|
||||
#endif
|
||||
#endif // EI_SECTION_DISABLEEXTERNAL
|
127
libraries/EnableInterrupt/utility/ei_PinChange1284.h
Normal file
127
libraries/EnableInterrupt/utility/ei_PinChange1284.h
Normal file
@@ -0,0 +1,127 @@
|
||||
#ifdef EI_SECTION_RISING
|
||||
#ifndef EI_NOTPORTA
|
||||
if (portNumber==PA) {
|
||||
risingPinsPORTA |= portMask;
|
||||
}
|
||||
#endif
|
||||
#ifndef EI_NOTPORTB
|
||||
if (portNumber==PB) {
|
||||
risingPinsPORTB |= portMask;
|
||||
}
|
||||
#endif
|
||||
#ifndef EI_NOTPORTC
|
||||
if (portNumber==PC) {
|
||||
risingPinsPORTC |= portMask;
|
||||
}
|
||||
#endif
|
||||
#ifndef EI_NOTPORTD
|
||||
if (portNumber==PD) {
|
||||
risingPinsPORTD |= portMask;
|
||||
}
|
||||
#endif
|
||||
#endif // EI_SECTION_RISING
|
||||
|
||||
#ifdef EI_SECTION_FALLING
|
||||
#ifndef EI_NOTPORTA
|
||||
if (portNumber==PA) {
|
||||
fallingPinsPORTA |= portMask;
|
||||
}
|
||||
#endif
|
||||
#ifndef EI_NOTPORTB
|
||||
if (portNumber==PB) {
|
||||
fallingPinsPORTB |= portMask;
|
||||
}
|
||||
#endif
|
||||
#ifndef EI_NOTPORTC
|
||||
if (portNumber==PC) {
|
||||
fallingPinsPORTC |= portMask;
|
||||
}
|
||||
#endif
|
||||
#ifndef EI_NOTPORTD
|
||||
if (portNumber==PD) {
|
||||
fallingPinsPORTD |= portMask;
|
||||
}
|
||||
#endif
|
||||
#endif // EI_SECTION_FALLING
|
||||
|
||||
#if defined EI_SECTION_ASSIGNFUNCTIONSREGISTERS
|
||||
#ifndef EI_NOTPORTA
|
||||
if (portNumber==PA) {
|
||||
#ifndef NEEDFORSPEED
|
||||
calculatedPointer=&portAFunctions.pinZero + portBitNumber;
|
||||
*calculatedPointer = userFunction;
|
||||
#endif
|
||||
portSnapshotA=*portInputRegister(portNumber);
|
||||
pcmsk=&PCMSK0;
|
||||
PCICR |= _BV(0);
|
||||
}
|
||||
#endif
|
||||
#ifndef EI_NOTPORTB
|
||||
if (portNumber==PB) {
|
||||
#ifndef NEEDFORSPEED
|
||||
calculatedPointer=&portBFunctions.pinZero + portBitNumber;
|
||||
*calculatedPointer = userFunction;
|
||||
#endif
|
||||
portSnapshotB=*portInputRegister(portNumber);
|
||||
pcmsk=&PCMSK1;
|
||||
PCICR |= _BV(1);
|
||||
}
|
||||
#endif
|
||||
#ifndef EI_NOTPORTC
|
||||
if (portNumber==PC) {
|
||||
#ifndef NEEDFORSPEED
|
||||
calculatedPointer=&portCFunctions.pinZero + portBitNumber;
|
||||
*calculatedPointer = userFunction;
|
||||
#endif
|
||||
portSnapshotC=*portInputRegister(portNumber);
|
||||
pcmsk=&PCMSK2;
|
||||
PCICR |= _BV(2);
|
||||
}
|
||||
#endif
|
||||
#ifndef EI_NOTPORTD
|
||||
if (portNumber==PD) {
|
||||
#ifndef NEEDFORSPEED
|
||||
calculatedPointer=&portDFunctions.pinZero + portBitNumber;
|
||||
*calculatedPointer = userFunction;
|
||||
#endif
|
||||
portSnapshotD=*portInputRegister(portNumber);
|
||||
pcmsk=&PCMSK3;
|
||||
PCICR |= _BV(3);
|
||||
}
|
||||
#endif
|
||||
#endif // EI_SECTION_ASSIGNFUNCTIONSREGISTERS
|
||||
|
||||
#ifdef EI_SECTION_DISABLEPINCHANGE
|
||||
#ifndef EI_NOTPORTA
|
||||
if (portNumber == PA) {
|
||||
PCMSK0 &= ~portMask;
|
||||
if (PCMSK0 == 0) { PCICR &= ~_BV(0); };
|
||||
risingPinsPORTA &= ~portMask;
|
||||
fallingPinsPORTA &= ~portMask;
|
||||
}
|
||||
#endif
|
||||
#ifndef EI_NOTPORTB
|
||||
if (portNumber == PB) {
|
||||
PCMSK1 &= ~portMask;
|
||||
if (PCMSK1 == 0) { PCICR &= ~_BV(1); };
|
||||
risingPinsPORTB &= ~portMask;
|
||||
fallingPinsPORTB &= ~portMask;
|
||||
}
|
||||
#endif
|
||||
#ifndef EI_NOTPORTC
|
||||
if (portNumber == PC) {
|
||||
PCMSK2 &= ~portMask;
|
||||
if (PCMSK2 == 0) { PCICR &= ~_BV(2); };
|
||||
risingPinsPORTC &= ~portMask;
|
||||
fallingPinsPORTC &= ~portMask;
|
||||
}
|
||||
#endif
|
||||
#ifndef EI_NOTPORTD
|
||||
if (portNumber == PD) {
|
||||
PCMSK3 &= ~portMask;
|
||||
if (PCMSK3 == 0) { PCICR &= ~_BV(3); };
|
||||
risingPinsPORTB &= ~portMask;
|
||||
fallingPinsPORTB &= ~portMask;
|
||||
}
|
||||
#endif
|
||||
#endif // EI_SECTION_DISABLEPINCHANGE
|
103
libraries/EnableInterrupt/utility/ei_PinChange2560.h
Normal file
103
libraries/EnableInterrupt/utility/ei_PinChange2560.h
Normal file
@@ -0,0 +1,103 @@
|
||||
#ifdef EI_SECTION_RISING
|
||||
#ifndef EI_NOTPORTB
|
||||
if (portNumber==PB) {
|
||||
risingPinsPORTB |= portMask;
|
||||
}
|
||||
#endif
|
||||
#ifndef EI_NOTPORTJ
|
||||
if (portNumber==PJ) {
|
||||
risingPinsPORTJ |= portMask;
|
||||
}
|
||||
#endif
|
||||
#ifndef EI_NOTPORTK
|
||||
if (portNumber==PK) {
|
||||
risingPinsPORTK |= portMask;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef EI_SECTION_FALLING
|
||||
#ifndef EI_NOTPORTB
|
||||
if (portNumber==PB) {
|
||||
fallingPinsPORTB |= portMask;
|
||||
}
|
||||
#endif
|
||||
#ifndef EI_NOTPORTJ
|
||||
if (portNumber==PJ) {
|
||||
fallingPinsPORTJ |= portMask;
|
||||
}
|
||||
#endif
|
||||
#ifndef EI_NOTPORTK
|
||||
if (portNumber==PK) {
|
||||
fallingPinsPORTK |= portMask;
|
||||
}
|
||||
#endif
|
||||
#endif // EI_SECTION_FALLING
|
||||
|
||||
#ifdef EI_SECTION_ASSIGNFUNCTIONSREGISTERS
|
||||
#ifndef EI_NOTPORTB
|
||||
if (portNumber==PB) {
|
||||
#ifndef NEEDFORSPEED
|
||||
calculatedPointer=&portBFunctions.pinZero + portBitNumber;
|
||||
*calculatedPointer = userFunction;
|
||||
#endif
|
||||
portSnapshotB=*portInputRegister(portNumber);
|
||||
pcmsk=&PCMSK0;
|
||||
PCICR |= _BV(0);
|
||||
}
|
||||
#endif
|
||||
#ifndef EI_NOTPORTJ
|
||||
if (portNumber==PJ) {
|
||||
#ifndef NEEDFORSPEED
|
||||
calculatedPointer=&portJFunctions.pinZero + portBitNumber;
|
||||
*calculatedPointer = userFunction;
|
||||
#endif
|
||||
portSnapshotJ=*portInputRegister(portNumber);
|
||||
pcmsk=&PCMSK1;
|
||||
PCICR |= _BV(1);
|
||||
// TODO: I think the order of these is flipped. Test. BUG??? -Mike
|
||||
portJPCMSK|=portMask; // because PCMSK1 is shifted wrt. PortJ.
|
||||
portMask <<= 1; // Handle port J's oddness. PJ0 is actually 1 on PCMSK1.
|
||||
}
|
||||
#endif
|
||||
#ifndef EI_NOTPORTK
|
||||
if (portNumber==PK) {
|
||||
#ifndef NEEDFORSPEED
|
||||
calculatedPointer=&portKFunctions.pinZero + portBitNumber;
|
||||
*calculatedPointer = userFunction;
|
||||
#endif
|
||||
portSnapshotK=*portInputRegister(portNumber);
|
||||
pcmsk=&PCMSK2;
|
||||
PCICR |= _BV(2);
|
||||
}
|
||||
#endif
|
||||
#endif // EI_SECTION_ASSIGNFUNCTIONSREGISTERS
|
||||
|
||||
#ifdef EI_SECTION_DISABLEPINCHANGE
|
||||
#ifndef EI_NOTPORTB
|
||||
if (portNumber == PB) {
|
||||
PCMSK0 &= ~portMask;
|
||||
if (PCMSK0 == 0) { PCICR &= ~_BV(0); };
|
||||
risingPinsPORTB &= ~portMask;
|
||||
fallingPinsPORTB &= ~portMask;
|
||||
}
|
||||
#endif
|
||||
#ifndef EI_NOTPORTJ
|
||||
if (portNumber == PJ) {
|
||||
// Handle port J's oddness. PJ0 is actually 1 on PCMSK1.
|
||||
PCMSK1 &= ((~portMask << 1) | 0x01); // or with 1 to not touch PE0.
|
||||
if (PCMSK1 == 0) { PCICR &= ~_BV(1); };
|
||||
risingPinsPORTJ &= ~portMask;
|
||||
fallingPinsPORTJ &= ~portMask;
|
||||
}
|
||||
#endif
|
||||
#ifndef EI_NOTPORTK
|
||||
if (portNumber == PK) {
|
||||
PCMSK2 &= ~portMask;
|
||||
if (PCMSK2 == 0) { PCICR &= ~_BV(2); };
|
||||
risingPinsPORTK &= ~portMask;
|
||||
fallingPinsPORTK &= ~portMask;
|
||||
}
|
||||
#endif
|
||||
#endif // EI_SECTION_DISABLEPINCHANGE
|
||||
|
98
libraries/EnableInterrupt/utility/ei_PinChange328.h
Normal file
98
libraries/EnableInterrupt/utility/ei_PinChange328.h
Normal file
@@ -0,0 +1,98 @@
|
||||
#ifdef EI_SECTION_RISING
|
||||
#ifndef EI_NOTPORTB
|
||||
if (portNumber==PB) {
|
||||
risingPinsPORTB |= portMask;
|
||||
}
|
||||
#endif
|
||||
#ifndef EI_NOTPORTC
|
||||
if (portNumber==PC) {
|
||||
risingPinsPORTC |= portMask;
|
||||
}
|
||||
#endif
|
||||
#ifndef EI_NOTPORTD
|
||||
if (portNumber==PD) {
|
||||
risingPinsPORTD |= portMask;
|
||||
}
|
||||
#endif
|
||||
#endif // EI_SECTION_RISING
|
||||
|
||||
#ifdef EI_SECTION_FALLING
|
||||
#ifndef EI_NOTPORTB
|
||||
if (portNumber==PB) {
|
||||
fallingPinsPORTB |= portMask;
|
||||
}
|
||||
#endif
|
||||
#ifndef EI_NOTPORTC
|
||||
if (portNumber==PC) {
|
||||
fallingPinsPORTC |= portMask;
|
||||
}
|
||||
#endif
|
||||
#ifndef EI_NOTPORTD
|
||||
if (portNumber==PD) {
|
||||
fallingPinsPORTD |= portMask;
|
||||
}
|
||||
#endif
|
||||
#endif // EI_SECTION_FALLING
|
||||
|
||||
#if defined EI_SECTION_ASSIGNFUNCTIONSREGISTERS
|
||||
#ifndef EI_NOTPORTB
|
||||
if (portNumber==PB) {
|
||||
#ifndef NEEDFORSPEED
|
||||
calculatedPointer=&portBFunctions.pinZero + portBitNumber;
|
||||
*calculatedPointer = userFunction;
|
||||
#endif
|
||||
portSnapshotB=*portInputRegister(portNumber);
|
||||
pcmsk=&PCMSK0;
|
||||
PCICR |= _BV(0);
|
||||
}
|
||||
#endif
|
||||
#ifndef EI_NOTPORTC
|
||||
if (portNumber==PC) {
|
||||
#ifndef NEEDFORSPEED
|
||||
calculatedPointer=&portCFunctions.pinZero + portBitNumber;
|
||||
*calculatedPointer = userFunction;
|
||||
#endif
|
||||
portSnapshotC=*portInputRegister(portNumber);
|
||||
pcmsk=&PCMSK1;
|
||||
PCICR |= _BV(1);
|
||||
}
|
||||
#endif
|
||||
#ifndef EI_NOTPORTD
|
||||
if (portNumber==PD) {
|
||||
#ifndef NEEDFORSPEED
|
||||
calculatedPointer=&portDFunctions.pinZero + portBitNumber;
|
||||
*calculatedPointer = userFunction;
|
||||
#endif
|
||||
portSnapshotD=*portInputRegister(portNumber);
|
||||
pcmsk=&PCMSK2;
|
||||
PCICR |= _BV(2);
|
||||
}
|
||||
#endif
|
||||
#endif // EI_SECTION_ASSIGNFUNCTIONSREGISTERS
|
||||
|
||||
#ifdef EI_SECTION_DISABLEPINCHANGE
|
||||
#ifndef EI_NOTPORTB
|
||||
if (portNumber == PB) {
|
||||
PCMSK0 &= ~portMask;
|
||||
if (PCMSK0 == 0) { PCICR &= ~_BV(0); };
|
||||
risingPinsPORTB &= ~portMask;
|
||||
fallingPinsPORTB &= ~portMask;
|
||||
}
|
||||
#endif
|
||||
#ifndef EI_NOTPORTC
|
||||
if (portNumber == PC) {
|
||||
PCMSK1 &= ~portMask;
|
||||
if (PCMSK1 == 0) { PCICR &= ~_BV(1); };
|
||||
risingPinsPORTC &= ~portMask;
|
||||
fallingPinsPORTC &= ~portMask;
|
||||
}
|
||||
#endif
|
||||
#ifndef EI_NOTPORTD
|
||||
if (portNumber == PD) {
|
||||
PCMSK2 &= ~portMask;
|
||||
if (PCMSK2 == 0) { PCICR &= ~_BV(2); };
|
||||
risingPinsPORTD &= ~portMask;
|
||||
fallingPinsPORTD &= ~portMask;
|
||||
}
|
||||
#endif
|
||||
#endif // EI_SECTION_DISABLEPINCHANGE
|
33
libraries/EnableInterrupt/utility/ei_PinChangeLeonardo.h
Normal file
33
libraries/EnableInterrupt/utility/ei_PinChangeLeonardo.h
Normal file
@@ -0,0 +1,33 @@
|
||||
// ALL pin change interrupts are on Port B on Leonardo.
|
||||
#ifdef EI_SECTION_RISING
|
||||
#ifndef EI_NOTPORTB
|
||||
risingPinsPORTB |= portMask;
|
||||
#endif
|
||||
#endif // EI_SECTION_RISING
|
||||
|
||||
#ifdef EI_SECTION_FALLING
|
||||
#ifndef EI_NOTPORTB
|
||||
fallingPinsPORTB |= portMask;
|
||||
#endif
|
||||
#endif // EI_SECTION_FALLING
|
||||
|
||||
#if defined EI_SECTION_ASSIGNFUNCTIONSREGISTERS
|
||||
#ifndef EI_NOTPORTB
|
||||
#ifndef NEEDFORSPEED
|
||||
calculatedPointer=&portBFunctions.pinZero + portBitNumber;
|
||||
*calculatedPointer = userFunction;
|
||||
#endif
|
||||
portSnapshotB=*portInputRegister(portNumber);
|
||||
pcmsk=&PCMSK0;
|
||||
PCICR |= _BV(0);
|
||||
#endif
|
||||
#endif // EI_SECTION_ASSIGNFUNCTIONSREGISTERS
|
||||
|
||||
#ifdef EI_SECTION_DISABLEPINCHANGE
|
||||
#ifndef EI_NOTPORTB
|
||||
PCMSK0 &= ~portMask;
|
||||
if (PCMSK0 == 0) { PCICR &= ~_BV(0); };
|
||||
risingPinsPORTB &= ~portMask;
|
||||
fallingPinsPORTB &= ~portMask;
|
||||
#endif
|
||||
#endif // EI_SECTION_DISABLEPINCHANGE
|
69
libraries/EnableInterrupt/utility/ei_PinChangeTiny24.h
Normal file
69
libraries/EnableInterrupt/utility/ei_PinChangeTiny24.h
Normal file
@@ -0,0 +1,69 @@
|
||||
#ifdef EI_SECTION_RISING
|
||||
#ifndef EI_NOTPORTA
|
||||
if (portNumber==PA) {
|
||||
risingPinsPORTA |= portMask;
|
||||
}
|
||||
#endif
|
||||
#ifndef EI_NOTPORTB
|
||||
if (portNumber==PB) {
|
||||
risingPinsPORTB |= portMask;
|
||||
}
|
||||
#endif
|
||||
#endif // EI_SECTION_RISING
|
||||
|
||||
#ifdef EI_SECTION_FALLING
|
||||
#ifndef EI_NOTPORTA
|
||||
if (portNumber==PA) {
|
||||
fallingPinsPORTA |= portMask;
|
||||
}
|
||||
#endif
|
||||
#ifndef EI_NOTPORTB
|
||||
if (portNumber==PB) {
|
||||
fallingPinsPORTB |= portMask;
|
||||
}
|
||||
#endif
|
||||
#endif // EI_SECTION_FALLING
|
||||
|
||||
#if defined EI_SECTION_ASSIGNFUNCTIONSREGISTERS
|
||||
#ifndef EI_NOTPORTA
|
||||
if (portNumber==PA) {
|
||||
#ifndef NEEDFORSPEED
|
||||
calculatedPointer=&portAFunctions.pinZero + portBitNumber;
|
||||
*calculatedPointer = userFunction;
|
||||
#endif
|
||||
portSnapshotA=*portInputRegister(portNumber);
|
||||
pcmsk=&PCMSK0;
|
||||
GIMSK |= _BV(4);
|
||||
}
|
||||
#endif
|
||||
#ifndef EI_NOTPORTB
|
||||
if (portNumber==PB) {
|
||||
#ifndef NEEDFORSPEED
|
||||
calculatedPointer=&portBFunctions.pinZero + portBitNumber;
|
||||
*calculatedPointer = userFunction;
|
||||
#endif
|
||||
portSnapshotB=*portInputRegister(portNumber);
|
||||
pcmsk=&PCMSK1;
|
||||
GIMSK |= _BV(5);
|
||||
}
|
||||
#endif
|
||||
#endif // EI_SECTION_ASSIGNFUNCTIONSREGISTERS
|
||||
|
||||
#ifdef EI_SECTION_DISABLEPINCHANGE
|
||||
#ifndef EI_NOTPORTA
|
||||
if (portNumber == PA) {
|
||||
PCMSK0 &= ~portMask;
|
||||
if (PCMSK0 == 0) { GIMSK &= ~_BV(4); };
|
||||
risingPinsPORTA &= ~portMask;
|
||||
fallingPinsPORTA &= ~portMask;
|
||||
}
|
||||
#endif
|
||||
#ifndef EI_NOTPORTB
|
||||
if (portNumber == PB) {
|
||||
PCMSK1 &= ~portMask;
|
||||
if (PCMSK1 == 0) { GIMSK &= ~_BV(5); };
|
||||
risingPinsPORTB &= ~portMask;
|
||||
fallingPinsPORTB &= ~portMask;
|
||||
}
|
||||
#endif
|
||||
#endif // EI_SECTION_DISABLEPINCHANGE
|
32
libraries/EnableInterrupt/utility/ei_PinChangeTiny25.h
Normal file
32
libraries/EnableInterrupt/utility/ei_PinChangeTiny25.h
Normal file
@@ -0,0 +1,32 @@
|
||||
#ifdef EI_SECTION_RISING
|
||||
#ifndef EI_NOTPORTB
|
||||
risingPinsPORTB |= portMask;
|
||||
#endif
|
||||
#endif // EI_SECTION_RISING
|
||||
|
||||
#ifdef EI_SECTION_FALLING
|
||||
#ifndef EI_NOTPORTB
|
||||
fallingPinsPORTB |= portMask;
|
||||
#endif
|
||||
#endif // EI_SECTION_FALLING
|
||||
|
||||
#if defined EI_SECTION_ASSIGNFUNCTIONSREGISTERS
|
||||
#ifndef EI_NOTPORTB
|
||||
#ifndef NEEDFORSPEED
|
||||
calculatedPointer=&portBFunctions.pinZero + portBitNumber;
|
||||
*calculatedPointer = userFunction;
|
||||
#endif
|
||||
portSnapshotB=*portInputRegister(portNumber);
|
||||
pcmsk=&PCMSK;
|
||||
GIMSK |= _BV(5);
|
||||
#endif
|
||||
#endif // EI_SECTION_ASSIGNFUNCTIONSREGISTERS
|
||||
|
||||
#ifdef EI_SECTION_DISABLEPINCHANGE
|
||||
#ifndef EI_NOTPORTB
|
||||
PCMSK &= ~portMask;
|
||||
if (PCMSK == 0) { GIMSK &= ~_BV(5); };
|
||||
risingPinsPORTB &= ~portMask;
|
||||
fallingPinsPORTB &= ~portMask;
|
||||
#endif
|
||||
#endif // EI_SECTION_DISABLEPINCHANGE
|
137
libraries/EnableInterrupt/utility/ei_pindefs_speed.h
Normal file
137
libraries/EnableInterrupt/utility/ei_pindefs_speed.h
Normal file
@@ -0,0 +1,137 @@
|
||||
#ifdef INTERRUPT_FLAG_PIN0
|
||||
volatile uint8_t INTERRUPT_FLAG_PIN0 = 0;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN1
|
||||
volatile uint8_t INTERRUPT_FLAG_PIN1 = 0;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN2
|
||||
volatile uint8_t INTERRUPT_FLAG_PIN2 = 0;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN3
|
||||
volatile uint8_t INTERRUPT_FLAG_PIN3 = 0;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN4
|
||||
volatile uint8_t INTERRUPT_FLAG_PIN4 = 0;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN5
|
||||
volatile uint8_t INTERRUPT_FLAG_PIN5 = 0;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN6
|
||||
volatile uint8_t INTERRUPT_FLAG_PIN6 = 0;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN7
|
||||
volatile uint8_t INTERRUPT_FLAG_PIN7 = 0;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN8
|
||||
volatile uint8_t INTERRUPT_FLAG_PIN8 = 0;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN9
|
||||
volatile uint8_t INTERRUPT_FLAG_PIN9 = 0;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN10
|
||||
volatile uint8_t INTERRUPT_FLAG_PIN10 = 0;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN11
|
||||
volatile uint8_t INTERRUPT_FLAG_PIN11 = 0;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN12
|
||||
volatile uint8_t INTERRUPT_FLAG_PIN12 = 0;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN13
|
||||
volatile uint8_t INTERRUPT_FLAG_PIN13 = 0;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN14
|
||||
volatile uint8_t INTERRUPT_FLAG_PIN14 = 0;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN15
|
||||
volatile uint8_t INTERRUPT_FLAG_PIN15 = 0;
|
||||
#endif
|
||||
|
||||
#ifdef INTERRUPT_FLAG_PIN18
|
||||
volatile uint8_t INTERRUPT_FLAG_PIN18 = 0;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN19
|
||||
volatile uint8_t INTERRUPT_FLAG_PIN19 = 0;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN20
|
||||
volatile uint8_t INTERRUPT_FLAG_PIN20 = 0;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN21
|
||||
volatile uint8_t INTERRUPT_FLAG_PIN21 = 0;
|
||||
#endif
|
||||
|
||||
#ifdef INTERRUPT_FLAG_PINA0
|
||||
volatile uint8_t INTERRUPT_FLAG_PINA0 = 0;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PINA1
|
||||
volatile uint8_t INTERRUPT_FLAG_PINA1 = 0;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PINA2
|
||||
volatile uint8_t INTERRUPT_FLAG_PINA2 = 0;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PINA3
|
||||
volatile uint8_t INTERRUPT_FLAG_PINA3 = 0;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PINA4
|
||||
volatile uint8_t INTERRUPT_FLAG_PINA4 = 0;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PINA5
|
||||
volatile uint8_t INTERRUPT_FLAG_PINA5 = 0;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PINA8
|
||||
volatile uint8_t INTERRUPT_FLAG_PINA8 = 0;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PINA9
|
||||
volatile uint8_t INTERRUPT_FLAG_PINA9 = 0;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PINA10
|
||||
volatile uint8_t INTERRUPT_FLAG_PINA10 = 0;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PINA11
|
||||
volatile uint8_t INTERRUPT_FLAG_PINA11 = 0;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PINA12
|
||||
volatile uint8_t INTERRUPT_FLAG_PINA12 = 0;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PINA13
|
||||
volatile uint8_t INTERRUPT_FLAG_PINA13 = 0;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PINA14
|
||||
volatile uint8_t INTERRUPT_FLAG_PINA14 = 0;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PINA15
|
||||
volatile uint8_t INTERRUPT_FLAG_PINA15 = 0;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PINSS
|
||||
volatile uint8_t INTERRUPT_FLAG_PINSS = 0;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PINSCK
|
||||
volatile uint8_t INTERRUPT_FLAG_PINSCK = 0;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PINMOSI
|
||||
volatile uint8_t INTERRUPT_FLAG_PINMOSI = 0;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PINMISO
|
||||
volatile uint8_t INTERRUPT_FLAG_PINMISO = 0;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN70
|
||||
volatile uint8_t INTERRUPT_FLAG_PIN70 = 0;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN71
|
||||
volatile uint8_t INTERRUPT_FLAG_PIN71 = 0;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN72
|
||||
volatile uint8_t INTERRUPT_FLAG_PIN72 = 0;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN73
|
||||
volatile uint8_t INTERRUPT_FLAG_PIN73 = 0;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN74
|
||||
volatile uint8_t INTERRUPT_FLAG_PIN74 = 0;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN75
|
||||
volatile uint8_t INTERRUPT_FLAG_PIN75 = 0;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN76
|
||||
volatile uint8_t INTERRUPT_FLAG_PIN76 = 0;
|
||||
#endif
|
26
libraries/EnableInterrupt/utility/ei_porta_speed.h
Normal file
26
libraries/EnableInterrupt/utility/ei_porta_speed.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#if defined MIGHTY1284
|
||||
#ifdef INTERRUPT_FLAG_PIN24
|
||||
if (interruptMask & _BV(0)) INTERRUPT_FLAG_PIN24++;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN25
|
||||
if (interruptMask & _BV(1)) INTERRUPT_FLAG_PIN25++;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN26
|
||||
if (interruptMask & _BV(2)) INTERRUPT_FLAG_PIN26++;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN27
|
||||
if (interruptMask & _BV(3)) INTERRUPT_FLAG_PIN27++;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN28
|
||||
if (interruptMask & _BV(4)) INTERRUPT_FLAG_PIN28++;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN29
|
||||
if (interruptMask & _BV(5)) INTERRUPT_FLAG_PIN29++;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN30
|
||||
if (interruptMask & _BV(6)) INTERRUPT_FLAG_PIN30++;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN31
|
||||
if (interruptMask & _BV(7)) INTERRUPT_FLAG_PIN31++;
|
||||
#endif
|
||||
#endif
|
126
libraries/EnableInterrupt/utility/ei_portb_speed.h
Normal file
126
libraries/EnableInterrupt/utility/ei_portb_speed.h
Normal file
@@ -0,0 +1,126 @@
|
||||
#if defined ARDUINO_AVR_ENVIRODIY_MAYFLY || defined ARDUINO_AVR_SODAQ_MBILI
|
||||
#if defined INTERRUPT_FLAG_PIN8
|
||||
if (interruptMask & _BV(0)) INTERRUPT_FLAG_PIN8++;
|
||||
#endif
|
||||
#if defined INTERRUPT_FLAG_PIN9
|
||||
if (interruptMask & _BV(1)) INTERRUPT_FLAG_PIN9++;
|
||||
#endif
|
||||
#if defined INTERRUPT_FLAG_PIN10
|
||||
if (interruptMask & _BV(2)) INTERRUPT_FLAG_PIN10++;
|
||||
#endif
|
||||
#if defined INTERRUPT_FLAG_PIN11
|
||||
if (interruptMask & _BV(3)) INTERRUPT_FLAG_PIN11++;
|
||||
#endif
|
||||
#if defined INTERRUPT_FLAG_PIN12
|
||||
if (interruptMask & _BV(4)) INTERRUPT_FLAG_PIN12++;
|
||||
#endif
|
||||
#if defined INTERRUPT_FLAG_PIN13
|
||||
if (interruptMask & _BV(5)) INTERRUPT_FLAG_PIN13++;
|
||||
#endif
|
||||
#if defined INTERRUPT_FLAG_PIN14
|
||||
if (interruptMask & _BV(6)) INTERRUPT_FLAG_PIN14++;
|
||||
#endif
|
||||
#if defined INTERRUPT_FLAG_PIN15
|
||||
if (interruptMask & _BV(7)) INTERRUPT_FLAG_PIN15++;
|
||||
#endif
|
||||
#elif defined MIGHTY1284
|
||||
#ifdef INTERRUPT_FLAG_PIN0
|
||||
if (interruptMask & _BV(0)) INTERRUPT_FLAG_PIN0++;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN1
|
||||
if (interruptMask & _BV(1)) INTERRUPT_FLAG_PIN1++;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN2
|
||||
if (interruptMask & _BV(2)) INTERRUPT_FLAG_PIN2++;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN3
|
||||
if (interruptMask & _BV(3)) INTERRUPT_FLAG_PIN3++;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN4
|
||||
if (interruptMask & _BV(4)) INTERRUPT_FLAG_PIN4++;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN5
|
||||
if (interruptMask & _BV(5)) INTERRUPT_FLAG_PIN5++;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN6
|
||||
if (interruptMask & _BV(6)) INTERRUPT_FLAG_PIN6++;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN7
|
||||
if (interruptMask & _BV(7)) INTERRUPT_FLAG_PIN7++;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined LEONARDO
|
||||
#ifdef INTERRUPT_FLAG_PINSS
|
||||
if (interruptMask & _BV(0)) INTERRUPT_FLAG_PINSS++;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PINSCK
|
||||
if (interruptMask & _BV(1)) INTERRUPT_FLAG_PINSCK++;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PINMOSI
|
||||
if (interruptMask & _BV(2)) INTERRUPT_FLAG_PINMOSI++;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PINMISO
|
||||
if (interruptMask & _BV(3)) INTERRUPT_FLAG_PINMISO++;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN8
|
||||
if (interruptMask & _BV(4)) INTERRUPT_FLAG_PIN8++;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN9
|
||||
if (interruptMask & _BV(5)) INTERRUPT_FLAG_PIN9++;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN10
|
||||
if (interruptMask & _BV(6)) INTERRUPT_FLAG_PIN10++;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN11
|
||||
if (interruptMask & _BV(7)) INTERRUPT_FLAG_PIN11++;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined ARDUINO_328
|
||||
#ifdef INTERRUPT_FLAG_PIN8
|
||||
if (interruptMask & _BV(0)) INTERRUPT_FLAG_PIN8++;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN9
|
||||
if (interruptMask & _BV(1)) INTERRUPT_FLAG_PIN9++;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN10
|
||||
if (interruptMask & _BV(2)) INTERRUPT_FLAG_PIN10++;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN11
|
||||
if (interruptMask & _BV(3)) INTERRUPT_FLAG_PIN11++;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN12
|
||||
if (interruptMask & _BV(4)) INTERRUPT_FLAG_PIN12++;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN13
|
||||
if (interruptMask & _BV(5)) INTERRUPT_FLAG_PIN13++;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined ARDUINO_MEGA
|
||||
#ifdef INTERRUPT_FLAG_PINSS
|
||||
if (interruptMask & _BV(0)) INTERRUPT_FLAG_PINSS++;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PINSCK
|
||||
if (interruptMask & _BV(1)) INTERRUPT_FLAG_PINSCK++;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PINMOSI
|
||||
if (interruptMask & _BV(2)) INTERRUPT_FLAG_PINMOSI++;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PINMISO
|
||||
if (interruptMask & _BV(3)) INTERRUPT_FLAG_PINMISO++;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN10
|
||||
if (interruptMask & _BV(4)) INTERRUPT_FLAG_PIN10++;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN11
|
||||
if (interruptMask & _BV(5)) INTERRUPT_FLAG_PIN11++;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN12
|
||||
if (interruptMask & _BV(6)) INTERRUPT_FLAG_PIN12++;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN13
|
||||
if (interruptMask & _BV(7)) INTERRUPT_FLAG_PIN13++;
|
||||
#endif
|
||||
#endif
|
47
libraries/EnableInterrupt/utility/ei_portc_speed.h
Normal file
47
libraries/EnableInterrupt/utility/ei_portc_speed.h
Normal file
@@ -0,0 +1,47 @@
|
||||
#if defined MIGHTY1284
|
||||
#if defined INTERRUPT_FLAG_PIN16
|
||||
if (interruptMask & _BV(0)) INTERRUPT_FLAG_PIN16++;
|
||||
#endif
|
||||
#if defined INTERRUPT_FLAG_PIN17
|
||||
if (interruptMask & _BV(1)) INTERRUPT_FLAG_PIN17++;
|
||||
#endif
|
||||
#if defined INTERRUPT_FLAG_PIN18
|
||||
if (interruptMask & _BV(2)) INTERRUPT_FLAG_PIN18++;
|
||||
#endif
|
||||
#if defined INTERRUPT_FLAG_PIN19
|
||||
if (interruptMask & _BV(3)) INTERRUPT_FLAG_PIN19++;
|
||||
#endif
|
||||
#if defined INTERRUPT_FLAG_PIN20
|
||||
if (interruptMask & _BV(4)) INTERRUPT_FLAG_PIN20++;
|
||||
#endif
|
||||
#if defined INTERRUPT_FLAG_PIN21
|
||||
if (interruptMask & _BV(5)) INTERRUPT_FLAG_PIN21++;
|
||||
#endif
|
||||
#if defined INTERRUPT_FLAG_PIN22
|
||||
if (interruptMask & _BV(6)) INTERRUPT_FLAG_PIN22++;
|
||||
#endif
|
||||
#if defined INTERRUPT_FLAG_PIN23
|
||||
if (interruptMask & _BV(7)) INTERRUPT_FLAG_PIN23++;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined ARDUINO_328
|
||||
#if defined INTERRUPT_FLAG_PINA0
|
||||
if (interruptMask & _BV(0)) INTERRUPT_FLAG_PINA0++;
|
||||
#endif
|
||||
#if defined INTERRUPT_FLAG_PINA1
|
||||
if (interruptMask & _BV(1)) INTERRUPT_FLAG_PINA1++;
|
||||
#endif
|
||||
#if defined INTERRUPT_FLAG_PINA2
|
||||
if (interruptMask & _BV(2)) INTERRUPT_FLAG_PINA2++;
|
||||
#endif
|
||||
#if defined INTERRUPT_FLAG_PINA3
|
||||
if (interruptMask & _BV(3)) INTERRUPT_FLAG_PINA3++;
|
||||
#endif
|
||||
#if defined INTERRUPT_FLAG_PINA4
|
||||
if (interruptMask & _BV(4)) INTERRUPT_FLAG_PINA4++;
|
||||
#endif
|
||||
#if defined INTERRUPT_FLAG_PINA5
|
||||
if (interruptMask & _BV(5)) INTERRUPT_FLAG_PINA5++;
|
||||
#endif
|
||||
#endif
|
78
libraries/EnableInterrupt/utility/ei_portd_speed.h
Normal file
78
libraries/EnableInterrupt/utility/ei_portd_speed.h
Normal file
@@ -0,0 +1,78 @@
|
||||
#if defined ARDUINO_AVR_ENVIRODIY_MAYFLY || defined ARDUINO_AVR_SODAQ_MBILI
|
||||
#ifdef INTERRUPT_FLAG_PIN0
|
||||
if (interruptMask & _BV(0)) INTERRUPT_FLAG_PIN0++;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN1
|
||||
if (interruptMask & _BV(1)) INTERRUPT_FLAG_PIN1++;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN2
|
||||
if (interruptMask & _BV(2)) INTERRUPT_FLAG_PIN2++;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN3
|
||||
if (interruptMask & _BV(3)) INTERRUPT_FLAG_PIN3++;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN4
|
||||
if (interruptMask & _BV(4)) INTERRUPT_FLAG_PIN4++;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN5
|
||||
if (interruptMask & _BV(5)) INTERRUPT_FLAG_PIN5++;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN6
|
||||
if (interruptMask & _BV(6)) INTERRUPT_FLAG_PIN6++;
|
||||
#endif
|
||||
#ifdef INTERRUPT_FLAG_PIN7
|
||||
if (interruptMask & _BV(7)) INTERRUPT_FLAG_PIN7++;
|
||||
#endif
|
||||
#elif defined MIGHTY1284
|
||||
#if defined INTERRUPT_FLAG_PIN8
|
||||
if (interruptMask & _BV(0)) INTERRUPT_FLAG_PIN8++;
|
||||
#endif
|
||||
#if defined INTERRUPT_FLAG_PIN9
|
||||
if (interruptMask & _BV(1)) INTERRUPT_FLAG_PIN9++;
|
||||
#endif
|
||||
#if defined INTERRUPT_FLAG_PIN10
|
||||
if (interruptMask & _BV(2)) INTERRUPT_FLAG_PIN10++;
|
||||
#endif
|
||||
#if defined INTERRUPT_FLAG_PIN11
|
||||
if (interruptMask & _BV(3)) INTERRUPT_FLAG_PIN11++;
|
||||
#endif
|
||||
#if defined INTERRUPT_FLAG_PIN12
|
||||
if (interruptMask & _BV(4)) INTERRUPT_FLAG_PIN12++;
|
||||
#endif
|
||||
#if defined INTERRUPT_FLAG_PIN13
|
||||
if (interruptMask & _BV(5)) INTERRUPT_FLAG_PIN13++;
|
||||
#endif
|
||||
#if defined INTERRUPT_FLAG_PIN14
|
||||
if (interruptMask & _BV(6)) INTERRUPT_FLAG_PIN14++;
|
||||
#endif
|
||||
#if defined INTERRUPT_FLAG_PIN15
|
||||
if (interruptMask & _BV(7)) INTERRUPT_FLAG_PIN15++;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined ARDUINO_328
|
||||
#if defined INTERRUPT_FLAG_PIN0
|
||||
if (interruptMask & _BV(0)) INTERRUPT_FLAG_PIN0++;
|
||||
#endif
|
||||
#if defined INTERRUPT_FLAG_PIN1
|
||||
if (interruptMask & _BV(1)) INTERRUPT_FLAG_PIN1++;
|
||||
#endif
|
||||
#if defined INTERRUPT_FLAG_PIN2
|
||||
if (interruptMask & _BV(2)) INTERRUPT_FLAG_PIN2++;
|
||||
#endif
|
||||
#if defined INTERRUPT_FLAG_PIN3
|
||||
if (interruptMask & _BV(3)) INTERRUPT_FLAG_PIN3++;
|
||||
#endif
|
||||
#if defined INTERRUPT_FLAG_PIN4
|
||||
if (interruptMask & _BV(4)) INTERRUPT_FLAG_PIN4++;
|
||||
#endif
|
||||
#if defined INTERRUPT_FLAG_PIN5
|
||||
if (interruptMask & _BV(5)) INTERRUPT_FLAG_PIN5++;
|
||||
#endif
|
||||
#if defined INTERRUPT_FLAG_PIN6
|
||||
if (interruptMask & _BV(6)) INTERRUPT_FLAG_PIN6++;
|
||||
#endif
|
||||
#if defined INTERRUPT_FLAG_PIN7
|
||||
if (interruptMask & _BV(7)) INTERRUPT_FLAG_PIN7++;
|
||||
#endif
|
||||
#endif
|
24
libraries/EnableInterrupt/utility/ei_portj_speed.h
Normal file
24
libraries/EnableInterrupt/utility/ei_portj_speed.h
Normal file
@@ -0,0 +1,24 @@
|
||||
#if defined ARDUINO_MEGA
|
||||
#if defined INTERRUPT_FLAG_PIN15
|
||||
if (interruptMask & _BV(0)) INTERRUPT_FLAG_PIN15++;
|
||||
#endif
|
||||
#if defined INTERRUPT_FLAG_PIN14
|
||||
if (interruptMask & _BV(1)) INTERRUPT_FLAG_PIN14++;
|
||||
#endif
|
||||
#if defined INTERRUPT_FLAG_PIN70
|
||||
if (interruptMask & _BV(2)) INTERRUPT_FLAG_PIN70++;
|
||||
#endif
|
||||
#if defined INTERRUPT_FLAG_PIN71
|
||||
if (interruptMask & _BV(3)) INTERRUPT_FLAG_PIN71++;
|
||||
#endif
|
||||
#if defined INTERRUPT_FLAG_PIN72
|
||||
if (interruptMask & _BV(4)) INTERRUPT_FLAG_PIN72++;
|
||||
#endif
|
||||
#if defined INTERRUPT_FLAG_PIN73
|
||||
if (interruptMask & _BV(5)) INTERRUPT_FLAG_PIN73++;
|
||||
#endif
|
||||
#if defined INTERRUPT_FLAG_PIN74
|
||||
if (interruptMask & _BV(6)) INTERRUPT_FLAG_PIN74++;
|
||||
#endif
|
||||
#endif
|
||||
// NOTE: 75 and 76 are "fake" External interrupt pins.
|
26
libraries/EnableInterrupt/utility/ei_portk_speed.h
Normal file
26
libraries/EnableInterrupt/utility/ei_portk_speed.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#if defined ARDUINO_MEGA
|
||||
#if defined INTERRUPT_FLAG_PINA8
|
||||
if (interruptMask & _BV(0)) INTERRUPT_FLAG_PINA8++;
|
||||
#endif
|
||||
#if defined INTERRUPT_FLAG_PINA9
|
||||
if (interruptMask & _BV(1)) INTERRUPT_FLAG_PINA9++;
|
||||
#endif
|
||||
#if defined INTERRUPT_FLAG_PINA10
|
||||
if (interruptMask & _BV(2)) INTERRUPT_FLAG_PINA10++;
|
||||
#endif
|
||||
#if defined INTERRUPT_FLAG_PINA11
|
||||
if (interruptMask & _BV(3)) INTERRUPT_FLAG_PINA11++;
|
||||
#endif
|
||||
#if defined INTERRUPT_FLAG_PINA12
|
||||
if (interruptMask & _BV(4)) INTERRUPT_FLAG_PINA12++;
|
||||
#endif
|
||||
#if defined INTERRUPT_FLAG_PINA13
|
||||
if (interruptMask & _BV(5)) INTERRUPT_FLAG_PINA13++;
|
||||
#endif
|
||||
#if defined INTERRUPT_FLAG_PINA14
|
||||
if (interruptMask & _BV(6)) INTERRUPT_FLAG_PINA14++;
|
||||
#endif
|
||||
#if defined INTERRUPT_FLAG_PINA15
|
||||
if (interruptMask & _BV(7)) INTERRUPT_FLAG_PINA15++;
|
||||
#endif
|
||||
#endif
|
المرجع في مشكلة جديدة
حظر مستخدم