瀏覽代碼

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 年之前
父節點
當前提交
ba7381ad44
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 13 行新增1 行删除
  1. +13
    -1
      teensy3/DMAChannel.h

+ 13
- 1
teensy3/DMAChannel.h 查看文件

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…
取消
儲存