-
Notifications
You must be signed in to change notification settings - Fork 208
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
Use enumset for DMA interrupts instead of countless functions #2196
Conversation
I'd rather if you sent everything in at once, if you're ready with the other parts. Just separating into small-ish commits is enough, and it's sometimes better if we have the complete picture up front. |
Noted. In this case, I don't have the other parts ready yet. |
Looks like the HIL setup for the base ESP32 is broken. Almost like the usb cable is disconnected. |
It's being looked at.
:) Given the +200 lines of diff... 😅 |
Done |
I can at least confirm the i2s_sound example still works on ESP32 |
…bits_as_enum # Conflicts: # esp-hal/src/dma/pdma.rs
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.
If you can make the flag enums' discriminants correspond to their actual register bits, there's a chance the compiler can see through the code and read the register into the enumset in one step.
I'll not ask you to start experimenting with this, but I'll try and look into it because there's a bit of efficiency we're leaving on the table.
Otherwise, thank you a lot, this looks awesome :)
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.
Thanks
Looks like #2210 needs to go in first |
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-packages
command to ensure that all changed code is formatted correctly.CHANGELOG.md
in the proper section.Extra:
Pull Request Details 📖
Description
PR title says it all. Rather than have many
listen_*
,unlisten_*
, etc methods for every interrupt bit, I've collapsed it down to just one method that takes an enumset.I've also added documentation for the interrupts.
This is part of #1767.
To make it easy to review, I'm doing this in multiple steps.
The first step was to remove the methods from the pdma and gdma files.
Unfortunately I encountered #2193 and I'm choosing to fix it in this PR.
Testing
CI, I don't have any PDMA chips on me at the moment.