mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-16 11:21:18 +03:00
Fixed WInterrupts to work with the ATmega168.
This commit is contained in:
@ -35,6 +35,10 @@
|
|||||||
volatile static voidFuncPtr intFunc[EXTERNAL_NUM_INTERRUPTS];
|
volatile static voidFuncPtr intFunc[EXTERNAL_NUM_INTERRUPTS];
|
||||||
// volatile static voidFuncPtr twiIntFunc;
|
// volatile static voidFuncPtr twiIntFunc;
|
||||||
|
|
||||||
|
#if defined(__AVR_ATmega168__)
|
||||||
|
#define MCUCR EICRA
|
||||||
|
#define GICR EIMSK
|
||||||
|
#endif
|
||||||
|
|
||||||
void attachInterrupt(uint8_t interruptNum, void (*userFunc)(void), int mode) {
|
void attachInterrupt(uint8_t interruptNum, void (*userFunc)(void), int mode) {
|
||||||
if(interruptNum < EXTERNAL_NUM_INTERRUPTS) {
|
if(interruptNum < EXTERNAL_NUM_INTERRUPTS) {
|
||||||
|
Reference in New Issue
Block a user