aboutsummaryrefslogtreecommitdiff
path: root/keyboards/jj4x4/jj4x4.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/jj4x4/jj4x4.c')
-rw-r--r--keyboards/jj4x4/jj4x4.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/keyboards/jj4x4/jj4x4.c b/keyboards/jj4x4/jj4x4.c
index 265508b2d..6330c89de 100644
--- a/keyboards/jj4x4/jj4x4.c
+++ b/keyboards/jj4x4/jj4x4.c
@@ -17,40 +17,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/ 17*/
18 18
19#include "jj4x4.h" 19#include "jj4x4.h"
20
21#ifdef RGBLIGHT_ENABLE
22
23#include <string.h>
24#include "i2c_master.h"
25#include "rgblight.h"
26
27extern rgblight_config_t rgblight_config;
28
29void matrix_init_kb(void) {
30 i2c_init();
31 // call user level keymaps, if any
32 matrix_init_user();
33}
34// custom RGB driver
35void rgblight_set(void) {
36 if (!rgblight_config.enable) {
37 memset(led, 0, 3 * RGBLED_NUM);
38 }
39
40 i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100);
41}
42
43bool rgb_init = false;
44
45void matrix_scan_kb(void) {
46 // if LEDs were previously on before poweroff, turn them back on
47 if (rgb_init == false && rgblight_config.enable) {
48 i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100);
49 rgb_init = true;
50 }
51
52 rgblight_task();
53 matrix_scan_user();
54}
55
56#endif