Skip to content

Use the embedded-hal::digital::v2::OutputPin #83

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

Merged
merged 2 commits into from
Jun 14, 2019
Merged

Use the embedded-hal::digital::v2::OutputPin #83

merged 2 commits into from
Jun 14, 2019

Conversation

eldruin
Copy link
Member

@eldruin eldruin commented Jun 12, 2019

Very similarly to rust-embedded-community/sh1106#8, I added an error enum with two types: a communication error type and a pin error type which allows users to handle I2C or SPI communication errors as well as SPI pin setting errors.
I had to make reset fallible, though. User code will then get an unused Result warning.
No other changes are required in user code if the results were simply unwrapped.

Copy link
Collaborator

@jamwaffles jamwaffles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Untested on real hardware as I don't have any to hand right now, but it all looks good to me.

@therealprof any reservations? Otherwise I'll merge this to master and do a semver-minor release 👌

@jamwaffles jamwaffles merged commit 7f4fcab into rust-embedded-community:master Jun 14, 2019
@jamwaffles
Copy link
Collaborator

Thanks @eldruin! I'll get this released when I'm next on a Linux machine.

@eldruin eldruin deleted the fallible-traits branch June 15, 2019 07:25
@jamwaffles
Copy link
Collaborator

Released in 0.2.5.

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.

2 participants