blynclightplus

package
v0.0.0-...-338f18b Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Vendor  gousb.ID = 0x2c0d
	Product gousb.ID = 0x0010
)

Variables

This section is empty.

Functions

func Marshal

func Marshal(s State) ([]byte, error)

func Unmarshal

func Unmarshal(data []byte, state *State) error

Types

type Brightness

type Brightness byte
const (
	Dim  Brightness = 0x1
	Full Brightness = 0x0
)

type FlashRate

type FlashRate byte
const (
	NoFlash FlashRate = 0x0
	Low     FlashRate = 0x1 << 4
	Medium  FlashRate = 0x1 << 5
	High    FlashRate = 0x1 << 6
)

type RingRate

type RingRate byte
const (
	Off        RingRate = 0
	Once       RingRate = 0x10
	Continuous RingRate = 0x20
)

type RingTone

type RingTone byte
const (
	None RingTone = iota
	Standard

	Circuit
)

type RingVolume

type RingVolume byte
const (
	Mute      RingVolume = 0x80
	MinVolume RingVolume = 0x00
	MaxVolume RingVolume = 0x0A
)

type State

type State struct {
	Red   byte
	Green byte
	Blue  byte

	Brightness Brightness
	FlashRate  FlashRate

	RingRate   RingRate
	RingTone   RingTone
	RingMute   bool
	RingVolume RingVolume
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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