gpiointerrupt

package
v5.4.100 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2023 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interrupt

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

Interrupt provides an interrupt source received from an exportd GPIO pin

func New

func New(dir string) (i *Interrupt, err error)

New allocates a new GPI

func (*Interrupt) Close

func (i *Interrupt) Close()

Close closes all file descriptors

func (*Interrupt) SetContext

func (i *Interrupt) SetContext(ctx context.Context) error

SetContext sets a context used during Wait(). If the context gets cancelled, Wait() will return immediately return. To clear existing context, pass nil.

func (*Interrupt) Wait

func (i *Interrupt) Wait() error

Wait waits for one interrupt to arrive

Jump to

Keyboard shortcuts

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