diff --git a/src/main/drivers/dma_reqmap.c b/src/main/drivers/dma_reqmap.c index 77f8784537b..83434092841 100644 --- a/src/main/drivers/dma_reqmap.c +++ b/src/main/drivers/dma_reqmap.c @@ -38,7 +38,12 @@ typedef struct dmaRequestMapping_s { } dmaRequestMapping_t; #if defined(STM32F4) || defined(STM32F7) -#define D(d, s, c) { DMA_CODE(d, s, c), DMA ## d ## _Stream ## s, c } + +#if defined(STM32F4) +#define D(d, s, c) { DMA_CODE(d, s, c), DMA ## d ## _Stream ## s, DMA_Channel_ ## c } +#elif defined(STM32F7) +#define D(d, s, c) { DMA_CODE(d, s, c), DMA ## d ## _Stream ## s, DMA_CHANNEL_ ## c } +#endif static const dmaRequestMapping_t dmaRequestMapping[] = { #ifdef USE_SPI diff --git a/src/main/drivers/dma_reqmap.h b/src/main/drivers/dma_reqmap.h index c31c6d1e4ac..883c609533c 100644 --- a/src/main/drivers/dma_reqmap.h +++ b/src/main/drivers/dma_reqmap.h @@ -28,7 +28,7 @@ typedef struct dmaChannelSpec_s { dmaCode_t code; #if defined(STM32F4) || defined(STM32F7) DMA_Stream_TypeDef *ref; - uint8_t channel; + uint32_t channel; #else DMA_Channel_TypeDef *ref; #endif