|
PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
|
14 #include <propeller.h>
37 extern uint32_t binary_ws2812_driver_dat_start[];
43 hdr->resettix = ustix * usreset;
44 hdr->bit0hi = ustix * ns0h / 1000;
45 hdr->bit0lo = ustix * ns0l / 1000;
46 hdr->bit1hi = ustix * ns1h / 1000;
47 hdr->bit1lo = ustix * ns1l / 1000;
48 hdr->swaprg = (
type == TYPE_GRB);
51 state->cog =
cognew(hdr, &state->command);
61 | ((uint32_t)colors << 16);
62 while (state->command)
#define cognew(code, param)
Start a new Propeller PASM COG.
Driver for WS2812 and WS2812B RGB LEDs.
#define CLKFREQ
Returns the current clock frequency.
void ws2812_set(ws2812_t *driver, int pin, uint32_t *colors, int count)
Set color pattern on a chain of LEDs.
int ws_start(ws2812_t *driver, int usreset, int ns0h, int ns0l, int ns1h, int ns1l, int type)
Load a COG with a driver using custom parameters.