Add NoDma I2C master async bus implementation#333
Merged
Conversation
jerrysxie
requested changes
Feb 28, 2025
felipebalbi
requested changes
Feb 28, 2025
76988a3 to
a9ffcd8
Compare
Contributor
Author
|
FYI @jerrysxie @felipebalbi Tested all touched drivers via examples on hardware and it works flawlessly. |
RobertZ2011
approved these changes
Mar 6, 2025
sukomath
reviewed
Mar 11, 2025
felipebalbi
reviewed
Mar 14, 2025
5e6e395 to
cd30037
Compare
felipebalbi
approved these changes
Mar 17, 2025
cd30037 to
93a9645
Compare
jerrysxie
approved these changes
Mar 18, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #327
Some kicking off questions:
new_async_nodma()fn instead of hijackingnew_async()is becausenew_async()requires a dma_ch object that impls Peripheral and impls an interrupt withMasterDma. I tried creating structs to impl all that but I hit a wall.new_async(), except in the cases of the Flexcomm not having DMA support. Is this enough or do you think this should be gated behind some sort of feature flag to reduce the possibility of misuse?EDIT:
I was able to create a NoDma structure. I had to minimally modify the DMA api, specifically
reserve_channel()now returns an option that will return None if NoDma is used.