diff options
author | XScorpion2 <rcalt2vt@gmail.com> | 2019-05-07 18:22:46 -0500 |
---|---|---|
committer | MechMerlin <30334081+mechmerlin@users.noreply.github.com> | 2019-05-07 16:22:46 -0700 |
commit | af89752bffbaf5dcea30ea16be66b4d682701bc4 (patch) | |
tree | c82f2bc25409159a44778379db8b3a35afc47b8a /keyboards/dztech/dz60rgb/dz60rgb.c | |
parent | c7f8548d9af2045996294602d2a4bd9a214ae23c (diff) |
rgb_led struct conversion (aka: Per led (key) type rgb matrix effects - part 2) (#5783)
* Initial conversion of the rgb_led struct
* Converting last keyboard & updating effects to take advantage of the new structure
* New struct should not be const
* Updated docs
* Changing define ___ for no led to NO_LED
* Missed converting some keymap usages of the old struct layout
Diffstat (limited to 'keyboards/dztech/dz60rgb/dz60rgb.c')
-rw-r--r-- | keyboards/dztech/dz60rgb/dz60rgb.c | 419 |
1 files changed, 100 insertions, 319 deletions
diff --git a/keyboards/dztech/dz60rgb/dz60rgb.c b/keyboards/dztech/dz60rgb/dz60rgb.c index 10b2ea7a83..28ac7ce9e2 100644 --- a/keyboards/dztech/dz60rgb/dz60rgb.c +++ b/keyboards/dztech/dz60rgb/dz60rgb.c @@ -65,69 +65,26 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { {0, K_16, J_16, L_16}, }; -rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { - {{0|(13<<4)}, {16*13.5, 0}, 1}, - {{0|(12<<4)}, {16*12, 0}, 1}, - {{0|(11<<4)}, {16*11, 0}, 1}, - {{0|(10<<4)}, {16*10, 0}, 1}, - {{0|(9<<4)}, {16*9, 0}, 1}, - {{0|(8<<4)}, {16*8, 0}, 1}, - {{0|(7<<4)}, {16*7, 0}, 1}, - {{0|(6<<4)}, {16*6, 0}, 1}, - {{0|(5<<4)}, {16*5, 0}, 1}, - {{0|(4<<4)}, {16*4, 0}, 1}, - {{0|(3<<4)}, {16*3, 0}, 1}, - {{0|(2<<4)}, {16*2, 0}, 1}, - {{0|(1<<4)}, {16*1, 0}, 1}, - {{0|(0<<4)}, {16*0, 0}, 1}, - {{2|(13<<4)}, {16*13.75, 24}, 1}, - {{1|(12<<4)}, {16*12.5, 16}, 4}, - {{1|(11<<4)}, {16*11.5, 16}, 4}, - {{1|(10<<4)}, {16*10.5, 16}, 4}, - {{1|(9<<4)}, { 16*9.5, 16}, 4}, - {{1|(8<<4)}, { 16*8.5, 16}, 4}, - {{1|(7<<4)}, { 16*7.5, 16}, 4}, - {{1|(6<<4)}, { 16*6.5, 16}, 4}, - {{1|(5<<4)}, { 16*5.5, 16}, 4}, - {{1|(4<<4)}, { 16*4.5, 16}, 4}, - {{1|(3<<4)}, { 16*3.5, 16}, 4}, - {{1|(2<<4)}, { 16*2.5, 16}, 4}, - {{1|(1<<4)}, { 16*1.5, 16}, 4}, - {{1|(0<<4)}, { 16*0.25, 16}, 1}, - {{1|(13<<4)}, {16*12.75, 32}, 1}, - {{2|(11<<4)}, {16*11.75, 32}, 4}, - {{2|(10<<4)}, {16*10.75, 32}, 4}, - {{2|(9<<4)}, {16*9.75, 32}, 4}, - {{2|(8<<4)}, {16*8.75, 32}, 4}, - {{2|(7<<4)}, {16*7.75, 32}, 4}, - {{2|(6<<4)}, { 16*6.75, 32}, 4}, - {{2|(5<<4)}, { 16*5.75, 32}, 4}, - {{2|(4<<4)}, { 16*4.75, 32}, 4}, - {{2|(3<<4)}, { 16*3.75, 32}, 4}, - {{2|(2<<4)}, { 16*2.75, 32}, 4}, - {{2|(1<<4)}, { 16*1.75, 32}, 4}, - {{2|(0<<4)}, { 16*0.375, 32}, 1}, - {{3|(11<<4)}, {16*13.125, 48}, 1}, - {{3|(10<<4)}, {16*11.25, 48}, 4}, - {{3|(9<<4)}, {16*10.25, 48}, 4}, - {{3|(8<<4)}, {16*9.25, 48}, 4}, - {{3|(7<<4)}, {16*8.25, 48}, 4}, - {{3|(6<<4)}, {16*7.25, 48}, 4}, - {{3|(5<<4)}, {16*6.25, 48}, 4}, - {{3|(4<<4)}, {16*5.25, 48}, 4}, - {{3|(3<<4)}, {16*4.25, 48}, 4}, - {{3|(2<<4)}, {16*3.25, 48}, 4}, - {{3|(1<<4)}, {16*1.25, 48}, 4}, - {{3|(0<<4)}, {16*0.625, 48}, 1}, - {{4|(13<<4)}, {16*13.875, 64}, 1}, - {{4|(11<<4)}, {16*12.625, 64}, 1}, - {{4|(10<<4)}, {16*11.375, 64}, 1}, - {{4|(9<<4)}, {16*10.125, 64}, 1}, - {{4|(5<<4)}, { 16*6.375, 64}, 4}, - {{4|(2<<4)}, { 16*2.625, 64}, 1}, - {{4|(1<<4)}, { 16*1.375, 64}, 1}, - {{4|(0<<4)}, { 16*0.125, 64}, 1}, -}; +led_config_t g_led_config = { { + { 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }, + { 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 28 }, + { 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, NO_LED, 14 }, + { 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, NO_LED, NO_LED }, + { 60, 59, 58, NO_LED, NO_LED, 57, NO_LED, NO_LED, NO_LED, 56, 55, 54, NO_LED, 53 } +}, { + { 216, 0 }, { 192, 0 }, { 176, 0 }, { 160, 0 }, { 144, 0 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 }, { 0, 0 }, + { 220, 24 }, { 200, 16 }, { 184, 16 }, { 168, 16 }, { 152, 16 }, { 136, 16 }, { 120, 16 }, { 104, 16 }, { 88, 16 }, { 72, 16 }, { 56, 16 }, { 40, 16 }, { 24, 16 }, { 4, 16 }, + { 204, 32 }, { 188, 32 }, { 172, 32 }, { 156, 32 }, { 140, 32 }, { 124, 32 }, { 108, 32 }, { 92, 32 }, { 76, 32 }, { 60, 32 }, { 44, 32 }, { 28, 32 }, { 6, 32 }, { 210, 48 }, + { 180, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 20, 48 }, { 10, 48 }, { 222, 64 }, { 202, 64 }, { 182, 64 }, + { 162, 64 }, { 102, 64 }, { 42, 64 }, { 22, 64 }, { 2, 64 } +}, { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, + 1, 4, 1, 1, 1 +} }; + #elif defined (dzrgb60_hhkb) const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { {0, H_15, G_15, I_15}, @@ -194,70 +151,26 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { {0, K_16, J_16, L_16}, }; -rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { - {{2|(12<<4)}, {16*14, 0}, 1}, - {{0|(13<<4)}, {16*13, 0}, 1}, - {{0|(12<<4)}, {16*12, 0}, 1}, - {{0|(11<<4)}, {16*11, 0}, 1}, - {{0|(10<<4)}, {16*10, 0}, 1}, - {{0|(9<<4)}, {16*9, 0}, 1}, - {{0|(8<<4)}, {16*8, 0}, 1}, - {{0|(7<<4)}, {16*7, 0}, 1}, - {{0|(6<<4)}, {16*6, 0}, 1}, - {{0|(5<<4)}, {16*5, 0}, 1}, - {{0|(4<<4)}, {16*4, 0}, 1}, - {{0|(3<<4)}, {16*3, 0}, 1}, - {{0|(2<<4)}, {16*2, 0}, 1}, - {{0|(1<<4)}, {16*1, 0}, 1}, - {{0|(0<<4)}, {16*0, 0}, 1}, - {{1|(13<<4)}, {16*13.75, 16}, 1}, - {{1|(12<<4)}, {16*12.5, 16}, 4}, - {{1|(11<<4)}, {16*11.5, 16}, 4}, - {{1|(10<<4)}, {16*10.5, 16}, 4}, - {{1|(9<<4)}, { 16*9.5, 16}, 4}, - {{1|(8<<4)}, { 16*8.5, 16}, 4}, - {{1|(7<<4)}, { 16*7.5, 16}, 4}, - {{1|(6<<4)}, { 16*6.5, 16}, 4}, - {{1|(5<<4)}, { 16*5.5, 16}, 4}, - {{1|(4<<4)}, { 16*4.5, 16}, 4}, - {{1|(3<<4)}, { 16*3.5, 16}, 4}, - {{1|(2<<4)}, { 16*2.5, 16}, 4}, - {{1|(1<<4)}, { 16*1.5, 16}, 4}, - {{1|(0<<4)}, { 16*0.25, 16}, 1}, - {{2|(13<<4)}, {16*12.75, 32}, 1}, - {{2|(11<<4)}, {16*11.75, 32}, 4}, - {{2|(10<<4)}, {16*10.75, 32}, 4}, - {{2|(9<<4)}, {16*9.75, 32}, 4}, - {{2|(8<<4)}, {16*8.75, 32}, 4}, - {{2|(7<<4)}, {16*7.75, 32}, 4}, - {{2|(6<<4)}, { 16*6.75, 32}, 4}, - {{2|(5<<4)}, { 16*5.75, 32}, 4}, - {{2|(4<<4)}, { 16*4.75, 32}, 4}, - {{2|(3<<4)}, { 16*3.75, 32}, 4}, - {{2|(2<<4)}, { 16*2.75, 32}, 4}, - {{2|(1<<4)}, { 16*1.75, 32}, 4}, - {{2|(0<<4)}, { 16*0.375, 32}, 1}, - {{3|(13<<4)}, {16*14, 48}, 1}, - {{3|(11<<4)}, {16*12.625, 48}, 4}, - {{3|(10<<4)}, {16*11.25, 48}, 4}, - {{3|(9<<4)}, {16*10.25, 48}, 4}, - {{3|(8<<4)}, {16*9.25, 48}, 4}, - {{3|(7<<4)}, {16*8.25, 48}, 4}, - {{3|(6<<4)}, {16*7.25, 48}, 4}, - {{3|(5<<4)}, {16*6.25, 48}, 4}, - {{3|(4<<4)}, {16*5.25, 48}, 4}, - {{3|(3<<4)}, {16*4.25, 48}, 4}, - {{3|(2<<4)}, {16*3.25, 48}, 4}, - {{3|(1<<4)}, {16*1.25, 48}, 4}, - {{3|(0<<4)}, {16*0.625, 48}, 1}, - {{4|(13<<4)}, {16*13.625, 64}, 1}, - {{4|(11<<4)}, {16*12.375, 64}, 1}, - {{4|(10<<4)}, {16*11.125, 64}, 1}, - {{4|(5<<4)}, { 16*7, 64}, 4}, - {{4|(2<<4)}, { 16*2.875, 64}, 1}, - {{4|(1<<4)}, { 16*1.625, 64}, 1}, - {{4|(0<<4)}, { 16*0.375, 64}, 1}, -}; +led_config_t g_led_config = { { + { 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 }, + { 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15 }, + { 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 0, 29 }, + { 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, NO_LED, 42 }, + { 61, 60, 59, NO_LED, NO_LED, 58, NO_LED, NO_LED, NO_LED, NO_LED, 57, 56, NO_LED, 55 } +}, { + { 224, 0 }, { 208, 0 }, { 192, 0 }, { 176, 0 }, { 160, 0 }, { 144, 0 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 }, + { 0, 0 }, { 220, 16 }, { 200, 16 }, { 184, 16 }, { 168, 16 }, { 152, 16 }, { 136, 16 }, { 120, 16 }, { 104, 16 }, { 88, 16 }, { 72, 16 }, { 56, 16 }, { 40, 16 }, { 24, 16 }, + { 4, 16 }, { 204, 32 }, { 188, 32 }, { 172, 32 }, { 156, 32 }, { 140, 32 }, { 124, 32 }, { 108, 32 }, { 92, 32 }, { 76, 32 }, { 60, 32 }, { 44, 32 }, { 28, 32 }, { 6, 32 }, + { 224, 48 }, { 202, 48 }, { 180, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 20, 48 }, { 10, 48 }, { 218, 64 }, + { 198, 64 }, { 178, 64 }, { 112, 64 }, { 46, 64 }, { 26, 64 }, { 6, 64 } +}, { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + 1, 1, 4, 1, 1, 1 +} }; + #elif defined (dzrgb60_hhkb_iso) const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { {0, H_15, G_15, I_15}, @@ -324,70 +237,26 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { {0, K_16, J_16, L_16}, }; -rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { - {{2|(12<<4)}, {16*14, 0}, 1}, - {{0|(13<<4)}, {16*13, 0}, 1}, - {{0|(12<<4)}, {16*12, 0}, 1}, - {{0|(11<<4)}, {16*11, 0}, 1}, - {{0|(10<<4)}, {16*10, 0}, 1}, - {{0|(9<<4)}, {16*9, 0}, 1}, - {{0|(8<<4)}, {16*8, 0}, 1}, - {{0|(7<<4)}, {16*7, 0}, 1}, - {{0|(6<<4)}, {16*6, 0}, 1}, - {{0|(5<<4)}, {16*5, 0}, 1}, - {{0|(4<<4)}, {16*4, 0}, 1}, - {{0|(3<<4)}, {16*3, 0}, 1}, - {{0|(2<<4)}, {16*2, 0}, 1}, - {{0|(1<<4)}, {16*1, 0}, 1}, - {{0|(0<<4)}, {16*0, 0}, 1}, - {{2|(13<<4)}, {16*13.75, 24}, 1}, - {{1|(12<<4)}, {16*12.5, 16}, 4}, - {{1|(11<<4)}, {16*11.5, 16}, 4}, - {{1|(10<<4)}, {16*10.5, 16}, 4}, - {{1|(9<<4)}, { 16*9.5, 16}, 4}, - {{1|(8<<4)}, { 16*8.5, 16}, 4}, - {{1|(7<<4)}, { 16*7.5, 16}, 4}, - {{1|(6<<4)}, { 16*6.5, 16}, 4}, - {{1|(5<<4)}, { 16*5.5, 16}, 4}, - {{1|(4<<4)}, { 16*4.5, 16}, 4}, - {{1|(3<<4)}, { 16*3.5, 16}, 4}, - {{1|(2<<4)}, { 16*2.5, 16}, 4}, - {{1|(1<<4)}, { 16*1.5, 16}, 4}, - {{1|(0<<4)}, { 16*0.25, 16}, 1}, - {{1|(13<<4)}, {16*12.75, 32}, 1}, - {{2|(11<<4)}, {16*11.75, 32}, 4}, - {{2|(10<<4)}, {16*10.75, 32}, 4}, - {{2|(9<<4)}, {16*9.75, 32}, 4}, - {{2|(8<<4)}, {16*8.75, 32}, 4}, - {{2|(7<<4)}, {16*7.75, 32}, 4}, - {{2|(6<<4)}, { 16*6.75, 32}, 4}, - {{2|(5<<4)}, { 16*5.75, 32}, 4}, - {{2|(4<<4)}, { 16*4.75, 32}, 4}, - {{2|(3<<4)}, { 16*3.75, 32}, 4}, - {{2|(2<<4)}, { 16*2.75, 32}, 4}, - {{2|(1<<4)}, { 16*1.75, 32}, 4}, - {{2|(0<<4)}, { 16*0.375, 32}, 1}, - {{3|(13<<4)}, {16*14, 48}, 1}, - {{3|(11<<4)}, {16*12.625, 48}, 4}, - {{3|(10<<4)}, {16*11.25, 48}, 4}, - {{3|(9<<4)}, {16*10.25, 48}, 4}, - {{3|(8<<4)}, {16*9.25, 48}, 4}, - {{3|(7<<4)}, {16*8.25, 48}, 4}, - {{3|(6<<4)}, {16*7.25, 48}, 4}, - {{3|(5<<4)}, {16*6.25, 48}, 4}, - {{3|(4<<4)}, {16*5.25, 48}, 4}, - {{3|(3<<4)}, {16*4.25, 48}, 4}, - {{3|(2<<4)}, {16*3.25, 48}, 4}, - {{3|(1<<4)}, {16*1.25, 48}, 4}, - {{3|(0<<4)}, {16*0.625, 48}, 1}, - {{4|(13<<4)}, {16*13.625, 64}, 1}, - {{4|(11<<4)}, {16*12.375, 64}, 1}, - {{4|(10<<4)}, {16*11.125, 64}, 1}, - {{4|(5<<4)}, { 16*7, 64}, 4}, - {{4|(2<<4)}, { 16*2.875, 64}, 1}, - {{4|(1<<4)}, { 16*1.625, 64}, 1}, - {{4|(0<<4)}, { 16*0.375, 64}, 1}, -}; +led_config_t g_led_config = { { + { 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 }, + { 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 29 }, + { 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 0, 15 }, + { 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, NO_LED, 42 }, + { 61, 60, 59, NO_LED, NO_LED, 58, NO_LED, NO_LED, NO_LED, NO_LED, 57, 56, NO_LED, 55 } +}, { + { 224, 0 }, { 208, 0 }, { 192, 0 }, { 176, 0 }, { 160, 0 }, { 144, 0 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 }, + { 0, 0 }, { 220, 24 }, { 200, 16 }, { 184, 16 }, { 168, 16 }, { 152, 16 }, { 136, 16 }, { 120, 16 }, { 104, 16 }, { 88, 16 }, { 72, 16 }, { 56, 16 }, { 40, 16 }, { 24, 16 }, + { 4, 16 }, { 204, 32 }, { 188, 32 }, { 172, 32 }, { 156, 32 }, { 140, 32 }, { 124, 32 }, { 108, 32 }, { 92, 32 }, { 76, 32 }, { 60, 32 }, { 44, 32 }, { 28, 32 }, { 6, 32 }, + { 224, 48 }, { 202, 48 }, { 180, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 20, 48 }, { 10, 48 }, { 218, 64 }, + { 198, 64 }, { 178, 64 }, { 112, 64 }, { 46, 64 }, { 26, 64 }, { 6, 64 } +}, { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + 1, 1, 4, 1, 1, 1 +} }; + #elif defined (dzrgb60_ansi) const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { {0, K_14, J_14, L_14}, @@ -453,69 +322,26 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { {0, K_16, J_16, L_16}, }; -rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { - {{0|(13<<4)}, {16*13.5, 0}, 1}, - {{0|(12<<4)}, {16*12, 0}, 1}, - {{0|(11<<4)}, {16*11, 0}, 1}, - {{0|(10<<4)}, {16*10, 0}, 1}, - {{0|(9<<4)}, {16*9, 0}, 1}, - {{0|(8<<4)}, {16*8, 0}, 1}, - {{0|(7<<4)}, {16*7, 0}, 1}, - {{0|(6<<4)}, {16*6, 0}, 1}, - {{0|(5<<4)}, {16*5, 0}, 1}, - {{0|(4<<4)}, {16*4, 0}, 1}, - {{0|(3<<4)}, {16*3, 0}, 1}, - {{0|(2<<4)}, {16*2, 0}, 1}, - {{0|(1<<4)}, {16*1, 0}, 1}, - {{0|(0<<4)}, {16*0, 0}, 1}, - {{1|(13<<4)}, {16*13.75, 16}, 1}, - {{1|(12<<4)}, {16*12.5, 16}, 4}, - {{1|(11<<4)}, {16*11.5, 16}, 4}, - {{1|(10<<4)}, {16*10.5, 16}, 4}, - {{1|(9<<4)}, { 16*9.5, 16}, 4}, - {{1|(8<<4)}, { 16*8.5, 16}, 4}, - {{1|(7<<4)}, { 16*7.5, 16}, 4}, - {{1|(6<<4)}, { 16*6.5, 16}, 4}, - {{1|(5<<4)}, { 16*5.5, 16}, 4}, - {{1|(4<<4)}, { 16*4.5, 16}, 4}, - {{1|(3<<4)}, { 16*3.5, 16}, 4}, - {{1|(2<<4)}, { 16*2.5, 16}, 4}, - {{1|(1<<4)}, { 16*1.5, 16}, 4}, - {{1|(0<<4)}, { 16*0.25, 16}, 1}, - {{2|(13<<4)}, {16*13.375, 24}, 1}, - {{2|(11<<4)}, {16*11.75, 32}, 4}, - {{2|(10<<4)}, {16*10.75, 32}, 4}, - {{2|(9<<4)}, {16*9.75, 32}, 4}, - {{2|(8<<4)}, {16*8.75, 32}, 4}, - {{2|(7<<4)}, {16*7.75, 32}, 4}, - {{2|(6<<4)}, { 16*6.75, 32}, 4}, - {{2|(5<<4)}, { 16*5.75, 32}, 4}, - {{2|(4<<4)}, { 16*4.75, 32}, 4}, - {{2|(3<<4)}, { 16*3.75, 32}, 4}, - {{2|(2<<4)}, { 16*2.75, 32}, 4}, - {{2|(1<<4)}, { 16*1.75, 32}, 4}, - {{2|(0<<4)}, { 16*0.375, 32}, 1}, - {{3|(11<<4)}, {16*13.125, 48}, 1}, - {{3|(10<<4)}, {16*11.25, 48}, 4}, - {{3|(9<<4)}, {16*10.25, 48}, 4}, - {{3|(8<<4)}, {16*9.25, 48}, 4}, - {{3|(7<<4)}, {16*8.25, 48}, 4}, - {{3|(6<<4)}, {16*7.25, 48}, 4}, - {{3|(5<<4)}, {16*6.25, 48}, 4}, - {{3|(4<<4)}, {16*5.25, 48}, 4}, - {{3|(3<<4)}, {16*4.25, 48}, 4}, - {{3|(2<<4)}, {16*3.25, 48}, 4}, - {{3|(1<<4)}, {16*1.25, 48}, 4}, - {{3|(0<<4)}, {16*0.625, 48}, 1}, - {{4|(13<<4)}, {16*13.875, 64}, 1}, - {{4|(11<<4)}, {16*12.625, 64}, 1}, - {{4|(10<<4)}, {16*11.375, 64}, 1}, - {{4|(9<<4)}, {16*10.125, 64}, 1}, - {{4|(5<<4)}, { 16*6.375, 64}, 4}, - {{4|(2<<4)}, { 16*2.625, 64}, 1}, - {{4|(1<<4)}, { 16*1.375, 64}, 1}, - {{4|(0<<4)}, { 16*0.125, 64}, 1}, -}; +led_config_t g_led_config = { { + { 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }, + { 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 }, + { 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, NO_LED, 28 }, + { 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, NO_LED, NO_LED }, + { 60, 59, 58, NO_LED, NO_LED, 57, NO_LED, NO_LED, NO_LED, 56, 55, 54, NO_LED, 53 } +}, { + { 216, 0 }, { 192, 0 }, { 176, 0 }, { 160, 0 }, { 144, 0 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 }, { 0, 0 }, + { 220, 16 }, { 200, 16 }, { 184, 16 }, { 168, 16 }, { 152, 16 }, { 136, 16 }, { 120, 16 }, { 104, 16 }, { 88, 16 }, { 72, 16 }, { 56, 16 }, { 40, 16 }, { 24, 16 }, { 4, 16 }, + { 214, 24 }, { 188, 32 }, { 172, 32 }, { 156, 32 }, { 140, 32 }, { 124, 32 }, { 108, 32 }, { 92, 32 }, { 76, 32 }, { 60, 32 }, { 44, 32 }, { 28, 32 }, { 6, 32 }, { 210, 48 }, + { 180, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 20, 48 }, { 10, 48 }, { 222, 64 }, { 202, 64 }, { 182, 64 }, + { 162, 64 }, { 102, 64 }, { 42, 64 }, { 22, 64 }, { 2, 64 } +}, { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, + 1, 4, 1, 1, 1 +} }; + #else const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { {0, K_14, J_14, L_14}, @@ -583,71 +409,26 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { {0, K_16, J_16, L_16}, }; -rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { - {{0|(13<<4)}, {17.23*13, 0}, 1}, - {{0|(12<<4)}, {17.23*12, 0}, 1}, - {{0|(11<<4)}, {17.23*11, 0}, 1}, - {{0|(10<<4)}, {17.23*10, 0}, 1}, - {{0|(9<<4)}, {17.23*9, 0}, 1}, - {{0|(8<<4)}, {17.23*8, 0}, 1}, - {{0|(7<<4)}, {17.23*7, 0}, 1}, - {{0|(6<<4)}, { 17.23*6, 0}, 1}, - {{0|(5<<4)}, { 17.23*5, 0}, 1}, - {{0|(4<<4)}, { 17.23*4, 0}, 1}, - {{0|(3<<4)}, { 17.23*3, 0}, 1}, - {{0|(2<<4)}, { 17.23*2, 0}, 1}, - {{0|(1<<4)}, { 17.23*1, 0}, 1}, - {{0|(0<<4)}, { 17.23*0, 0}, 1}, - {{1|(13<<4)}, {17.23*13, 16}, 1}, - {{1|(12<<4)}, {17.23*12, 16}, 4}, - {{1|(11<<4)}, {17.23*11, 16}, 4}, - {{1|(10<<4)}, {17.23*10, 16}, 4}, - {{1|(9<<4)}, {17.23*9, 16}, 4}, - {{1|(8<<4)}, {17.23*8, 16}, 4}, - {{1|(7<<4)}, {17.23*7, 16}, 4}, - {{1|(6<<4)}, { 17.23*6, 16}, 4}, - {{1|(5<<4)}, { 17.23*5, 16}, 4}, - {{1|(4<<4)}, { 17.23*4, 16}, 4}, - {{1|(3<<4)}, { 17.23*3, 16}, 4}, - {{1|(2<<4)}, { 17.23*2, 16}, 4}, - {{1|(1<<4)}, { 17.23*1, 16}, 4}, - {{1|(0<<4)}, { 17.23*0, 16}, 1}, - {{2|(13<<4)}, {17.23*13, 32}, 1}, - {{2|(11<<4)}, {17.23*11, 32}, 4}, - {{2|(10<<4)}, {17.23*10, 32}, 4}, - {{2|(9<<4)}, {17.23*9, 32}, 4}, - {{2|(8<<4)}, {17.23*8, 32}, 4}, - {{2|(7<<4)}, {17.23*7, 32}, 4}, - {{2|(6<<4)}, { 17.23*6, 32}, 4}, - {{2|(5<<4)}, { 17.23*5, 32}, 4}, - {{2|(4<<4)}, { 17.23*4, 32}, 4}, - {{2|(3<<4)}, { 17.23*3, 32}, 4}, - {{2|(2<<4)}, { 17.23*2, 32}, 4}, - {{2|(1<<4)}, { 17.23*1, 32}, 4}, - {{2|(0<<4)}, { 17.23*0, 32}, 1}, - {{3|(13<<4)}, {17.23*13, 48}, 1}, - {{3|(11<<4)}, {17.23*11, 48}, 4}, - {{3|(10<<4)}, {17.23*10, 48}, 4}, - {{3|(9<<4)}, {17.23*9, 48}, 4}, - {{3|(8<<4)}, {17.23*8, 48}, 4}, - {{3|(7<<4)}, {17.23*7, 48}, 4}, - {{3|(6<<4)}, { 17.23*6, 48}, 4}, - {{3|(5<<4)}, { 17.23*5, 48}, 4}, - {{3|(4<<4)}, { 17.23*4, 48}, 4}, - {{3|(3<<4)}, { 17.23*3, 48}, 4}, - {{3|(2<<4)}, { 17.23*2, 48}, 4}, - {{3|(1<<4)}, { 17.23*1, 48}, 4}, - {{3|(0<<4)}, { 17.23*0, 48}, 1}, - {{4|(13<<4)}, {17.23*13, 64}, 1}, - {{4|(11<<4)}, {17.23*11, 64}, 1}, - {{4|(10<<4)}, {17.23*10, 64}, 1}, - {{4|(9<<4)}, {17.23*9, 64}, 1}, - {{4|(8<<4)}, {17.23*8, 64}, 1}, - {{4|(5<<4)}, { 17.23*5, 64}, 4}, - {{4|(2<<4)}, { 17.23*2, 64}, 1}, - {{4|(1<<4)}, { 17.23*1, 64}, 1}, - {{4|(0<<4)}, { 17.23*0, 64}, 1}, -}; +led_config_t g_led_config = { { + { 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }, + { 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 }, + { 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, NO_LED, 28 }, + { 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, NO_LED, 41 }, + { 62, 61, 60, NO_LED, NO_LED, 59, NO_LED, NO_LED, 58, 57, 56, 55, NO_LED, 54 } +}, { + { 223, 0 }, { 206, 0 }, { 189, 0 }, { 172, 0 }, { 155, 0 }, { 137, 0 }, { 120, 0 }, { 103, 0 }, { 86, 0 }, { 68, 0 }, { 51, 0 }, { 34, 0 }, { 17, 0 }, { 0, 0 }, + { 223, 16 }, { 206, 16 }, { 189, 16 }, { 172, 16 }, { 155, 16 }, { 137, 16 }, { 120, 16 }, { 103, 16 }, { 86, 16 }, { 68, 16 }, { 51, 16 }, { 34, 16 }, { 17, 16 }, { 0, 16 }, + { 223, 32 }, { 189, 32 }, { 172, 32 }, { 155, 32 }, { 137, 32 }, { 120, 32 }, { 103, 32 }, { 86, 32 }, { 68, 32 }, { 51, 32 }, { 34, 32 }, { 17, 32 }, { 0, 32 }, { 223, 48 }, + { 189, 48 }, { 172, 48 }, { 155, 48 }, { 137, 48 }, { 120, 48 }, { 103, 48 }, { 86, 48 }, { 68, 48 }, { 51, 48 }, { 34, 48 }, { 17, 48 }, { 0, 48 }, { 223, 64 }, { 189, 64 }, + { 172, 64 }, { 155, 64 }, { 137, 64 }, { 86, 64 }, { 34, 64 }, { 17, 64 }, { 0, 64 } +}, { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, + 1, 1, 1, 4, 1, 1, 1 +} }; + #endif void matrix_init_kb(void) { |