Browse Source

video: stm32_dcmi: addition of STM32L4 DMA support

The STM32 DMA LL api differ between the STM32F7 and the STM32L4
in order to get the CHANNEL instance information.  For that
reason, enclose within preproc statements STM32F7 specific code
and add STM32L4 code related to the DMA configuration for the
DCMI peripheral.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
pull/90923/head
Alain Volmat 8 months ago committed by Anas Nashif
parent
commit
64149e4df6
  1. 6
      drivers/video/video_stm32_dcmi.c

6
drivers/video/video_stm32_dcmi.c

@ -156,10 +156,16 @@ static int stm32_dma_init(const struct device *dev) @@ -156,10 +156,16 @@ static int stm32_dma_init(const struct device *dev)
hdma.Init.MemDataAlignment = DMA_MDATAALIGN_WORD;
hdma.Init.Mode = DMA_CIRCULAR;
hdma.Init.Priority = DMA_PRIORITY_HIGH;
#if defined(CONFIG_SOC_SERIES_STM32F7X)
hdma.Init.FIFOMode = DMA_FIFOMODE_DISABLE;
#endif
#if defined(CONFIG_SOC_SERIES_STM32F7X)
hdma.Instance = __LL_DMA_GET_STREAM_INSTANCE(config->dma.reg,
config->dma.channel);
#elif defined(CONFIG_SOC_SERIES_STM32L4X)
hdma.Instance = __LL_DMA_GET_CHANNEL_INSTANCE(config->dma.reg, config->dma.channel);
#endif
/* Initialize DMA HAL */
__HAL_LINKDMA(&data->hdcmi, DMA_Handle, hdma);

Loading…
Cancel
Save