Fix some comments

This commit is contained in:
Stian Eikeland 2014-01-07 23:15:25 +01:00
parent 8b18ea0634
commit 1d8a97a9f8

View File

@ -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