Skip to content

Commit

Permalink
Merge pull request betaflight#7315 from jflyper/bfdev-fix-dmaspec-dma…
Browse files Browse the repository at this point in the history
…-channel

[DMA] dma spec - Channel spec should be DMA_Channel_x.
  • Loading branch information
jflyper authored Dec 31, 2018
2 parents be797d1 + 8e46b4f commit 4778ad6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/main/drivers/dma_reqmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/main/drivers/dma_reqmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4778ad6

Please sign in to comment.