Documentation
¶
Overview ¶
Package hdwr provides functions that needs access to the hardware.
Index ¶
- func ListDeviceDetails(fwVer, showAll bool) ([]*schema.DeviceDetail, error)
- func OpenBlink1Device(hint string) (err error)
- func PlayOnChipPattern(start, end, times int, wait bool) error
- func PlayState(st b1.LightState) error
- func PlayStateAndWait(st b1.LightState) error
- func PlayStateSequence(seq b1.StateSequence) error
- func ReadLEDColor(n int) (color.Color, error)
- func ReadOnChipSequence() (b1.StateSequence, error)
- func ReadPlayingState() (b1.PatternState, error)
- func SaveOnChipPattern() error
- func SetColor(cl color.Color) error
- func SetLog(l *zap.SugaredLogger)
- func StopPlaying() error
- func TickleOnChipPattern(start, end int, waitTimeout time.Duration) error
- func WriteOnChipPattern(start, end int, seq b1.StateSequence) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListDeviceDetails ¶
func ListDeviceDetails(fwVer, showAll bool) ([]*schema.DeviceDetail, error)
ListDeviceDetails returns a list of all blink(1) devices with details.
func OpenBlink1Device ¶
OpenBlink1Device opens a corresponding blink(1) device by hint.
func PlayOnChipPattern ¶
PlayOnChipPattern starts playing a blink(1) pattern on the opened device.
func PlayState ¶
func PlayState(st b1.LightState) error
PlayState plays a blink(1) state on the opened device.
func PlayStateAndWait ¶
func PlayStateAndWait(st b1.LightState) error
PlayStateAndWait plays a blink(1) state on the opened device and wait for completion.
func PlayStateSequence ¶
func PlayStateSequence(seq b1.StateSequence) error
PlayStateSequence plays a blink(1) state sequence on the opened device.
func ReadLEDColor ¶
ReadLEDColor reads the color of the opened device.
func ReadOnChipSequence ¶
func ReadOnChipSequence() (b1.StateSequence, error)
ReadOnChipSequence reads a blink(1) state sequence from the opened device.
func ReadPlayingState ¶
func ReadPlayingState() (b1.PatternState, error)
ReadPlayingState reads the playing state of the opened device.
func SaveOnChipPattern ¶
func SaveOnChipPattern() error
SaveOnChipPattern saves a blink(1) pattern on the opened device.
func StopPlaying ¶
func StopPlaying() error
StopPlaying stops playing any blink(1) state on the opened device.
func TickleOnChipPattern ¶
TickleOnChipPattern starts playing a blink(1) pattern on the opened device.
func WriteOnChipPattern ¶
func WriteOnChipPattern(start, end int, seq b1.StateSequence) error
WriteOnChipPattern writes a blink(1) pattern on the opened device.
Types ¶
This section is empty.