luxafor

package module
v0.0.0-...-bf777c0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2020 License: MIT Imports: 2 Imported by: 0

README

pault.ag/go/luxafor

godoc

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// Green is the color Green.
	Green Color = 'G'

	// Red is the color Red.
	Red Color = 'R'

	// Blue is the color Blue.
	Blue Color = 'B'

	// Magenta is the color Magenta.
	Magenta Color = 'M'

	// Yellow is the color Yellow.
	Yellow Color = 'Y'

	// Off will turn off the LED. Not strictly a color.
	Off Color = 'O'

	// ErrNoFlag will be returned if no Luxafor Flag can be found.
	ErrNoFlag error = fmt.Errorf("luxafor: No flag found")
)

Functions

This section is empty.

Types

type Color

type Color byte

Color represents a color state that the Luxafor Flag can be set to.

type Flag

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

Flag represents a handle to a Luxafor Flag.

func OpenFlag

func OpenFlag() (*Flag, error)

OpenFlag will find and open the first Luxafor Flag that is found attached to the system.

func (Flag) Close

func (f Flag) Close() error

Close will close and free all held resources.

func (Flag) SetColor

func (f Flag) SetColor(color Color) error

SetColor will ask the Luxafor Flag to change colors to the desired color.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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