aboutsummaryrefslogtreecommitdiff
path: root/keyboards/planck/light/light.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/planck/light/light.c')
-rw-r--r--keyboards/planck/light/light.c87
1 files changed, 28 insertions, 59 deletions
diff --git a/keyboards/planck/light/light.c b/keyboards/planck/light/light.c
index 178d28274..896ec4458 100644
--- a/keyboards/planck/light/light.c
+++ b/keyboards/planck/light/light.c
@@ -77,65 +77,24 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
77 {1, C9_14, C8_14, C7_14} 77 {1, C9_14, C8_14, C7_14}
78}; 78};
79 79
80rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { 80led_config_t g_led_config = { {
81 81 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 },
82 /*{row | col << 4} 82 { 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 },
83 | {x=0..224, y=0..64} 83 { 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35 },
84 | | flags 84 { 36, 37, 38, 39, 40, 41, 43, 44, 45, 46, 47, 48 }
85 | | | */ 85}, {
86 {{0|(0<<4)}, {20.36*0, 21.33*0}, 1}, 86 { 0, 0 }, { 20, 0 }, { 40, 0 }, { 61, 0 }, { 81, 0 }, { 101, 0 }, { 122, 0 }, { 142, 0 }, { 162, 0 }, { 183, 0 }, { 203, 0 }, { 223, 0 },
87 {{0|(1<<4)}, {20.36*1, 21.33*0}, 4}, 87 { 0, 21 }, { 20, 21 }, { 40, 21 }, { 61, 21 }, { 81, 21 }, { 101, 21 }, { 122, 21 }, { 142, 21 }, { 162, 21 }, { 183, 21 }, { 203, 21 }, { 223, 21 },
88 {{0|(2<<4)}, {20.36*2, 21.33*0}, 4}, 88 { 0, 42 }, { 20, 42 }, { 40, 42 }, { 61, 42 }, { 81, 42 }, { 101, 42 }, { 122, 42 }, { 142, 42 }, { 162, 42 }, { 183, 42 }, { 203, 42 }, { 223, 42 },
89 {{0|(3<<4)}, {20.36*3, 21.33*0}, 4}, 89 { 0, 63 }, { 20, 63 }, { 40, 63 }, { 61, 63 }, { 81, 63 }, { 101, 63 }, { 111, 63 }, { 122, 63 }, { 142, 63 }, { 162, 63 }, { 183, 63 }, { 203, 63 },
90 {{0|(4<<4)}, {20.36*4, 21.33*0}, 4}, 90 { 223, 63 }
91 {{0|(5<<4)}, {20.36*5, 21.33*0}, 4}, 91}, {
92 {{0|(6<<4)}, {20.36*6, 21.33*0}, 4}, 92 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
93 {{0|(7<<4)}, {20.36*7, 21.33*0}, 4}, 93 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
94 {{0|(8<<4)}, {20.36*8, 21.33*0}, 4}, 94 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
95 {{0|(9<<4)}, {20.36*9, 21.33*0}, 4}, 95 1, 1, 1, 1, 1, 4, 4, 4, 1, 1, 1, 1,
96 {{0|(10<<4)}, {20.36*10,21.33*0}, 4}, 96 1
97 {{0|(11<<4)}, {20.36*11,21.33*0}, 1}, 97} };
98
99 {{1|(0<<4)}, {20.36*0, 21.33*1}, 1},
100 {{1|(1<<4)}, {20.36*1, 21.33*1}, 4},
101 {{1|(2<<4)}, {20.36*2, 21.33*1}, 4},
102 {{1|(3<<4)}, {20.36*3, 21.33*1}, 4},
103 {{1|(4<<4)}, {20.36*4, 21.33*1}, 4},
104 {{1|(5<<4)}, {20.36*5, 21.33*1}, 4},
105 {{1|(6<<4)}, {20.36*6, 21.33*1}, 4},
106 {{1|(7<<4)}, {20.36*7, 21.33*1}, 4},
107 {{1|(8<<4)}, {20.36*8, 21.33*1}, 4},
108 {{1|(9<<4)}, {20.36*9, 21.33*1}, 4},
109 {{1|(10<<4)}, {20.36*10,21.33*1}, 4},
110 {{1|(11<<4)}, {20.36*11,21.33*1}, 1},
111
112 {{2|(0<<4)}, {20.36*0, 21.33*2}, 1},
113 {{2|(1<<4)}, {20.36*1, 21.33*2}, 4},
114 {{2|(2<<4)}, {20.36*2, 21.33*2}, 4},
115 {{2|(3<<4)}, {20.36*3, 21.33*2}, 4},
116 {{2|(4<<4)}, {20.36*4, 21.33*2}, 4},
117 {{2|(5<<4)}, {20.36*5, 21.33*2}, 4},
118 {{2|(6<<4)}, {20.36*6, 21.33*2}, 4},
119 {{2|(7<<4)}, {20.36*7, 21.33*2}, 4},
120 {{2|(8<<4)}, {20.36*8, 21.33*2}, 4},
121 {{2|(9<<4)}, {20.36*9, 21.33*2}, 4},
122 {{2|(10<<4)}, {20.36*10,21.33*2}, 4},
123 {{2|(11<<4)}, {20.36*11,21.33*2}, 1},
124
125 {{3|(0<<4)}, {20.36*0, 21.33*3}, 1},
126 {{3|(1<<4)}, {20.36*1, 21.33*3}, 1},
127 {{3|(2<<4)}, {20.36*2, 21.33*3}, 1},
128 {{3|(3<<4)}, {20.36*3, 21.33*3}, 1},
129 {{3|(4<<4)}, {20.36*4, 21.33*3}, 1},
130 {{3|(5<<4)}, {20.36*5, 21.33*3}, 4},
131 {{3|(5<<4)}, {20.36*5.5,21.33*3}, 4},
132 {{3|(6<<4)}, {20.36*6, 21.33*3}, 4},
133 {{3|(7<<4)}, {20.36*7, 21.33*3}, 1},
134 {{3|(8<<4)}, {20.36*8, 21.33*3}, 1},
135 {{3|(9<<4)}, {20.36*9, 21.33*3}, 1},
136 {{3|(10<<4)}, {20.36*10,21.33*3}, 1},
137 {{3|(11<<4)}, {20.36*11,21.33*3}, 1}
138};
139 98
140void matrix_init_kb(void) { 99void matrix_init_kb(void) {
141 100
@@ -151,6 +110,16 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record)
151 return process_record_user(keycode, record); 110 return process_record_user(keycode, record);
152} 111}
153 112
113uint8_t rgb_matrix_map_row_column_to_led_kb(uint8_t row, uint8_t column, uint8_t *led_i) {
114 // Spacebar has 2 leds 41 & 42, so add 42 to the array here, and 41 will be added
115 // by the default lookup code that runs after this
116 if (row == 3 && column == 5) {
117 led_i[0] = 42;
118 return 1;
119 }
120 return 0;
121}
122
154void matrix_scan_kb(void) 123void matrix_scan_kb(void)
155{ 124{
156 matrix_scan_user(); 125 matrix_scan_user();