tinygo.org/x/drivers@v0.27.1-0.20240509133757-7dbca2a54349/ws2812/ws2812_generic.go (about)

     1  //go:build !baremetal
     2  
     3  package ws2812
     4  
     5  // This file implements the WS2812 protocol for simulation.
     6  
     7  import "machine"
     8  
     9  // Send a single byte using the WS2812 protocol.
    10  func (d Device) WriteByte(c byte) error {
    11  	writeByte(d.Pin, c)
    12  	return nil
    13  }
    14  
    15  //go:export __tinygo_ws2812_write_byte
    16  func writeByte(pin machine.Pin, c byte)