]> git.donarmstrong.com Git - qmk_firmware.git/blobdiff - keyboards/planck/light/light.c
Updated rgb_led struct field modifier to flags (#5619)
[qmk_firmware.git] / keyboards / planck / light / light.c
index cef57c5e69ffd8ab51d6e1c2f3a0972181244f56..178d28274c43884112a1c712c84958b0522b5c08 100644 (file)
@@ -77,49 +77,49 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
     {1, C9_14, C8_14, C7_14}
 };
 
-const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
+rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
 
     /*{row | col << 4}
       |             {x=0..224, y=0..64}
-      |              |                 modifier
+      |              |                 flags
       |              |                 | */
     {{0|(0<<4)},   {20.36*0, 21.33*0}, 1},
-    {{0|(1<<4)},   {20.36*1, 21.33*0}, 0},
-    {{0|(2<<4)},   {20.36*2, 21.33*0}, 0},
-    {{0|(3<<4)},   {20.36*3, 21.33*0}, 0},
-    {{0|(4<<4)},   {20.36*4, 21.33*0}, 0},
-    {{0|(5<<4)},   {20.36*5, 21.33*0}, 0},
-    {{0|(6<<4)},   {20.36*6, 21.33*0}, 0},
-    {{0|(7<<4)},   {20.36*7, 21.33*0}, 0},
-    {{0|(8<<4)},   {20.36*8, 21.33*0}, 0},
-    {{0|(9<<4)},   {20.36*9, 21.33*0}, 0},
-    {{0|(10<<4)},  {20.36*10,21.33*0}, 0},
+    {{0|(1<<4)},   {20.36*1, 21.33*0}, 4},
+    {{0|(2<<4)},   {20.36*2, 21.33*0}, 4},
+    {{0|(3<<4)},   {20.36*3, 21.33*0}, 4},
+    {{0|(4<<4)},   {20.36*4, 21.33*0}, 4},
+    {{0|(5<<4)},   {20.36*5, 21.33*0}, 4},
+    {{0|(6<<4)},   {20.36*6, 21.33*0}, 4},
+    {{0|(7<<4)},   {20.36*7, 21.33*0}, 4},
+    {{0|(8<<4)},   {20.36*8, 21.33*0}, 4},
+    {{0|(9<<4)},   {20.36*9, 21.33*0}, 4},
+    {{0|(10<<4)},  {20.36*10,21.33*0}, 4},
     {{0|(11<<4)},  {20.36*11,21.33*0}, 1},
 
     {{1|(0<<4)},   {20.36*0, 21.33*1}, 1},
-    {{1|(1<<4)},   {20.36*1, 21.33*1}, 0},
-    {{1|(2<<4)},   {20.36*2, 21.33*1}, 0},
-    {{1|(3<<4)},   {20.36*3, 21.33*1}, 0},
-    {{1|(4<<4)},   {20.36*4, 21.33*1}, 0},
-    {{1|(5<<4)},   {20.36*5, 21.33*1}, 0},
-    {{1|(6<<4)},   {20.36*6, 21.33*1}, 0},
-    {{1|(7<<4)},   {20.36*7, 21.33*1}, 0},
-    {{1|(8<<4)},   {20.36*8, 21.33*1}, 0},
-    {{1|(9<<4)},   {20.36*9, 21.33*1}, 0},
-    {{1|(10<<4)},  {20.36*10,21.33*1}, 0},
+    {{1|(1<<4)},   {20.36*1, 21.33*1}, 4},
+    {{1|(2<<4)},   {20.36*2, 21.33*1}, 4},
+    {{1|(3<<4)},   {20.36*3, 21.33*1}, 4},
+    {{1|(4<<4)},   {20.36*4, 21.33*1}, 4},
+    {{1|(5<<4)},   {20.36*5, 21.33*1}, 4},
+    {{1|(6<<4)},   {20.36*6, 21.33*1}, 4},
+    {{1|(7<<4)},   {20.36*7, 21.33*1}, 4},
+    {{1|(8<<4)},   {20.36*8, 21.33*1}, 4},
+    {{1|(9<<4)},   {20.36*9, 21.33*1}, 4},
+    {{1|(10<<4)},  {20.36*10,21.33*1}, 4},
     {{1|(11<<4)},  {20.36*11,21.33*1}, 1},
 
     {{2|(0<<4)},   {20.36*0, 21.33*2}, 1},
-    {{2|(1<<4)},   {20.36*1, 21.33*2}, 0},
-    {{2|(2<<4)},   {20.36*2, 21.33*2}, 0},
-    {{2|(3<<4)},   {20.36*3, 21.33*2}, 0},
-    {{2|(4<<4)},   {20.36*4, 21.33*2}, 0},
-    {{2|(5<<4)},   {20.36*5, 21.33*2}, 0},
-    {{2|(6<<4)},   {20.36*6, 21.33*2}, 0},
-    {{2|(7<<4)},   {20.36*7, 21.33*2}, 0},
-    {{2|(8<<4)},   {20.36*8, 21.33*2}, 0},
-    {{2|(9<<4)},   {20.36*9, 21.33*2}, 0},
-    {{2|(10<<4)},  {20.36*10,21.33*2}, 0},
+    {{2|(1<<4)},   {20.36*1, 21.33*2}, 4},
+    {{2|(2<<4)},   {20.36*2, 21.33*2}, 4},
+    {{2|(3<<4)},   {20.36*3, 21.33*2}, 4},
+    {{2|(4<<4)},   {20.36*4, 21.33*2}, 4},
+    {{2|(5<<4)},   {20.36*5, 21.33*2}, 4},
+    {{2|(6<<4)},   {20.36*6, 21.33*2}, 4},
+    {{2|(7<<4)},   {20.36*7, 21.33*2}, 4},
+    {{2|(8<<4)},   {20.36*8, 21.33*2}, 4},
+    {{2|(9<<4)},   {20.36*9, 21.33*2}, 4},
+    {{2|(10<<4)},  {20.36*10,21.33*2}, 4},
     {{2|(11<<4)},  {20.36*11,21.33*2}, 1},
 
     {{3|(0<<4)},   {20.36*0, 21.33*3}, 1},
@@ -127,9 +127,9 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
     {{3|(2<<4)},   {20.36*2, 21.33*3}, 1},
     {{3|(3<<4)},   {20.36*3, 21.33*3}, 1},
     {{3|(4<<4)},   {20.36*4, 21.33*3}, 1},
-    {{3|(5<<4)},   {20.36*5, 21.33*3}, 0},
-    {{3|(5<<4)},   {20.36*5.5,21.33*3}, 0},
-    {{3|(6<<4)},   {20.36*6, 21.33*3}, 0},
+    {{3|(5<<4)},   {20.36*5, 21.33*3}, 4},
+    {{3|(5<<4)},   {20.36*5.5,21.33*3}, 4},
+    {{3|(6<<4)},   {20.36*6, 21.33*3}, 4},
     {{3|(7<<4)},   {20.36*7, 21.33*3}, 1},
     {{3|(8<<4)},   {20.36*8, 21.33*3}, 1},
     {{3|(9<<4)},   {20.36*9, 21.33*3}, 1},
@@ -159,10 +159,12 @@ void matrix_scan_kb(void)
 void suspend_power_down_kb(void)
 {
     rgb_matrix_set_suspend_state(true);
+    suspend_power_down_user();
 }
 
 void suspend_wakeup_init_kb(void)
 {
     rgb_matrix_set_suspend_state(false);
+    suspend_wakeup_init_user();
 }