-
Notifications
You must be signed in to change notification settings - Fork 194
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
Improve and use timer abstractions #1753
Improve and use timer abstractions #1753
Conversation
6c50198
to
88522a0
Compare
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.
There's a lot to take in here, but overall I think it's looking quite good. Thanks for taking care of this, nice to finally have this implemented!
Side note: The underlying timers probably should wrap modifications on shared registers in a critical-section (#1739 already addresses that for SYSTIMER). That is out of scope for this PR Sorry for the huge amount of changed code here but I think it makes sense to have this in one PR - fortunately much of the changes are just adapted examples. BTW the examples use different timers and patterns for initialization - that's to show the flexibility of the API and on purpose |
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.
LGTM, thanks!
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
PeriodicTimer<ErasedTimer>
OneShotTimer<ErasedTimer>
referencesThis enables the user to use any hw-timer for esp-wifi (no matter if from TIMG0, TIMG1 or SYSTIMER) and use any combination of hw-timers for the embassy-time-driver. It also gets rid of the features to select the embassy time-driver implementation.
Testing
Run the (changed) examples ideally at least on ESP32, ESP32-S2 and any other chip