gpiosysfs

package
v2.0.30 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2020 License: BSD-2-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GPIO_EXPORT   = "/sys/class/gpio/export"
	GPIO_UNEXPORT = "/sys/class/gpio/unexport"
	GPIO_PIN      = "/sys/class/gpio/gpio%v"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GPIO

type GPIO struct {
	FilePoll        gopi.FilePoll
	UnexportOnClose bool
}

func (GPIO) Name

func (GPIO) Name() string

func (GPIO) New

func (config GPIO) New(log gopi.Logger) (gopi.Unit, error)

type Pin

type Pin struct {
	// contains filtered or unexported fields
}

type Watcher

type Watcher struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*Watcher) Close

func (this *Watcher) Close() error

func (*Watcher) Exists

func (this *Watcher) Exists(logical gopi.GPIOPin) bool

func (*Watcher) Init

func (this *Watcher) Init(config GPIO) error

func (*Watcher) Unwatch

func (this *Watcher) Unwatch(logical gopi.GPIOPin) error

func (*Watcher) Watch

func (this *Watcher) Watch(logical gopi.GPIOPin, file *os.File, edge gopi.GPIOEdge) error

Jump to

Keyboard shortcuts

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