mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-07-26 10:38:41 +00:00
8b3075fdba
Signed-off-by: deadprogram <ron@hybridgroup.com>
17 lines
324 B
Go
17 lines
324 B
Go
//go:build !baremetal
|
|
|
|
package ws2812
|
|
|
|
// This file implements the WS2812 protocol for simulation.
|
|
|
|
import "machine"
|
|
|
|
// Send a single byte using the WS2812 protocol.
|
|
func (d Device) WriteByte(c byte) error {
|
|
writeByte(d.Pin, c)
|
|
return nil
|
|
}
|
|
|
|
//go:export __tinygo_ws2812_write_byte
|
|
func writeByte(pin machine.Pin, c byte)
|