diff options
author | Legonut <legonut3@gmail.com> | 2018-02-06 23:44:10 -0500 |
---|---|---|
committer | Jack Humbert <jack.humb@gmail.com> | 2018-02-06 23:44:10 -0500 |
commit | ad01e3c03a5213a46d5e6bd14cbb3c3231f68c78 (patch) | |
tree | 790ce99ed792d643d4007a7c64357566529c35fd /keyboards/zen/split_rgb.c | |
parent | 9cfcd494064439b0c8b31bc45969b0487ec6e81a (diff) |
New keyboard added "Zen" (#2347)
* New keyboard added
Zen is a split ortholinear currently in group buy.
* remove bad keymap
Keymap was throwing errors
* remove other bad keymap
I should have checked these before haha
* small fix to update folder name
* renamed temp
* renamed to zen
* update folder name
* Slim down matrix code
Suggested by drashna
* move KC_NO
* Update keymap
* change from rev2 to rev1
Diffstat (limited to 'keyboards/zen/split_rgb.c')
-rw-r--r-- | keyboards/zen/split_rgb.c | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/keyboards/zen/split_rgb.c b/keyboards/zen/split_rgb.c new file mode 100644 index 0000000000..6d7cb44cf0 --- /dev/null +++ b/keyboards/zen/split_rgb.c @@ -0,0 +1,41 @@ +#include <stdint.h> +#include <stdbool.h> +#include "split_util.h" +#include "progmem.h" +#include "print.h" +#include "rgblight.h" + +#ifdef USE_I2C +# include "i2c.h" +#else // USE_SERIAL +# include "serial.h" +#endif + + +rgblight_config_t rgblight_config; + +void rgblight_slave_update(void) { + //rgblight_effect_christmas(); +} + + +void rgblight_set(void) { + if (rgblight_config.enable) { + #ifdef RGBW + ws2812_setleds_rgbw(led, RGBLED_NUM); + #else + ws2812_setleds(led, RGBLED_NUM); + #endif + } else { + for (uint8_t i = 0; i < RGBLED_NUM; i++) { + led[i].r = 0; + led[i].g = 0; + led[i].b = 0; + } + #ifdef RGBW + ws2812_setleds_rgbw(led, RGBLED_NUM); + #else + ws2812_setleds(led, RGBLED_NUM); + #endif + } +} |