Skip to content

Commit 65c5dc1

Browse files
authored
SPI DMA: use State for both blocking and async operations (#1985)
* use `State` for both blocking and async operations, remove async version of SpiDmaBus in favour of being generic over the mode * reuse wait_for_idle more * changelog * rename generic params for consistency * Add duplex mode to SpiDmaBus * implement HalfDuplexReadWrite for SpiDmaBus * Docs on new async APIs * Limit half duplex transfers to the capacity of the DmaBuf * docs * rebase tests * address review comments * remove duplex traits from spi * fix tests * spi docs rejig * s/InUse/TemporarilyRemoved/g
1 parent 8aa1a88 commit 65c5dc1

File tree

9 files changed

+394
-308
lines changed

9 files changed

+394
-308
lines changed

esp-hal/CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Added
1111

12-
- Introduce DMA buffer objects (#1856)
12+
- Introduce DMA buffer objects (#1856, #1985)
1313
- Added new `Io::new_no_bind_interrupt` constructor (#1861)
1414
- Added touch pad support for esp32 (#1873, #1956)
1515
- Allow configuration of period updating method for MCPWM timers (#1898)
@@ -23,7 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2323
### Changed
2424

2525
- Peripheral driver constructors don't take `InterruptHandler`s anymore. Use `set_interrupt_handler` to explicitly set the interrupt handler now. (#1819)
26-
- Migrate SPI driver to use DMA buffer objects (#1856)
26+
- Migrate SPI driver to use DMA buffer objects (#1856, #1985)
2727
- Use the peripheral ref pattern for `OneShotTimer` and `PeriodicTimer` (#1855)
2828
- Improve SYSTIMER API (#1871)
2929
- DMA buffers now don't require a static lifetime. Make sure to never `mem::forget` an in-progress DMA transfer (consider using `#[deny(clippy::mem_forget)]`) (#1837)
@@ -51,6 +51,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
5151
- The `AesFlavour` trait no longer has the `ENCRYPT_MODE`/`DECRYPT_MODE` associated constants (#1849)
5252
- Removed `FlashSafeDma` (#1856)
5353
- Remove redundant WithDmaSpi traits (#1975)
54+
- `IsFullDuplex` and `IsHalfDuplex` traits (#1985)
5455

5556
## [0.19.0] - 2024-07-15
5657

esp-hal/src/dma/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#![doc = crate::before_snippet!()]
2020
//! # use esp_hal::dma_buffers;
2121
//! # use esp_hal::gpio::Io;
22-
//! # use esp_hal::spi::{master::{Spi, prelude::*}, SpiMode};
22+
//! # use esp_hal::spi::{master::Spi, SpiMode};
2323
//! # use esp_hal::dma::{Dma, DmaPriority};
2424
//! # use crate::esp_hal::prelude::_fugit_RateExtU32;
2525
//! let dma = Dma::new(peripherals.DMA);

0 commit comments

Comments
 (0)