led: github.com/boombuler/led Index | Files

package led

import "github.com/boombuler/led"

Index

Package Files

blink1.go blinkm.go blinkstick.go blync.go busylight.go dealextreme.go dreamcheeky.go led.go simplehiddev.go usbdevice.go

Variables

var ErrDeviceClosed = errors.New("Device is already closed")

Error: Device was already closed and is not ready for interaction anymore

var ErrKeepActiveNotSupported = errors.New("KeepActive is not supported by this device")

Some devices does not support KeepActive.

func Devices Uses

func Devices() <-chan DeviceInfo

Devices returns a channel with all connected LED devices

type Device Uses

type Device interface {
    // SetColor sets the color of the LED to the closest supported color.
    SetColor(c color.Color) error

    // SetKeepActive sets a value that tells the device not turn off the device on calling Close. By default the device is turned off!
    SetKeepActive(v bool) error

    // Close the device and release all resources
    Close()
}

Device is an opened LED device.

type DeviceInfo Uses

type DeviceInfo interface {
    // GetPath returns a system specific path which can be used to find the device
    GetPath() string
    // GetType returns the "driver type" of the device
    GetType() DeviceType
    // Open opens the device for usage
    Open() (Device, error)
}

DeviceInfo keeps information about a physical LED device

func ByPath Uses

func ByPath(path string) (DeviceInfo, error)

ByPath searches a device by given system specific path. (The path can be obtained from the GetPath func from DeviceInfo)

type DeviceType Uses

type DeviceType int

Device type identifies the device type. the IDs may change on each program start.

var Blink1 DeviceType

Device type: blink(1)

var BlinkM DeviceType

Device type: LinkM / BlinkM

var BlinkStick DeviceType

Device type: BlinkStick

var Blync DeviceType

Device type: Blync

var BusyLightLync DeviceType

Device type: BusyLight Lync

var BusyLightUC DeviceType

Device type: BusyLight UC

var DealExtreme DeviceType

Device type: DealExtreme USBMailNotifier

var DreamCheeky DeviceType

Device type: DreamCheeky USBMailNotifier

func (DeviceType) String Uses

func (dt DeviceType) String() string

String returns a representation of the device type

Package led imports 5 packages (graph). Updated 2016-07-20. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).