diff options
author | Jack Humbert <jack.humb@gmail.com> | 2016-11-28 23:51:07 -0500 |
---|---|---|
committer | Jack Humbert <jack.humb@gmail.com> | 2016-11-28 23:51:07 -0500 |
commit | 6e0f994950435aa5867e7b7ce780186d881d74ac (patch) | |
tree | 4a43aec89032a5bace8be91c3230b6d2fcedcb5f /keyboards/handwired/promethium/rgbsps.c | |
parent | 7edac212c8ed8442bf4207e70dc8194631b2bf27 (diff) | |
parent | 1585fc4b616cb28b8d4a418cd31c8ce0dd64f731 (diff) |
Merge branch 'master' of github.com:jackhumbert/qmk_firmware into wu5y7
Diffstat (limited to 'keyboards/handwired/promethium/rgbsps.c')
-rw-r--r-- | keyboards/handwired/promethium/rgbsps.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/keyboards/handwired/promethium/rgbsps.c b/keyboards/handwired/promethium/rgbsps.c new file mode 100644 index 0000000000..ea922ec3fd --- /dev/null +++ b/keyboards/handwired/promethium/rgbsps.c @@ -0,0 +1,24 @@ +#include "light_ws2812.h" +#include "rgbsps.h" + +struct cRGB led[RGBSPS_NUM]; + +void rgbsps_set(uint8_t index, uint8_t r, uint8_t g, uint8_t b) { + led[index].r = r; + led[index].g = g; + led[index].b = b; +} + +void rgbsps_setall(uint8_t r, uint8_t g, uint8_t b) { + for (uint16_t i = 0; i < RGBSPS_NUM; i++) { + rgbsps_set(i, r, g, b); + } +} + +void rgbsps_turnoff(void) { + rgbsps_setall(0, 0, 0); +} + +void rgbsps_send(void) { + ws2812_setleds(led, RGBSPS_NUM); +}
\ No newline at end of file |