Documentation ¶
Index ¶
Constants ¶
View Source
const ( GPIO0 = 0 GPIO1 = 1 GPIO2 = 2 GPIO3 = 3 GPIO4 = 4 GPIO7 = 7 GPIO8 = 8 GPIO9 = 9 GPIO10 = 10 GPIO11 = 11 GPIO17 = 17 GPIO18 = 18 GPIO22 = 22 GPIO23 = 23 GPIO24 = 24 GPIO25 = 25 GPIOCount = 16 // the number of GPIO pins available )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IRQEvent ¶
type IRQEvent func()
IRQEvent defines the callback function used to inform the caller of an interrupt.
type Pin ¶
type Pin interface { Mode() Mode // gets the current pin mode SetMode(Mode) // set the current pin mode Set() // sets the pin state high Clear() // sets the pin state low Close() error // if applicable, closes the pin Get() bool // returns the current pin state BeginWatch(Edge, IRQEvent) error // calls the function argument when an edge trigger event occurs EndWatch() error // stops watching the pin Wait(bool) // wait for pin state to match boolean argument Err() error // returns the last error state }
Pin represents a GPIO pin.
Click to show internal directories.
Click to hide internal directories.