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_OutputPin struct with the embedded_hal::digital::v2::OutputPin struct instead. The now-required Result is consumed by an assert_eq!() statement to prevent an error due to the #![deny(warnings)] flag, which appears in the blinky, leds, and roulette examples.
I'm not sure if the result is supposed to look like Result<(),()> or not, but since the Implementor I see in the docs says type Error = () and it compiles, I thought that might make sense. I'm also not sure that using assert_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.
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..
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_OutputPin
struct with theembedded_hal::digital::v2::OutputPin
struct instead. The now-requiredResult
is consumed by anassert_eq!()
statement to prevent an error due to the#![deny(warnings)]
flag, which appears in theblinky
,leds
, androulette
examples.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.