19
19
20
20
#include "n6.h"
21
21
#include "i2c_master.h"
22
- #include "issi/is31fl3731.h"
22
+ #include "drivers/led/ issi/is31fl3731.h"
23
23
24
24
enum {
25
25
SELF_TESTING ,
@@ -158,7 +158,7 @@ static void self_testing(void)
158
158
}
159
159
160
160
// light left and right
161
-
161
+
162
162
if (rgb_state .index == 16 ) {
163
163
if (rgb_state .duration ) {
164
164
rgb_state .duration -- ;
@@ -187,49 +187,49 @@ static void self_testing(void)
187
187
update_ticks ();
188
188
}
189
189
190
- const is31_led g_is31_leds [DRIVER_LED_TOTAL ] = {
191
- /* Refer to IS31 manual for these locations
192
- * driver
193
- * | R location
194
- * | | G location
195
- * | | | B location
196
- * | | | | */
197
- // left CA
198
- {0 , C1_1 , C3_2 , C4_2 },
199
- {0 , C1_2 , C2_2 , C4_3 },
200
- {0 , C1_3 , C2_3 , C3_3 },
201
- {0 , C1_4 , C2_4 , C3_4 },
202
- {0 , C1_5 , C2_5 , C3_5 },
203
- {0 , C1_6 , C2_6 , C3_6 },
204
- {0 , C1_7 , C2_7 , C3_7 },
205
- {0 , C1_8 , C2_8 , C3_8 },
190
+ const is31_led __flash g_is31_leds [DRIVER_LED_TOTAL ] = {
191
+ /* Refer to IS31 manual for these locations
192
+ * driver
193
+ * | R location
194
+ * | | G location
195
+ * | | | B location
196
+ * | | | | */
197
+ // left CA
198
+ {0 , C1_1 , C3_2 , C4_2 },
199
+ {0 , C1_2 , C2_2 , C4_3 },
200
+ {0 , C1_3 , C2_3 , C3_3 },
201
+ {0 , C1_4 , C2_4 , C3_4 },
202
+ {0 , C1_5 , C2_5 , C3_5 },
203
+ {0 , C1_6 , C2_6 , C3_6 },
204
+ {0 , C1_7 , C2_7 , C3_7 },
205
+ {0 , C1_8 , C2_8 , C3_8 },
206
206
207
- {0 , C9_1 , C8_1 , C7_1 },
208
- {0 , C9_2 , C8_2 , C7_2 },
209
- {0 , C9_3 , C8_3 , C7_3 },
210
- {0 , C9_4 , C8_4 , C7_4 },
211
- {0 , C9_5 , C8_5 , C7_5 },
212
- {0 , C9_6 , C8_6 , C7_6 },
213
- {0 , C9_7 , C8_7 , C6_6 },
214
- {0 , C9_8 , C7_7 , C6_7 },
215
- // left CB
216
- {0 , C1_9 , C3_10 , C4_10 },
217
- {0 , C1_10 , C2_10 , C4_11 },
218
- {0 , C1_11 , C2_11 , C3_11 },
219
- {0 , C1_12 , C2_12 , C3_12 },
220
- {0 , C1_13 , C2_13 , C3_13 },
221
- {0 , C1_14 , C2_14 , C3_14 },
222
- {0 , C1_15 , C2_15 , C3_15 },
223
- {0 , C1_16 , C2_16 , C3_16 },
207
+ {0 , C9_1 , C8_1 , C7_1 },
208
+ {0 , C9_2 , C8_2 , C7_2 },
209
+ {0 , C9_3 , C8_3 , C7_3 },
210
+ {0 , C9_4 , C8_4 , C7_4 },
211
+ {0 , C9_5 , C8_5 , C7_5 },
212
+ {0 , C9_6 , C8_6 , C7_6 },
213
+ {0 , C9_7 , C8_7 , C6_6 },
214
+ {0 , C9_8 , C7_7 , C6_7 },
215
+ // left CB
216
+ {0 , C1_9 , C3_10 , C4_10 },
217
+ {0 , C1_10 , C2_10 , C4_11 },
218
+ {0 , C1_11 , C2_11 , C3_11 },
219
+ {0 , C1_12 , C2_12 , C3_12 },
220
+ {0 , C1_13 , C2_13 , C3_13 },
221
+ {0 , C1_14 , C2_14 , C3_14 },
222
+ {0 , C1_15 , C2_15 , C3_15 },
223
+ {0 , C1_16 , C2_16 , C3_16 },
224
224
225
- {0 , C9_9 , C8_9 , C7_9 },
226
- {0 , C9_10 , C8_10 , C7_10 },
227
- {0 , C9_11 , C8_11 , C7_11 },
228
- {0 , C9_12 , C8_12 , C7_12 },
229
- {0 , C9_13 , C8_13 , C7_13 },
230
- {0 , C9_14 , C8_14 , C7_14 },
231
- {0 , C9_15 , C8_15 , C6_14 },
232
- {0 , C9_16 , C7_15 , C6_15 },
225
+ {0 , C9_9 , C8_9 , C7_9 },
226
+ {0 , C9_10 , C8_10 , C7_10 },
227
+ {0 , C9_11 , C8_11 , C7_11 },
228
+ {0 , C9_12 , C8_12 , C7_12 },
229
+ {0 , C9_13 , C8_13 , C7_13 },
230
+ {0 , C9_14 , C8_14 , C7_14 },
231
+ {0 , C9_15 , C8_15 , C6_14 },
232
+ {0 , C9_16 , C7_15 , C6_15 },
233
233
};
234
234
#endif
235
235
__attribute__((weak ))
@@ -240,7 +240,7 @@ void matrix_init_kb(void)
240
240
// clear caps led
241
241
setPinOutput (CAPS_PIN );
242
242
writePinLow (CAPS_PIN );
243
- #ifdef RGBLIGHT_ENABLE
243
+ #ifdef RGBLIGHT_ENABLE
244
244
i2c_init ();
245
245
IS31FL3731_init (DRIVER_ADDR_1 );
246
246
for (int index = 0 ; index < DRIVER_LED_TOTAL ; index ++ ) {
@@ -252,7 +252,7 @@ void matrix_init_kb(void)
252
252
matrix_init_user ();
253
253
}
254
254
255
- #ifdef RGBLIGHT_ENABLE
255
+ #ifdef RGBLIGHT_ENABLE
256
256
void housekeeping_task_kb (void )
257
257
{
258
258
if (rgb_state .state == SELF_TESTING ) {
@@ -261,7 +261,7 @@ void housekeeping_task_kb(void)
261
261
//gold 0xFF, 0xD9, 0x00
262
262
LED_TYPE led = {
263
263
.r = 0xFF ,
264
- .g = 0xD9 ,
264
+ .g = 0xD9 ,
265
265
.b = 0x00 ,
266
266
};
267
267
if (rgb_state .alert ) {
@@ -303,7 +303,7 @@ bool led_update_kb(led_t led_state)
303
303
if (res ) {
304
304
writePin (CAPS_PIN , led_state .caps_lock );
305
305
306
- #ifdef RGBLIGHT_ENABLE
306
+ #ifdef RGBLIGHT_ENABLE
307
307
if (rgb_state .state != SELF_TESTING ) {
308
308
if (led_state .caps_lock ) {
309
309
rgb_state .state = CAPS_ALERT ;
@@ -316,4 +316,4 @@ bool led_update_kb(led_t led_state)
316
316
#endif
317
317
}
318
318
return res ;
319
- }
319
+ }
0 commit comments