Skip to content

Commit 6c3c4fe

Browse files
committed
RMT: changelog and migration guide
1 parent 37dfb3e commit 6c3c4fe

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

esp-hal/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
## [Unreleased]
99

1010
### Added
11+
- All public RMT types now derive `Debug`. (#4302)
1112

1213

1314
### Changed
1415

1516
- `work_queue` is no longer public (#4357)
1617
- UART memory is now powered down when the driver is no longer in use. (#4354)
18+
- `rmt::SingleShotTxTransaction` has been renamed to `rmt::TxTransaction`. (#4302)
19+
- `rmt::ChannelCreator::configure_tx` and `rmt::ChannelCreator::configure_rx` now take the configuration by reference (#4302)
1720

1821
### Fixed
22+
- RMT: All blocking methods now return the channel on failure (#4302)
23+
- RMT: the `place_rmt_driver_in_ram` option now also places the async interrupt handler in RAM (#4302)
1924

2025

2126
### Removed

esp-hal/MIGRATING-1.0.0-rc.1.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,31 @@
11
# Migration Guide from 1.0.0-rc.1 to {{currentVersion}}
2+
3+
## RMT Changes
4+
5+
Several details of the driver structs and their methods have changed:
6+
7+
- `SingleShotTxTransaction` has been renamed to `TxTransaction`.
8+
- All `Channel` and `ChannelCreator` methods that take their arguments (channels and pins) by value now return them on failure; this might require changed to error handling. Changed methods are
9+
- `ChannelCreator<'_, _, _>::configure_tx` and `ChannelCreator<'_, _, _>::configure_rx`,
10+
- `Channel<'_, Blocking, Tx>::transmit`,
11+
- `Channel<'_, Blocking, Tx>::transmit_continuously`,
12+
- `Channel<'_, Blocking, Rx>::receive`.
13+
- The `ChannelCreator::configure_tx` and `ChannelCreator::configure_rx` methods now take the configuration by reference.
14+
15+
```diff
16+
-let mut tx = rmt.channel0.configure_tx(tx_pin, TxChannelConfig::default());
17+
-let mut rx = rmt.channel2.configure_rx(rx_pin, RxChannelConfig::default());
18+
+let mut tx = rmt.channel0.configure_tx(tx_pin, &TxChannelConfig::default());
19+
+let mut rx = rmt.channel2.configure_rx(rx_pin, &RxChannelConfig::default());
20+
21+
-let tx_transaction: SingleShotTxTransaction<'_, PulseCode> = tx.transmit(&data)?;
22+
+let tx_transaction: TxTransaction<'_, PulseCode> = match tx.transmit(&data) {
23+
+ Ok(t) => t,
24+
+ Err((e, channel)) => {
25+
+ // Now, the `channel` is not lost permanently, but can continue to be used
26+
+ // (e.g. to retry configuration with different parameters)
27+
+ e?
28+
+ }
29+
+};
30+
```
31+

0 commit comments

Comments
 (0)