Skip to content

Commit c03d4a5

Browse files
committed
Fix #1134
1 parent 9a50e07 commit c03d4a5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

megaavr/cores/megatinycore/WInterrupts.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
SREG = oldSREG;
110110
}
111111
}
112-
#if !defined(CORE_ATTACH_EARLYCLEAR)
112+
#if !defined(CORE_ATTACH_EARLYCLEAR) // late clear.
113113
void __attribute__((naked)) __attribute__((used)) __attribute__((noreturn)) isrBody() {
114114
asm volatile (
115115
"AttachedISR:" "\n\t" // as the scene opens, we have r16 on the stack already, portnumber x 2 in the r16
@@ -291,7 +291,7 @@
291291
}
292292
uint8_t port = digitalPinToPort(pin);
293293
uint8_t p = (port << 5) + bitpos;
294-
*(((volatile uint8_t*) &PORTA_PIN0CTRL) + p) &= 0xF1; // int off....
294+
*(((volatile uint8_t*) &PORTA_PIN0CTRL) + p) &= 0xF8; // int off....
295295
*((volatile uint8_t*) ((uint16_t)((port << 4) + 3))) = (1 << bitpos);// flag clear
296296
intFunc[port][bitpos] = 0; // clear pointer
297297
}
@@ -368,7 +368,7 @@
368368
#endif
369369
#else /* This is the old implementation, and it's copyright boilerplate. */
370370

371-
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
371+
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */ //<---- FFS! That was in the original!
372372

373373
/*
374374
Part of the Wiring project - http://wiring.uniandes.edu.co

0 commit comments

Comments
 (0)