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

Error in ReadPin for higher pins. #14

Closed
drahoslove opened this issue Oct 13, 2017 · 1 comment
Closed

Error in ReadPin for higher pins. #14

drahoslove opened this issue Oct 13, 2017 · 1 comment

Comments

@drahoslove
Copy link
Collaborator

go-rpio/rpio.go

Line 214 in 896db2e

if (mem[levelReg] & (1 << uint8(pin))) != 0 {

I know, that it does not matter much because pins with the number higher than 31 are not really accessible on board. But for consistency with WritePin, I think it should be fixed to:
if (mem[levelReg] & (1 << uint8(pin & 31))) != 0 {

@drahoslove
Copy link
Collaborator Author

fixed by merging #15

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