13 #include <pins_arduino.h> 25 LPD8806(uint16_t n, uint8_t dpin, uint8_t cpin);
41 int8_t clkpin, datapin;
43 uint8_t clkpinmask, datapinmask;
44 volatile uint8_t *clkport, *dataport;
46 void startBitbang(
void), startSPI(
void);
void updateLength(uint16_t n)
Change strip length, calls malloc and free!
Definition: LPD8806.cpp:237
void show(void)
Writes all the LED data to the strip at once!
Definition: LPD8806.cpp:270
void setPixelColor(uint16_t n, uint8_t r, uint8_t g, uint8_t b)
Set pixel color from separate 7-bit R, G, B components.
Definition: LPD8806.cpp:328
uint32_t Color(byte, byte, byte)
Convert separate R,G,B into combined 32-bit GRB color.
Definition: LPD8806.cpp:315
void begin(void)
Activate hard/soft SPI as appropriate.
Definition: LPD8806.cpp:170
Class that stores state and functions for interacting with LPD8806 LED strips.
Definition: LPD8806.h:22
void updatePins(void)
Change pin assignments post-constructor, switching to hardware SPI.
Definition: LPD8806.cpp:183
uint32_t getPixelColor(uint16_t n)
Query color from previously-set pixel (returns packed 32-bit GRB value)
Definition: LPD8806.cpp:377
void setPixelColorRGB(uint16_t n, uint32_t c)
Set pixel color from 'packed' 32-bit RGB value.
Definition: LPD8806.cpp:360
uint16_t numPixels(void)
Retrieve number of LEDs in strip.
Definition: LPD8806.cpp:263