Documentation
¶
Index ¶
- Variables
- func Present() bool
- type Pin
- func (p *Pin) DefaultPull() gpio.Pull
- func (p *Pin) Func() pin.Func
- func (p *Pin) Function() string
- func (p *Pin) Halt() error
- func (p *Pin) In(pull gpio.Pull, edge gpio.Edge) error
- func (p *Pin) Name() string
- func (p *Pin) Number() int
- func (p *Pin) Out(l gpio.Level) error
- func (p *Pin) PWM(gpio.Duty, physic.Frequency) error
- func (p *Pin) Pull() gpio.Pull
- func (p *Pin) Read() gpio.Level
- func (p *Pin) SetFunc(f pin.Func) error
- func (p *Pin) String() string
- func (p *Pin) SupportedFuncs() []pin.Func
- func (p *Pin) WaitForEdge(timeout time.Duration) bool
Constants ¶
This section is empty.
Variables ¶
View Source
var Pins map[int]*Pin
Pins is all the pins exported by GPIO sysfs.
Some CPU architectures have the pin numbers start at 0 and use consecutive pin numbers but this is not the case for all CPU architectures, some have gaps in the pin numbering.
This global variable is initialized once at driver initialization and isn't mutated afterward. Do not modify it.
Functions ¶
Types ¶
type Pin ¶
type Pin struct {
// contains filtered or unexported fields
}
Pin represents one GPIO pin as found by sysfs.
func (*Pin) DefaultPull ¶
DefaultPull implements gpio.PinIn.
It returns gpio.PullNoChange since gpio sysfs has no support for input pull resistor.
func (*Pin) Pull ¶
Pull implements gpio.PinIn.
It returns gpio.PullNoChange since gpio sysfs has no support for input pull resistor.
func (*Pin) SupportedFuncs ¶
SupportedFuncs implements pin.PinFunc.
Click to show internal directories.
Click to hide internal directories.