gpio

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 9, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//Low signal
	Low = rpio.Low

	//High signal
	High = rpio.High
)

Variables

View Source
var States = map[State]string{
	Low:  "low",
	High: "high",
}

States state names

Functions

func Set

func Set(pin OutputPin, high bool)

Set sets the state of the pin

func Setup

func Setup() error

Setup initialize memory buffers for GPIO

Types

type InputPin

type InputPin interface {
	Input()
	Read() rpio.State
}

InputPin minimal interface for a GPIO pin

type OutputPin

type OutputPin interface {
	Output()
	High()
	Low()
}

OutputPin minimal interface for a GPIO pin

type Pin

type Pin interface {
	OutputPin
	InputPin
}

Pin minimal interface for a GPIO pin

type State

type State = rpio.State

State IO pin state

func ParseState

func ParseState(s string) (State, error)

ParseState parse a state from a string

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL