-
Notifications
You must be signed in to change notification settings - Fork 208
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 into_async
for ParlIO
#2461
Conversation
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.
Still not sure what to do about TxOnly/RxOnly.
At some point we should support converting each half of the DMA channel to and from blocking mode (on chips that an support it), which should solve this I think.
We can do some runtime checks on chips that don't support it (unless the presence of the async handler poses a problem in blocking mode). |
It does, users could end up overriding the async handler, rendering the async driver broken. |
That's what I mean by runtime checks, I'd just add a panic to prevent this.
Me neither. |
Oh right, got it. I suppose there's a risk that the async handler would clear the interrupt bits that the blocking driver is polling for maybe. Also, if it's gonna be a panic, might as well use the type system to prevent it. i.e. use cfg to remove the APIs on chips that don't support it. |
"If it's gonna be a panic, don't use a panic" is a weird thing to say. |
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.
Thanks!
Forgot to update parl_io in #2430. Still not sure what to do about TxOnly/RxOnly.