diff --git a/ports/mimxrt/dma_channel.c b/ports/mimxrt/dma_channel.c index 3dd043a66b..c6cae9da9c 100644 --- a/ports/mimxrt/dma_channel.c +++ b/ports/mimxrt/dma_channel.c @@ -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, - false, false, false, false, false, false, false, false, - false, false, false, false, false, false, false, false, - false, false, false, false, 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 + + #endif +}; // allocate_channel(): retrieve an available channel. Return the number or -1 int allocate_dma_channel(void) {