Closed drahoslove closed 6 years ago
https://github.com/stianeikeland/go-rpio/blob/896db2ee1c7f95240dd6a09e56edf9cece107a34/rpio.go#L214 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 {
WritePin
if (mem[levelReg] & (1 << uint8(pin & 31))) != 0 {
fixed by merging #15
https://github.com/stianeikeland/go-rpio/blob/896db2ee1c7f95240dd6a09e56edf9cece107a34/rpio.go#L214 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 {