瀏覽代碼

Fix DMAChannel transferSize() on Teensy LC

fixes #266
teensy4-core
PaulStoffregen 6 年之前
父節點
當前提交
5fdbe446bc
共有 1 個檔案被更改,包括 3 行新增3 行删除
  1. +3
    -3
      teensy3/DMAChannel.h

+ 3
- 3
teensy3/DMAChannel.h 查看文件

@@ -811,11 +811,11 @@ public:
void transferSize(unsigned int len) {
uint32_t dcr = CFG->DCR & 0xF0C8FFFF;
if (len == 4) {
CFG->DCR = dcr | DMA_DCR_DSIZE(0) | DMA_DCR_DSIZE(0);
CFG->DCR = dcr | DMA_DCR_SSIZE(0) | DMA_DCR_DSIZE(0);
} else if (len == 2) {
CFG->DCR = dcr | DMA_DCR_DSIZE(2) | DMA_DCR_DSIZE(2);
CFG->DCR = dcr | DMA_DCR_SSIZE(2) | DMA_DCR_DSIZE(2);
} else {
CFG->DCR = dcr | DMA_DCR_DSIZE(1) | DMA_DCR_DSIZE(1);
CFG->DCR = dcr | DMA_DCR_SSIZE(1) | DMA_DCR_DSIZE(1);
}
}


Loading…
取消
儲存