diff options
author | William Chang <william@factual.com> | 2019-05-09 21:16:15 -0700 |
---|---|---|
committer | William Chang <william@factual.com> | 2019-05-09 21:16:15 -0700 |
commit | 9ce186860e78d5afe350636cb7445e18c2577f33 (patch) | |
tree | b7f5dded777a950e63c4dd967260744336bfaa6b /keyboards/singa/singa.c | |
parent | 57a6ea11df685d84a1ea07953e88f224ce2b24f7 (diff) | |
parent | 4b2d3288d013b1a71ea25402224c4a8225a099e9 (diff) | |
download | firmware-9ce186860e78d5afe350636cb7445e18c2577f33.tar.gz firmware-9ce186860e78d5afe350636cb7445e18c2577f33.tar.bz2 firmware-9ce186860e78d5afe350636cb7445e18c2577f33.zip |
Merge branch 'qmk-master'
Diffstat (limited to 'keyboards/singa/singa.c')
-rw-r--r-- | keyboards/singa/singa.c | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/keyboards/singa/singa.c b/keyboards/singa/singa.c index 26a7e4637..ee49ba65c 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); |