Browse Source

Only 16 DMA channels are supported, even if more in hardware

teensy4-core
PaulStoffregen 9 years ago
parent
commit
3ebbafe0ab
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      teensy3/DMAChannel.cpp

+ 6
- 1
teensy3/DMAChannel.cpp View File

@@ -1,5 +1,10 @@
#include "DMAChannel.h"

#if DMA_NUM_CHANNELS > 16
#undef DMA_NUM_CHANNELS
#define DMA_NUM_CHANNELS 16
#endif


// The channel allocation bitmask is accessible from "C" namespace,
// so C-only code can reserve DMA channels
@@ -65,7 +70,7 @@ void DMAChannel::release(void)
__disable_irq();
dma_channel_allocated_mask &= ~(1 << channel);
__enable_irq();
channel = 16;
channel = DMA_NUM_CHANNELS;
TCD = (TCD_t *)0;
}


Loading…
Cancel
Save