瀏覽代碼

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

Update DMAChannel.h
main
Paul Stoffregen 4 年之前
父節點
當前提交
8804c55c95
No account linked to committer's email address
共有 1 個文件被更改,包括 13 次插入1 次删除
  1. +13
    -1
      teensy3/DMAChannel.h

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

@@ -535,6 +535,12 @@ public:
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) {
NVIC_DISABLE_IRQ(IRQ_DMA_CH0 + channel);
}
@@ -1035,7 +1041,13 @@ public:
_VectorsRam[channel + IRQ_DMA_CH0 + 16] = isr;
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) {
NVIC_DISABLE_IRQ(IRQ_DMA_CH0 + channel);
}

Loading…
取消
儲存