You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
598: BREAKING CHANGE: Ability to use 1 DMA channel for TX or RX only for I2C dma implementation r=burrbull a=SpeedCrash100
# Short description
This PR closes#590
* Adds two methods to the blocking I2c implementation: `use_dma_tx`, `use_dma_rx` to create I2CMasterDma that use only one of Tx/Rx channels.
* Clients can only use `write_dma` and all blocking methods if using Tx only I2c DMA.
* Clients can only use `read_dma` and all blocking methods if using Rx only I2c DMA.
# What has changed for clients
* An `I2CMasterDma` signature now has 3 generic parameters:
1. I2C instance
2. `TxDMA` with same I2C instance, DMA stream and channel number or `NoDMA` if Tx is not used
3. `RxDMA` with same I2C instance, DMA stream and channel number or `NoDMA` if Rx is not used
* The client must import `I2CMasterHandleIT` from `stm32f4xx_hal::i2c::dma` for access interrupt handling methods or just use `stm32f4xx_hal::prelude::*`
* The client must also import `TxDMA`, `RxDMA`, `NoDMA` from same module
Co-authored-by: SpeedCrash100 <[email protected]>
0 commit comments