Skip to content
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

Re-introduced possibility of DMA peripheral abstraction, and added SPI DMA abstraction example #292

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

johnnyegel
Copy link
Contributor

For some reason the Transferable trait has been removed in 0.7.0. This seems to make it impossible to create functions which takes an abstract SPI DMA reference and transmit data via it. A real life use-case for this is in multipurpose drivers, which should work with any SPI peripheral and possibly share it with other drivers.
I've also improved the SPI-DMA example to showcase this exact use case. As a side perk, this will break if pure abstract referencing is ever broken. Thus hopefully insuring this feature is retained in the HAL for the Future.
NOTE! I really think this DMA scheme should be defined on a higher level, and be shared across all the HALs.
Also NOTE! I am very much a noob in Rust (though I have a long experience in MCU/Embedded development in C), so please go easy on me if this is udder crap :)

@johnnyegel johnnyegel changed the title Re-implemented DMA Transferable Trait and added SPI DMA example which use pure abstract references Re-introduced possibility of DMA peripheral abstraction, and added SPI DMA abstraction example Dec 4, 2020
@johnnyegel
Copy link
Contributor Author

Added changelog entry for change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant