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

GPIO input and outputs should be different types #39

Open
mvirkkunen opened this issue Apr 11, 2020 · 0 comments
Open

GPIO input and outputs should be different types #39

mvirkkunen opened this issue Apr 11, 2020 · 0 comments

Comments

@mvirkkunen
Copy link

Currently the pins always implement both InputPin and OutputPin even thought the pin might not be in the correct mode, and presumably trying to use it in the wrong mode either doesn't work or causes an error.

This could be done neatly with type states and into_output style methods like many other HALs. This would also make them more convenient to use as the user then doesn't have to manually set the correct mode before constructing the pin.

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

No branches or pull requests

1 participant