Skip to content

Replace deprecated hal::prelude::_embedded_hal_digital_OutputPin with embedded_hal#107

Closed
quietlychris wants to merge 4 commits into
japaric:masterfrom
quietlychris:master
Closed

Replace deprecated hal::prelude::_embedded_hal_digital_OutputPin with embedded_hal#107
quietlychris wants to merge 4 commits into
japaric:masterfrom
quietlychris:master

Conversation

@quietlychris

Copy link
Copy Markdown

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.

@quietlychris

Copy link
Copy Markdown
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..

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.

1 participant