mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-09-10 08:39:27 +00:00
fix issue #858
This commit is contained in:
committed by
Ron Evans
parent
2673cc1e9a
commit
e960a6ff57
@@ -15,11 +15,11 @@ import (
|
||||
func newWS2812Device(pin machine.Pin) Device {
|
||||
sm, err := pio.PIO0.ClaimStateMachine()
|
||||
if err != nil {
|
||||
return Device{Pin: pin, writeColorFunc: writeColorsRGB}
|
||||
return Device{Pin: pin, brightness: 255, writeColorFunc: writeColorsRGB}
|
||||
}
|
||||
ws, err := piolib.NewWS2812B(sm, pin)
|
||||
if err != nil {
|
||||
return Device{Pin: pin, writeColorFunc: writeColorsRGB}
|
||||
return Device{Pin: pin, brightness: 255, writeColorFunc: writeColorsRGB}
|
||||
}
|
||||
return Device{
|
||||
Pin: pin,
|
||||
|
||||
Reference in New Issue
Block a user