Control RGB Pixels using SPI.
This only supports the LPD8806 chip for now. We're happy to accept pull requests adding support for different pixel types.
|
enum | RGB_Color { RED = 0,
GREEN = 1,
BLUE = 2
} |
| RGB color values.
|
|
void SPIRGB_BeginUpdate |
( |
| ) |
|
Begin a frame update.
This pauses the SPI sending task.
void SPIRGB_CompleteUpdate |
( |
| ) |
|
Complete a frame update.
This unpauses the SPI sending task. The frame will be sent on the next call to SPIRGB_Tasks().
Initialize the SPI RGB module.
- Parameters
-
config | The configuration to use. |
void SPIRGB_SetPixel |
( |
uint16_t |
index, |
|
|
RGB_Color |
color, |
|
|
uint8_t |
value |
|
) |
| |
Set the value of a pixel.
- Parameters
-
index | The pixel offset |
color | The pixel color |
value | The new value for the pixel |
Perform the periodic SPI RGB tasks.
This should be called in the main event loop.