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

Add BlockingReadDma/BlockingWriteDma traits #278

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

Conversation

burrbull
Copy link
Member

@thalesfragoso
Copy link
Member

Thanks @burrbull , that indeed seems like a good addition, but maybe we could use a closure approach, like crossbeam's scoped threads and the scoped_threadpool crate. That way the user can still do some work while the DMA is running, but I'm not sure how we would handle panics in the closure, it should be okay since we don't usually unwind, but still not nice, I have to think more about it.

Another thing, WriteBuffer and the other traits are implemented for pointer types, so B is already a pointer, you don't need &mut B, changing StaticWriteBuffer to WriteBuffer should work better.

PS: I haven't reviewed all of this PR yet.

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.

2 participants