Skip to content

Commit 462d6e0

Browse files
djiatsaf-stfouge
andcommitted
include: zephyr: drivers: dma: add support for circular DMA
This macro will help us to enable the 5th bit CIRC on the DMA_CCRx register for all stm32 series having this configuration. Thus the DMA will be able to handle the circular buffers. Signed-off-by: Fabrice DJIATSA <[email protected]> co-authored-by: Cyril Fougeray <[email protected]>
1 parent 52fd016 commit 462d6e0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/zephyr/drivers/dma/dma_stm32.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@
5656
DT_INST_DMAS_CELL_BY_IDX(id, idx, channel_config)
5757

5858
/* macros for channel-config */
59+
/* enable circular buffer */
60+
#define STM32_DMA_CONFIG_CYCLIC(config) ((config >> 5) & 0x1)
5961
/* direction defined on bits 6-7 */
6062
/* 0 -> MEM_TO_MEM, 1 -> MEM_TO_PERIPH, 2 -> PERIPH_TO_MEM */
6163
#define STM32_DMA_CONFIG_DIRECTION(config) ((config >> 6) & 0x3)

0 commit comments

Comments
 (0)