-
Notifications
You must be signed in to change notification settings - Fork 369
RMT: Remove generic data types #4616
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
which was probably of little value, anyway, and also in preparation for adding more sophisticated Encoder data types
0c22842 to
3711df1
Compare
[HIL trust list]Trusted users for this PR (click to expand) |
|
Author @wisp3rwind was trusted for this PR via the |
|
/hil quick |
|
Triggered quick HIL run for #4616. Run: https://github.com/esp-rs/esp-hal/actions/runs/19942537608 Status update: ✅ HIL (quick) run succeeded. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR simplifies the RMT (Remote Control) peripheral API by removing generic type support from transmission and reception methods. The change requires buffers to contain PulseCode directly rather than supporting arbitrary types through Into<PulseCode> and From<PulseCode> trait bounds.
Key Changes:
- Removed generic type parameters from
TxTransactionandRxTransactionstructs - Updated all TX methods to accept
&[PulseCode]directly instead of genericimpl Into<PulseCode> - Updated all RX methods to accept
&mut [PulseCode]directly instead of genericimpl From<PulseCode>
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| esp-hal/src/rmt/writer.rs | Updated write method to accept &[PulseCode] directly and removed .into() conversion |
| esp-hal/src/rmt/reader.rs | Updated read method to accept &mut [PulseCode] directly and removed .into() conversion |
| esp-hal/src/rmt.rs | Removed generic type parameters from transaction structs and future types; updated all public API methods for both blocking and async channels |
| esp-hal/MIGRATING-1.0.0.md | Added comprehensive migration guide with code examples showing how to update from u32 arrays to PulseCode arrays |
| esp-hal/CHANGELOG.md | Added changelog entry documenting the breaking change; improved formatting consistency |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
JurajSadel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you
bugadani
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you :)
Thank you for your contribution!
We appreciate the time and effort you've put into this pull request.
To help us review it efficiently, please ensure you've gone through the following checklist:
Submission Checklist 📝
cargo xtask fmt-packagescommand to ensure that all changed code is formatted correctly.CHANGELOG.mdin the proper section.Extra:
Pull Request Details 📖
Split out of #4604.
This changes tx and rx methods to require
PulseCodeinstead of supportingimpl Into<PulseCode>andimpl From<PulseCode>, respectively.Supporting these traits has probably had limited value, was only added (by me) very recently, and removing them prepares for supporting more general data types (#4604 or whatever alternative turns out to be a better design).
This was also suggested by @bugadani in #4126 (review).
Testing
HIL tests.