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>
This commit is contained in:
parent
b03ec6dd29
commit
64149e4df6
1 changed files with 6 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue