In this PR, I provide a common scheme for DMA support in the STM32 communication drivers.
First, STM32.DMA.Interrupts factorizes the handling of interrupts for DMA transfer. It's a simple protected object, the configuration of DMA streams is the same.
I then use this in the STM32.SPI.DMA driver in a proof of concept that can be applied to I2C, UART, etc. The idea is that the configuration code is shared, only the transfers primitives differ which makes for a simple and clear implementation.
These new packages are used in OpenMV.Sensor for the DCMI transfer and OpenMV.LCD with SPI port.
In this PR, I provide a common scheme for DMA support in the STM32 communication drivers.
First, STM32.DMA.Interrupts factorizes the handling of interrupts for DMA transfer. It's a simple protected object, the configuration of DMA streams is the same.
I then use this in the STM32.SPI.DMA driver in a proof of concept that can be applied to I2C, UART, etc. The idea is that the configuration code is shared, only the transfers primitives differ which makes for a simple and clear implementation.
These new packages are used in OpenMV.Sensor for the DCMI transfer and OpenMV.LCD with SPI port.