device

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2019 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// NumBytePerColor is the number of bytes per pixel
	NumBytePerColor = 3
	// NumByteToRepresentHex is the number of bytes to represent one byte as hex number
	NumByteToRepresentHex = 2
)

Variables

This section is empty.

Functions

func IsArduinoError added in v0.1.4

func IsArduinoError(line string) bool

func NewArduinoError added in v0.1.4

func NewArduinoError(serialConfig *config.ArduinoErrorConfig, line string) (*arduinoError, error)

Types

type LedDevice

type LedDevice interface {
	Open() error
	Run(wg *sync.WaitGroup)
	Write(data []byte) (int, error)
	Close() error
	SetInput(<-chan hardware.Frame)
	GetType() config.Type
}

LedDevice interface for all

func NewLedDevice

func NewLedDevice(deviceConfig *config.DeviceConfig, length int) (LedDevice, error)

NewLedDevice creates a new Led device

func NewPrintDevice

func NewPrintDevice(numPix int) LedDevice

NewPrintDevice creates a new printDevice

func NewSerialDevice

func NewSerialDevice(numLed int, serialDeviceConfig *config.SerialConfig) LedDevice

NewSerialDevice creates a new serial device

Jump to

Keyboard shortcuts

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