Skip to content
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

Implement ! (std::ops::Not) for Value #30

Open
Lindenk opened this issue Jan 10, 2020 · 1 comment
Open

Implement ! (std::ops::Not) for Value #30

Lindenk opened this issue Jan 10, 2020 · 1 comment

Comments

@Lindenk
Copy link
Contributor

Lindenk commented Jan 10, 2020

Because of the way rust handles Enums vs Integers, there is no convenient way to invert a logic level with rust-wiringpi. I propose std::ops::Not be implemented for Value so that it can be inverted:

!High would be Low
!Low would be High

@Ogeon
Copy link
Collaborator

Ogeon commented Jan 11, 2020

Good call! Will look at your PR. 🙂

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 a pull request may close this issue.

2 participants