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