]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
[Keyboard][Fix] budget96 RGB light-switches (#6840)
authorSimon R <dieideeistgut@users.noreply.github.com>
Mon, 30 Sep 2019 17:59:34 +0000 (19:59 +0200)
committerDrashna Jaelre <drashna@live.com>
Mon, 30 Sep 2019 17:59:34 +0000 (10:59 -0700)
Adding code to make the RGB switching work. Taken from the singa (singa.c).

Signed-off-by: Simon R <me@dieideeistgut.de>
keyboards/donutcables/budget96/budget96.c

index 7831a91f52343b0e3537c91c623eaa8526b19819..2fc826f09273a559dfb67f81923733514629627e 100644 (file)
@@ -49,6 +49,26 @@ void rgblight_set(void) {
 }
 #endif
 
+void matrix_init_kb(void) {
+#ifdef RGBLIGHT_ENABLE
+    if (rgblight_config.enable) {
+        i2c_init();
+        i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100);
+    }
+#endif
+    // call user level keymaps, if any
+    matrix_init_user();
+}
+
+void matrix_scan_kb(void) {
+#ifdef RGBLIGHT_ENABLE
+    rgblight_task();
+#endif
+    matrix_scan_user();
+    /* Nothing else for now. */
+}
+
+
 void backlight_init_ports(void) {
     // initialize pins D0, D1, D4 and D6 as output
     setPinOutput(D0);