Skip to content

Commit

Permalink
cpu/stm32/periph/dma: make dma_prepare() generic
Browse files Browse the repository at this point in the history
This patch makes dma_prepare() handle register names a bit more
generically.
  • Loading branch information
Enoch247 committed Oct 12, 2022
1 parent c2f8177 commit b44c7df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cpu/stm32/periph/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ void dma_prepare(dma_t dma, void *mem, size_t len, bool incr_mem)
STM32_DMA_Stream_Type *stream = dma_ctx[dma].stream;
uint32_t ctr_reg = stream->CONTROL_REG;

#if CPU_FAM_STM32F2 || CPU_FAM_STM32F4 || CPU_FAM_STM32F7
#ifdef DMA_SxCR_MINC
stream->CONTROL_REG = (ctr_reg & ~(DMA_SxCR_MINC)) |
(incr_mem << DMA_SxCR_MINC_Pos);
#else
Expand Down

0 comments on commit b44c7df

Please sign in to comment.