Sfoglia il codice sorgente

Fix usingInterrupt()

... see forum, but I saw now it the same interrupt for every pin, so here is a more simpe solution
main
Frank 5 anni fa
parent
commit
c2197dbcf6
Nessun account collegato all'indirizzo email del committer
1 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  1. +4
    -0
      SPI.h

+ 4
- 0
SPI.h Vedi File

@@ -1118,6 +1118,9 @@ public:
// (eg, a timer), interruptNumber should be 255.
void usingInterrupt(uint8_t n) {
if (n >= CORE_NUM_DIGITAL) return;
#if defined(__IMXRT1062__)
usingInterrupt(IRQ_GPIO6789);
#elif defined(__IMXRT1052__)
volatile uint32_t *gpio = portOutputRegister(n);
switch((uint32_t)gpio) {
case (uint32_t)&GPIO1_DR:
@@ -1137,6 +1140,7 @@ public:
usingInterrupt(IRQ_GPIO4_16_31);
break;
}
#endif
}
void usingInterrupt(IRQ_NUMBER_t interruptName);
void notUsingInterrupt(IRQ_NUMBER_t interruptName);

Loading…
Annulla
Salva