mimxrt/dma_channel: Fix the DMA channel management.
The MIMXRT1011 has only 16 channels, so size the channel list accordingly.
This commit is contained in:
parent
101d2ddea3
commit
06d1b02014
@ -27,10 +27,17 @@
|
||||
#include "dma_channel.h"
|
||||
|
||||
// List of channel flags: true: channel used, false: channel available
|
||||
static bool channel_list[32] = { true, true, true, true, false, false, false, false,
|
||||
static bool channel_list[FSL_FEATURE_DMAMUX_MODULE_CHANNEL] = {
|
||||
true, true, true, true, false, false, false, false,
|
||||
false, false, false, false, false, false, false, false,
|
||||
|
||||
#if FSL_FEATURE_DMAMUX_MODULE_CHANNEL > 16
|
||||
|
||||
false, false, false, false, false, false, false, false,
|
||||
false, false, false, false, false, false, false, false };
|
||||
false, false, false, false, false, false, false, false
|
||||
|
||||
#endif
|
||||
};
|
||||
|
||||
// allocate_channel(): retrieve an available channel. Return the number or -1
|
||||
int allocate_dma_channel(void) {
|
||||
|
Loading…
Reference in New Issue
Block a user