Replace deprecated hal::prelude::_embedded_hal_digital_OutputPin with embedded_hal#107
Closed
quietlychris wants to merge 4 commits into
Closed
Replace deprecated hal::prelude::_embedded_hal_digital_OutputPin with embedded_hal#107quietlychris wants to merge 4 commits into
hal::prelude::_embedded_hal_digital_OutputPin with embedded_hal#107quietlychris wants to merge 4 commits into
Conversation
added 4 commits
August 26, 2019 13:24
…tPin for LED impl set_low() and set_high functions and added Result::<(),()>
Author
|
Actually, it looks like pull request #109 take care of the issues this was meant to address in a more comprehensive way; closing in favor of that one.. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First, apologies for any inconsistencies with this pull request--this is my first time trying to make any changes to a crate, so I'd really appreciate both your patience and any advice you might have. I'm also fairly new to embedded in general, so there's a good chance this is more than a little rough.
This pull request replaces the deprecated
hal::prelude::_embedded_hal_digital_OutputPinstruct with theembedded_hal::digital::v2::OutputPinstruct instead. The now-requiredResultis consumed by anassert_eq!()statement to prevent an error due to the#![deny(warnings)]flag, which appears in theblinky,leds, androuletteexamples.I'm not sure if the result is supposed to look like
Result<(),()>or not, but since the Implementor I see in the docs saystype Error = ()and it compiles, I thought that might make sense. I'm also not sure that usingassert_eq!()is the most idiomatic way of doing error handling in this case, so any guidance there would be appreciated as well.I believe this solves the issue referenced in this comment.