Documentation ¶
Overview ¶
Package sn3218 controls a SN3218 LED driver with 18 LEDs over an i2c bus.
Datasheet ¶
Index ¶
- type Dev
- func (d *Dev) Brightness(channel int, value byte) error
- func (d *Dev) BrightnessAll(value byte) error
- func (d *Dev) GetState(channel int) (bool, byte, error)
- func (d *Dev) Halt() error
- func (d *Dev) Sleep() error
- func (d *Dev) Switch(channel int, state bool) error
- func (d *Dev) SwitchAll(state bool) error
- func (d *Dev) WakeUp() error
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dev ¶
type Dev struct {
// contains filtered or unexported fields
}
Dev is a handler to sn3218 controller.
func (*Dev) Brightness ¶
Brightness sets the brightness of led (0..17) to value (0..255).
func (*Dev) BrightnessAll ¶
BrightnessAll sets the brightness of all channels to the value (0..255).
func (*Dev) GetState ¶
GetState returns the state (on/off) and the brightness (0..255) of the Channel 0..17.
Click to show internal directories.
Click to hide internal directories.