summaryrefslogtreecommitdiff
path: root/keyboards/singa
diff options
context:
space:
mode:
authorkaylanm <1063516+kaylanm@users.noreply.github.com>2019-05-07 09:36:40 -0400
committerMechMerlin <30334081+mechmerlin@users.noreply.github.com>2019-05-07 06:36:40 -0700
commit3b132599427a648b1f14aaf30312f05f855625ea (patch)
tree1052655d48e9854c9c914c5676aae7c4f7b656fd /keyboards/singa
parent97b8567a1f4a64fe1d43cf54683472aeb534489b (diff)
Add remaining RGB light components. (#5785)
Diffstat (limited to 'keyboards/singa')
-rw-r--r--keyboards/singa/singa.c25
1 files changed, 22 insertions, 3 deletions
diff --git a/keyboards/singa/singa.c b/keyboards/singa/singa.c
index 26a7e46375..ee49ba65c1 100644
--- a/keyboards/singa/singa.c
+++ b/keyboards/singa/singa.c
@@ -34,6 +34,25 @@ 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. */
+}
+
__attribute__ ((weak))
void matrix_scan_user(void) {
}
@@ -45,7 +64,7 @@ void backlight_init_ports(void) {
setPinOutput(D4);
setPinOutput(D6);
- // turn RGB LEDs on
+ // turn backlight LEDs on
writePinHigh(D0);
writePinHigh(D1);
writePinHigh(D4);
@@ -54,13 +73,13 @@ void backlight_init_ports(void) {
void backlight_set(uint8_t level) {
if (level == 0) {
- // turn RGB LEDs off
+ // turn backlight LEDs off
writePinLow(D0);
writePinLow(D1);
writePinLow(D4);
writePinLow(D6);
} else {
- // turn RGB LEDs on
+ // turn backlight LEDs on
writePinHigh(D0);
writePinHigh(D1);
writePinHigh(D4);