Files
drivers/ws2812/ws2812_generic.go
T
Ayke van Laethem 7b56e61d52 ws2812: add support for simulation
Call a special __tinygo_ws2812_write_byte function to send a single
byte.
2019-12-14 22:16:41 +01:00

17 lines
323 B
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)