From 0a40654b82520849fcc587e8fb76c823378649a6 Mon Sep 17 00:00:00 2001 From: Yang Liu Date: Sun, 24 Jan 2016 13:14:50 -0800 Subject: Add support for WS2812 LEDs --- keyboard/planck/config.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'keyboard/planck/config.h') diff --git a/keyboard/planck/config.h b/keyboard/planck/config.h index a4c711db82..856de73066 100644 --- a/keyboard/planck/config.h +++ b/keyboard/planck/config.h @@ -58,6 +58,21 @@ along with this program. If not, see . keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ ) +/* ws2812 RGB LED */ +#define ws2812_PORTREG PORTD +#define ws2812_DDRREG DDRD +#define ws2812_pin PD1 +#define RGBLED_NUM 28 // Number of LEDs +#ifndef RGBLIGHT_HUE_STEP +#define RGBLIGHT_HUE_STEP 10 +#endif +#ifndef RGBLIGHT_SAT_STEP +#define RGBLIGHT_SAT_STEP 17 +#endif +#ifndef RGBLIGHT_VAL_STEP +#define RGBLIGHT_VAL_STEP 17 +#endif + /* * Feature disable options * These options are also useful to firmware size reduction. -- cgit v1.2.1 From ba9ac457b2159097ecfd9848c5171c52e3a68260 Mon Sep 17 00:00:00 2001 From: Yang Liu Date: Sun, 24 Jan 2016 17:05:47 -0800 Subject: Integrate WS2812 code into quantum core --- keyboard/planck/config.h | 6 ------ 1 file changed, 6 deletions(-) (limited to 'keyboard/planck/config.h') diff --git a/keyboard/planck/config.h b/keyboard/planck/config.h index 856de73066..d3719e0cb1 100644 --- a/keyboard/planck/config.h +++ b/keyboard/planck/config.h @@ -63,15 +63,9 @@ along with this program. If not, see . #define ws2812_DDRREG DDRD #define ws2812_pin PD1 #define RGBLED_NUM 28 // Number of LEDs -#ifndef RGBLIGHT_HUE_STEP #define RGBLIGHT_HUE_STEP 10 -#endif -#ifndef RGBLIGHT_SAT_STEP #define RGBLIGHT_SAT_STEP 17 -#endif -#ifndef RGBLIGHT_VAL_STEP #define RGBLIGHT_VAL_STEP 17 -#endif /* * Feature disable options -- cgit v1.2.1