Documentation ¶
Overview ¶
Package rpigpio grants access to the GPIOs on a Raspberry Pi completly written in GO. All actions write directly to the registers.
Index ¶
- Variables
- func Initialize() error
- type Mode
- type Pin
- func (p *Pin) AFallingEdgeDetect(targetStatus bool) error
- func (p *Pin) ARisingEdgeDetect(targetStatus bool) error
- func (p *Pin) ClearEvent() error
- func (p *Pin) Event() (bool, error)
- func (p *Pin) FallingEdgeDetect(targetStatus bool) error
- func (p *Pin) Get() (bool, error)
- func (p *Pin) HighDetect(targetStatus bool) error
- func (p *Pin) Is(pinNum uint32) bool
- func (p *Pin) LowDetect(targetStatus bool) error
- func (p *Pin) Mode(targetMode Mode) error
- func (p *Pin) Pull(targetMode PullMode) error
- func (p *Pin) RisingEdgeDetect(targetStatus bool) error
- func (p *Pin) Set(targetValue int) error
- func (p *Pin) UInt32() uint32
- type PullMode
Constants ¶
This section is empty.
Variables ¶
var ( ErrNotInitialized = errors.New("Package not initialized or unsupported hardware. Check error during initialize.") ErrWrongPin = errors.New("Pin is not defined. Max 53") )
Errors
var Debug bool
Enable Debug output
var NoEventClearing bool
Functions ¶
func Initialize ¶
func Initialize() error
Initialize checks the hardware and opens the GPIO device for usage.
Types ¶
type Pin ¶
type Pin struct {
// contains filtered or unexported fields
}
Pin defines a GPIO pin.
func (*Pin) AFallingEdgeDetect ¶
AFallingEdgeDetect sets the falling edge detection of the GPIO pin. Async
func (*Pin) ARisingEdgeDetect ¶
ARisingEdgeDetect sets the rising edge detection of the GPIO pin. Async
func (*Pin) ClearEvent ¶
ClearEvent clears a possible event. If event is still active, ClearEvent will have no effect.
func (*Pin) FallingEdgeDetect ¶
FallingEdgeDetect sets the falling edge detection of the GPIO pin.
func (*Pin) HighDetect ¶
HighDetect sets the high detection of the GPIO pin.
func (*Pin) RisingEdgeDetect ¶
RisingEdgeDetect sets the rising edge detection of the GPIO pin.