Browse Source

Update DMAChannel.h

Allow in both KINETISK and KINETISL DMA interrupt with priority
previous PR was only on one of them
teensy4-core
WMXZ-EU 4 years ago
parent
commit
ba7381ad44
No account linked to committer's email address
1 changed files with 13 additions and 1 deletions
  1. +13
    -1
      teensy3/DMAChannel.h

+ 13
- 1
teensy3/DMAChannel.h View File

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);
} }

Loading…
Cancel
Save