瀏覽代碼

Fix DMAChannel transferCount (KurtE)

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

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

@@ -311,11 +311,12 @@ public:

// Set the number of transfers (number of triggers until complete)
void transferCount(unsigned int len) {
if (len > 32767) return;
if (len >= 512) {
if (!(TCD->BITER & DMA_TCD_BITER_ELINK)) {
if (len > 32767) return;
TCD->BITER = len;
TCD->CITER = len;
} else {
if (len > 511) return;
TCD->BITER = (TCD->BITER & 0xFE00) | len;
TCD->CITER = (TCD->CITER & 0xFE00) | len;
}

Loading…
取消
儲存