summaryrefslogtreecommitdiff
path: root/keyboards/ergodox_ez
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/ergodox_ez')
-rw-r--r--keyboards/ergodox_ez/led_i2c.c8
-rw-r--r--keyboards/ergodox_ez/post_config.h4
-rw-r--r--keyboards/ergodox_ez/shine/info.json3
-rw-r--r--keyboards/ergodox_ez/shine/rules.mk1
4 files changed, 12 insertions, 4 deletions
diff --git a/keyboards/ergodox_ez/led_i2c.c b/keyboards/ergodox_ez/led_i2c.c
index 23ef91b74f..a8802858ec 100644
--- a/keyboards/ergodox_ez/led_i2c.c
+++ b/keyboards/ergodox_ez/led_i2c.c
@@ -21,8 +21,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifdef RGBLIGHT_ENABLE
# include "ergodox_ez.h"
+# include "ws2812.h"
-void rgblight_call_driver(rgb_led_t *led, uint8_t led_num) {
+void setleds_custom(rgb_led_t *led, uint16_t led_num) {
i2c_init();
i2c_start(0x84, ERGODOX_EZ_I2C_TIMEOUT);
int i = 0;
@@ -30,7 +31,7 @@ void rgblight_call_driver(rgb_led_t *led, uint8_t led_num) {
// prevent right-half code from trying to bitbang all 30
// so with 30 LEDs, we count from 29 to 15 here, and the
// other half does 0 to 14.
- uint8_t half_led_num = RGBLED_NUM / 2;
+ uint8_t half_led_num = RGBLIGHT_LED_COUNT / 2;
for (i = half_led_num + half_led_num - 1; i >= half_led_num; --i)
# elif defined(ERGODOX_LED_15_MIRROR)
for (i = 0; i < led_num; ++i)
@@ -51,5 +52,8 @@ void rgblight_call_driver(rgb_led_t *led, uint8_t led_num) {
ws2812_setleds(led, led_num);
}
+const rgblight_driver_t rgblight_driver = {
+ .setleds = setleds_custom,
+};
#endif // RGBLIGHT_ENABLE
diff --git a/keyboards/ergodox_ez/post_config.h b/keyboards/ergodox_ez/post_config.h
index 0d4fe5c683..eb22439ae4 100644
--- a/keyboards/ergodox_ez/post_config.h
+++ b/keyboards/ergodox_ez/post_config.h
@@ -33,8 +33,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifdef ERGODOX_LED_30
// If using 30 LEDs, then define that many
-# define RGBLED_NUM 30 // Number of LEDs
+# define RGBLIGHT_LED_COUNT 30 // Number of LEDs
#else
// If not, then only define 15
-# define RGBLED_NUM 15 // Number of LEDs
+# define RGBLIGHT_LED_COUNT 15 // Number of LEDs
#endif
diff --git a/keyboards/ergodox_ez/shine/info.json b/keyboards/ergodox_ez/shine/info.json
index 11c3a8b209..181ac52e6c 100644
--- a/keyboards/ergodox_ez/shine/info.json
+++ b/keyboards/ergodox_ez/shine/info.json
@@ -2,5 +2,8 @@
"keyboard_name": "ErgoDox EZ Shine",
"usb": {
"pid": "0x4975"
+ },
+ "rgblight": {
+ "driver": "custom"
}
}
diff --git a/keyboards/ergodox_ez/shine/rules.mk b/keyboards/ergodox_ez/shine/rules.mk
index 1e3cebb145..b035c36850 100644
--- a/keyboards/ergodox_ez/shine/rules.mk
+++ b/keyboards/ergodox_ez/shine/rules.mk
@@ -1 +1,2 @@
RGBLIGHT_ENABLE = yes
+WS2812_DRIVER_REQUIRED = yes