Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions esp-hal/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

- The clock frequency accessor functions no longer need to lock the clock tree (#5461)
- SPI: `SpiDmaBus` has been merged into `SpiDma`. `with_buffers` now returns `SpiDma` directly, and the buffer-taking transfer methods have been renamed to `read_buffer`, `write_buffer`, `transfer_buffers`, `half_duplex_read_buffer` and `half_duplex_write_buffer` to avoid conflicts with the `SpiBus` trait methods. (#5272)

### Fixed

Expand Down
24 changes: 24 additions & 0 deletions esp-hal/MIGRATING-1.1.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,27 @@ and (for chip-specific clocks) `esp_hal::clock::ll`.
+let apb_freq = Rate::from_hz(clock::ll::apb_clk_frequency());
+let xtal_freq = clock::xtal_clock();
```

## Merged DMA-driven SPI drivers

`SpiDmaBus` no longer exists. `SpiDma::with_buffers` now returns `SpiDma` itself,
which implements `embedded_hal::spi::SpiBus` and `embedded_hal_async::spi::SpiBus`
directly.

```diff,rust
-let mut spi: SpiDmaBus<_> = spi_dma.with_buffers(dma_rx_buf, dma_tx_buf);
+let mut spi: SpiDma<_> = spi_dma.with_buffers(dma_rx_buf, dma_tx_buf);
```

Several methods on `SpiDma` were renamed to avoid conflicts with the `SpiBus` trait:

| Before | After |
|---|---|
| `read` | `read_buffer` |
| `write` | `write_buffer` |
| `transfer` | `transfer_buffers` |
| `half_duplex_read` | `half_duplex_read_buffer` |
| `half_duplex_write` | `half_duplex_write_buffer` |

`SpiDmaBus::split` is no longer available; to recover the buffers, use
`SpiDmaTransfer::wait` on the transfer returned by the buffer methods.
Loading
Loading