mirror of
https://github.com/stianeikeland/go-rpio.git
synced 2025-01-23 10:41:03 +01:00
Fix some comments
This commit is contained in:
parent
8b18ea0634
commit
1d8a97a9f8
4
rpio.go
4
rpio.go
|
@ -164,7 +164,7 @@ func (pin Pin) PullOff() {
|
||||||
PullMode(pin, PullOff)
|
PullMode(pin, PullOff)
|
||||||
}
|
}
|
||||||
|
|
||||||
// WritePin sets the direction of a given pin (Input or Output)
|
// PinMode sets the direction of a given pin (Input or Output)
|
||||||
func PinMode(pin Pin, direction Direction) {
|
func PinMode(pin Pin, direction Direction) {
|
||||||
|
|
||||||
// Pin fsel register, 0 or 1 depending on bank
|
// Pin fsel register, 0 or 1 depending on bank
|
||||||
|
@ -204,7 +204,7 @@ func WritePin(pin Pin, state State) {
|
||||||
memlock.Unlock()
|
memlock.Unlock()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read the state of a
|
// Read the state of a pin
|
||||||
func ReadPin(pin Pin) State {
|
func ReadPin(pin Pin) State {
|
||||||
// Input level register offset (13 / 14 depending on bank)
|
// Input level register offset (13 / 14 depending on bank)
|
||||||
levelReg := uint8(pin)/32 + 13
|
levelReg := uint8(pin)/32 + 13
|
||||||
|
|
Loading…
Reference in New Issue
Block a user