Add SpiDmaBus::split for moving between manual & automatic DMA buffers (#2824)
* Allow swapping dma buffers * Deconstruct makes more sense * Format * Changelog * Race-conditioned * Change SpiDmaBus::deconstruct name to SpiDmaBus::split * Add flush & bracket references * Fix mutability * Fix name of generic param --------- Co-authored-by: ferris <ferris@devdroplets.com> Co-authored-by: Dániel Buga <bugadani@gmail.com>
This commit is contained in:
parent
5c30c925ca
commit
2e6a95ac99
@ -31,6 +31,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- Peripheral singletons now implement `Debug` and `defmt::Format` (#2682, #2834)
|
||||
- `BurstConfig`, a device-specific configuration for configuring DMA transfers in burst mode (#2543)
|
||||
- `{DmaRxBuf, DmaTxBuf, DmaRxTxBuf}::set_burst_config` (#2543)
|
||||
- Added `SpiDmaBus::split` for moving between manual & automatic DMA buffers (#2824)
|
||||
- ESP32-S2: DMA support for AES (#2699)
|
||||
- Added `transfer_in_place_async` and embedded-hal-async implementation to `Spi` (#2691)
|
||||
- `InterruptHandler` now implements `Hash` and `defmt::Format` (#2830)
|
||||
|
||||
@ -1653,6 +1653,12 @@ mod dma {
|
||||
tx_buf,
|
||||
}
|
||||
}
|
||||
|
||||
/// Splits [SpiDmaBus] back into [SpiDma], [DmaRxBuf] and [DmaTxBuf].
|
||||
pub fn split(mut self) -> (SpiDma<'d, Dm, T>, DmaRxBuf, DmaTxBuf) {
|
||||
self.wait_for_idle();
|
||||
(self.spi_dma, self.rx_buf, self.tx_buf)
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> InterruptConfigurable for SpiDmaBus<'_, Blocking, T>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user