driver

package
v0.0.0-...-f3d04f3 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2023 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrIODriverNotBound = errors.New("IODriver not bound")
)

Functions

func RegisterIO

func RegisterIO(name string, fac IODriverFactory)

func RegisterPWM

func RegisterPWM(name string, fac PWMDriverFactory)

Types

type BindablePWMDriver

type BindablePWMDriver interface {
	PWMDriver
	Bind(io IODriver) error
}

BindablePWMDriver is a PWMDriver that can be bound to a given IODriver instead of being independent from any other driver.

type IODriver

type IODriver interface {
	Output(stream []bool, between time.Duration) error
}

IODriver is the interface of lowlevel I/O drivers, like for GPIOs

type IODriverFactory

type IODriverFactory func(arguments []string) (IODriver, error)

type PWMDriver

type PWMDriver interface {
	Output(message *types.Message) error
}

PWMDriver is the interface of highlevel drivers, directly sending digitial protocol data.

func Setup

func Setup(conn string) (PWMDriver, error)

type PWMDriverFactory

type PWMDriverFactory func(arguments []string) (PWMDriver, error)

Directories

Path Synopsis
raspi

Jump to

Keyboard shortcuts

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