|
|
|
|
|
|
|
|
#include "DMAChannel.h" |
|
|
#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, |
|
|
// The channel allocation bitmask is accessible from "C" namespace, |
|
|
// so C-only code can reserve DMA channels |
|
|
// so C-only code can reserve DMA channels |
|
|
|
|
|
|
|
|
__disable_irq(); |
|
|
__disable_irq(); |
|
|
dma_channel_allocated_mask &= ~(1 << channel); |
|
|
dma_channel_allocated_mask &= ~(1 << channel); |
|
|
__enable_irq(); |
|
|
__enable_irq(); |
|
|
channel = 16; |
|
|
|
|
|
|
|
|
channel = DMA_NUM_CHANNELS; |
|
|
TCD = (TCD_t *)0; |
|
|
TCD = (TCD_t *)0; |
|
|
} |
|
|
} |
|
|
|
|
|
|