drivers: add generic interface types

This commit is contained in:
Ayke van Laethem
2018-12-22 17:32:31 +01:00
parent 4c21e79d0e
commit 09abe484ba
+14
View File
@@ -0,0 +1,14 @@
package drivers
import (
"image/color"
)
// LEDArray is an array of RGB LEDs. It may have any shape, but in general it is
// a strip of daisy-chained LEDs.
type LEDArray interface {
// WriteColors updates all LEDs in the LED strip to the given RGB color. It
// depends on the protocol what happens when you do not provide a
// correctly-sized slice of colors.
WriteColors(buf []color.RGBA) error
}