-
Notifications
You must be signed in to change notification settings - Fork 238
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
DMA (alternative to #209) #457
Conversation
embedded-dma constrains DMA traits to WORD sizes, where WORD is u8/u16/u32/u64/i8/i16/i32/i64. |
f376153
to
6cd19b2
Compare
Removed target tests from this branch since there's no practical way to keep CI happy with them in there. Will keep them in a separate repo for now. |
Turns out the solution to the CI problem was to exclude the on-target test project from the workspace. |
Another suggestion: Could you rename |
Bidir is now working for SPI, at least with my trivial tests/examples. |
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.
I still haven't had time to try this code. But as it reads nicely, contains test cases, and has been commented by multiple persons, I'd say we shouldn't wait for a more in-depth review before merging it. It has been waiting long enough.
I suggest resolving #528 before merging, as this would be a major API change afterwards. |
Alright, it's now updated to the API discussed in #528. |
I think it is very nice now! Couldn't find anything more to complain about 😉 Thank you so much for your efforts! |
I did a test rebase and it looked sensible, so I'm going to trust that Github's "Squash and merge" is going to do the right thing 🤞 |
Rebased #209 onto current trunk.
Updated to embedded-dma 0.2
Current plan is to drop everything except for SingleChannel, since I think that should end up being simpler and more flexible than the current approach.
To get bidirectional functionality from SingleChannel, will need to update peripherals to provide TX/RX endpoints so that the user can have 2 channels targeting the same peripheral for reading/writing.
For double-buffering I was thinking to pass the second DMA channel as an Option to the constructor, so the same interface is used regardless of single-shot/double buffering.
Will probably rename SingleChannel to Channel or Transfer or something to match the above changes.
EDIT:
After splitting it up, it looks like it already resembles the above somewhat so this might only require minor changes
Other goals: