Procházet zdrojové kódy

Merge pull request #503 from WMXZ-EU/patch-3

Update DMAChannel.h
main
Paul Stoffregen před 4 roky
rodič
revize
8804c55c95
Žádný účet není propojen s e-mailovou adresou tvůrce revize
1 změnil soubory, kde provedl 13 přidání a 1 odebrání
  1. +13
    -1
      teensy3/DMAChannel.h

+ 13
- 1
teensy3/DMAChannel.h Zobrazit soubor

NVIC_ENABLE_IRQ(IRQ_DMA_CH0 + channel); NVIC_ENABLE_IRQ(IRQ_DMA_CH0 + channel);
} }


void attachInterrupt(void (*isr)(void), uint8_t prio) {
_VectorsRam[channel + IRQ_DMA_CH0 + 16] = isr;
NVIC_ENABLE_IRQ(IRQ_DMA_CH0 + channel);
NVIC_SET_PRIORITY(IRQ_DMA_CH0 + channel, prio);
}
void detachInterrupt(void) { void detachInterrupt(void) {
NVIC_DISABLE_IRQ(IRQ_DMA_CH0 + channel); NVIC_DISABLE_IRQ(IRQ_DMA_CH0 + channel);
} }
_VectorsRam[channel + IRQ_DMA_CH0 + 16] = isr; _VectorsRam[channel + IRQ_DMA_CH0 + 16] = isr;
NVIC_ENABLE_IRQ(IRQ_DMA_CH0 + channel); NVIC_ENABLE_IRQ(IRQ_DMA_CH0 + channel);
} }

void attachInterrupt(void (*isr)(void), uint8_t prio) {
_VectorsRam[channel + IRQ_DMA_CH0 + 16] = isr;
NVIC_ENABLE_IRQ(IRQ_DMA_CH0 + channel);
NVIC_SET_PRIORITY(IRQ_DMA_CH0 + channel, prio);
}
void detachInterrupt(void) { void detachInterrupt(void) {
NVIC_DISABLE_IRQ(IRQ_DMA_CH0 + channel); NVIC_DISABLE_IRQ(IRQ_DMA_CH0 + channel);
} }

Načítá se…
Zrušit
Uložit