Versions in this module Expand all Collapse all v1 v1.0.1 Apr 4, 2024 v1.0.0 Feb 28, 2022 Changes in this version + const SK6812Strip + const SK6812StripBGRW + const SK6812StripBRGW + const SK6812StripGBRW + const SK6812StripGRBW + const SK6812StripRBGW + const SK6812StripRGBW + const SK6812WStrip + const WS2811StripBGR + const WS2811StripBRG + const WS2811StripGBR + const WS2811StripGRB + const WS2811StripRBG + const WS2811StripRGB + const WS2812Strip + var Debug bool + var ErrConfigInitialized = errors.New("config already initialized") + var ErrConfigWrongIndex = errors.New("wrong strip index") + var ErrDriverAlreadyUsed = errors.New("driver already initialized") + var ErrDriverNotSupported = errors.New("driver not supported") + var ErrNoActiveChannel = errors.New("No active channel") + var ErrNoClockMap = errors.New("clock device map not set. Not initialized?") + var ErrNoHardware = errors.New("no hardware set. Not initialized?") + var ErrPinNotAllowed = errors.New("selected pin not allowed") + var ErrWrongFrequency = errors.New("Wrong Frequency") + var PWMAlwaysUseTwoChannel bool + type Config struct + func New(driverType DriverType) (*Config, error) + func (c *Config) Initialize() error + func (c *Config) Render(stripIndex int) error + func (c *Config) SetBrightness(brightness uint32, stripIndex int) error + func (c *Config) SetDMAChannel(channel uint32) error + func (c *Config) SetFrequency(frequency uint32) error + func (c *Config) SetStrip(ledStrip LEDs, pin uint32, stripType StripType, stripIndex int, ...) error + func (c *Config) Stop() error + type DriverType uint8 + const DriverPCM + const DriverPWM + const DriverSPI + type LEDStrip struct + func NewLEDStrip(count int) *LEDStrip + func (l *LEDStrip) Blue(position int) uint8 + func (l *LEDStrip) Green(position int) uint8 + func (l *LEDStrip) Red(position int) uint8 + func (l *LEDStrip) SetColor(position int, c color.Color) + func (l *LEDStrip) SetDirect(position int, val uint32) + func (l *LEDStrip) SetRGBA(position int, r, g, b, a uint32) + func (l *LEDStrip) ShiftLeft(shift int) + func (l *LEDStrip) ShiftRight(shift int) + func (l *LEDStrip) TotalCount() int + func (l *LEDStrip) UInt32(position int) uint32 + func (l *LEDStrip) White(position int) uint8 + type LEDs interface + Blue func(position int) uint8 + Green func(position int) uint8 + Red func(position int) uint8 + TotalCount func() int + UInt32 func(position int) uint32 + White func(position int) uint8 + type SingleLED uint32 + func ColorToSingleLED(c color.Color) *SingleLED + func RGBAtoSingleLED(r, g, b, a uint32) *SingleLED + func (l *SingleLED) Blue(unused int) uint8 + func (l *SingleLED) Green(unused int) uint8 + func (l *SingleLED) Red(unused int) uint8 + func (l *SingleLED) SetColor(c color.Color) + func (l *SingleLED) SetDirect(val uint32) + func (l *SingleLED) SetRGBA(r, g, b, a uint32) + func (l *SingleLED) ToColor() color.Color + func (l *SingleLED) TotalCount() int + func (l *SingleLED) UInt32(unused int) uint32 + func (l *SingleLED) White(unused int) uint8 + type StripType uint