Versions in this module Expand all Collapse all v5 v5.0.0 Feb 1, 2021 Changes in this version + const GPPUPPDN0 + const GPPUPPDN1 + const GPPUPPDN2 + const GPPUPPDN3 + var SpiMapError = errors.New("SPI registers not mapped correctly - are you root?") + func Close() error + func DetectEdge(pin Pin, edge Edge) + func DisableIRQs(irqs uint64) + func EdgeDetected(pin Pin) bool + func EnableIRQs(irqs uint64) + func Open() (err error) + func PinMode(pin Pin, mode Mode) + func PullMode(pin Pin, pull Pull) + func SetDutyCycle(pin Pin, dutyLen, cycleLen uint32) + func SetFreq(pin Pin, freq int) + func SpiBegin(dev SpiDev) error + func SpiChipSelect(chip uint8) + func SpiChipSelectPolarity(chip uint8, polarity uint8) + func SpiEnd(dev SpiDev) + func SpiExchange(data []byte) + func SpiMode(polarity uint8, phase uint8) + func SpiReceive(n int) []byte + func SpiSpeed(speed int) + func SpiTransmit(data ...byte) + func StartPwm() + func StopPwm() + func TogglePin(pin Pin) + func WritePin(pin Pin, state State) + type Edge uint8 + const AnyEdge + const FallEdge + const NoEdge + const RiseEdge + type Mode uint8 + const Alt0 + const Alt1 + const Alt2 + const Alt3 + const Alt4 + const Alt5 + const Clock + const Input + const Output + const Pwm + const Spi + type Pin uint8 + func (pin Pin) Clock() + func (pin Pin) Detect(edge Edge) + func (pin Pin) DutyCycle(dutyLen, cycleLen uint32) + func (pin Pin) EdgeDetected() bool + func (pin Pin) Freq(freq int) + func (pin Pin) High() + func (pin Pin) Input() + func (pin Pin) Low() + func (pin Pin) Mode(mode Mode) + func (pin Pin) Output() + func (pin Pin) Pull(pull Pull) + func (pin Pin) PullDown() + func (pin Pin) PullOff() + func (pin Pin) PullUp() + func (pin Pin) Pwm() + func (pin Pin) Read() State + func (pin Pin) ReadPull() Pull + func (pin Pin) Toggle() + func (pin Pin) Write(state State) + type Pull uint8 + const PullDown + const PullNone + const PullOff + const PullUp + type SpiDev int + const Spi0 + const Spi1 + const Spi2 + type State uint8 + const High + const Low + func ReadPin(pin Pin) State Other modules containing this package gitee.com/wiseai/go-rpio