Przeglądaj źródła

Fix DMAChannel transferSize() on Teensy LC

fixes #266
teensy4-core
PaulStoffregen 6 lat temu
rodzic
commit
5fdbe446bc
1 zmienionych plików z 3 dodań i 3 usunięć
  1. +3
    -3
      teensy3/DMAChannel.h

+ 3
- 3
teensy3/DMAChannel.h Wyświetl plik

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


Ładowanie…
Anuluj
Zapisz