-
Notifications
You must be signed in to change notification settings - Fork 108
Updated digital traits for gpio to v2 #71
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
Conversation
I would prefer skipping v2 altogether to be honest, seems like a step backward in ergonomics. That said, I would like to publish a new release as it has been a while; is there a tracking issue for v3 traits? I did quick scan of embedded-hal and didn't spot anything. |
There is no tracking issue or RFC yet. General idea is described here. If this works like expected, HALs will implement mostly v1 and drivers use v3. |
The warnings are indeed very annoying, so I suggest we merge this and move back to v1 if/when the v3 is ready. |
Is it possible to suppress the warnings instead? |
@Disasm Dependant crates still get the warning though. Deciding to merge this, but will move to v3 asap. |
@@ -249,14 +249,18 @@ macro_rules! gpio { | |||
} | |||
|
|||
impl<MODE> OutputPin for $PXx<Output<MODE>> { | |||
fn set_high(&mut self) { | |||
type Error = (); |
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.
IMO the Error
should either be Infallible
, Void
or !
, but not ()
.
Closes #63.
Not a massive fan on this change, I wish the ehal provided infallible traits that don't require unwraps on what is essentially volatile reads and writes in our case; but the warnings are very annoying so this gets rid of them.