ws2812: improve documentation

This commit is contained in:
Ayke van Laethem
2018-11-16 12:16:47 +01:00
parent bd18c71604
commit c23954059f
2 changed files with 7 additions and 0 deletions
+4
View File
@@ -1,13 +1,17 @@
// Package ws2812 implements a driver for WS2812 and SK6812 RGB LED strips.
package ws2812
import (
"machine"
)
// WS2812 wraps a pin object for an easy driver interface.
type WS2812 struct {
Pin machine.GPIO
}
// New returns a new WS2812 driver. It does not touch the pin object: you have
// to configure it as an output pin before calling New.
func New(pin machine.GPIO) WS2812 {
return WS2812{pin}
}
+3
View File
@@ -2,6 +2,9 @@
package ws2812
// This file implements the WS2812 protocol for 16MHz Cortex-M0
// microcontrollers.
import (
"device/arm"
)