Documentation
¶
Overview ¶
Package g25 contains GPIO drivers for the Acme Systems Aria G25
The Aria G25 contains up to 60 GPIO pins. This package implements all GPIO operations such as getting/setting the value, setting the direction and changing the active low. The package provides a mapping between the pinnumber, the atmel ID and the kernel ID. https://www.acmesystems.it/aria
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPin ¶
NewPin creates a new pin with a kernel ID based on the pin name found here: https://www.acmesystems.it/aria. It assumes the kernel has version 3.1x if this is not the case, use the NewPinV26 instead.
Example ¶
outPin, _ := NewPin("N16")
_ = outPin.SetDirection(gpio.OutDirection)
inPin, _ := NewPin("N20")
_ = inPin.SetDirection(gpio.InDirection)
_ = inPin.SetEdge(gpio.RisingEdge, func(p *gpio.Pin) {
log.Printf("wow")
})
for i := 0; i < 4; i++ {
_ = outPin.SetHigh()
time.Sleep(1000 * time.Millisecond)
_ = outPin.SetLow()
time.Sleep(1000 * time.Millisecond)
}
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.