mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-08-16 21:03:23 +00:00
ws2812: add support for m5stamp-c3
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//go:build !digispark && !arduino && !qtpy
|
//go:build !digispark && !arduino && !qtpy && !m5stamp_c3
|
||||||
// +build !digispark,!arduino,!qtpy
|
// +build !digispark,!arduino,!qtpy,!m5stamp_c3
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
//go:build qtpy || m5stamp_c3
|
||||||
|
// +build qtpy m5stamp_c3
|
||||||
|
|
||||||
|
package main
|
||||||
|
|
||||||
|
import "machine"
|
||||||
|
|
||||||
|
// Replace neo and led in the code below to match the pin
|
||||||
|
// that you are using if different.
|
||||||
|
var neo machine.Pin = machine.WS2812
|
||||||
|
var led = machine.NoPin
|
||||||
@@ -5,11 +5,6 @@ package main
|
|||||||
|
|
||||||
import "machine"
|
import "machine"
|
||||||
|
|
||||||
// Replace neo and led in the code below to match the pin
|
|
||||||
// that you are using if different.
|
|
||||||
var neo machine.Pin = machine.NEOPIXELS
|
|
||||||
var led = machine.NoPin
|
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
pwr := machine.NEOPIXELS_POWER
|
pwr := machine.NEOPIXELS_POWER
|
||||||
pwr.Configure(machine.PinConfig{Mode: machine.PinOutput})
|
pwr.Configure(machine.PinConfig{Mode: machine.PinOutput})
|
||||||
|
|||||||
Reference in New Issue
Block a user