drivers: dma: stm32 initialize a dma_stm32_data structure
In the dma.h there is a dma_ctx structure using a magic code to be identify. This structure must be prepared as a new element of the dma_stm32_data. Signed-off-by: Francois Ramu <francois.ramu@st.com>
This commit is contained in:
parent
7d94b0ccfd
commit
e90c47fbc4
2 changed files with 5 additions and 0 deletions
|
@ -610,6 +610,10 @@ static int dma_stm32_init(const struct device *dev)
|
||||||
#endif /* CONFIG_DMAMUX_STM32 */
|
#endif /* CONFIG_DMAMUX_STM32 */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
((struct dma_stm32_data *)dev->data)->dma_ctx.magic = 0;
|
||||||
|
((struct dma_stm32_data *)dev->data)->dma_ctx.dma_channels = 0;
|
||||||
|
((struct dma_stm32_data *)dev->data)->dma_ctx.atomic = 0;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,7 @@ struct dma_stm32_stream {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct dma_stm32_data {
|
struct dma_stm32_data {
|
||||||
|
struct dma_context dma_ctx;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct dma_stm32_config {
|
struct dma_stm32_config {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue