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/ergodox_ez | |
parent | c7f8548d9af2045996294602d2a4bd9a214ae23c (diff) | |
download | qmk_firmware-af89752bffbaf5dcea30ea16be66b4d682701bc4.tar.gz |
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/ergodox_ez')
-rw-r--r-- | keyboards/ergodox_ez/ergodox_ez.c | 99 |
1 files changed, 35 insertions, 64 deletions
diff --git a/keyboards/ergodox_ez/ergodox_ez.c b/keyboards/ergodox_ez/ergodox_ez.c index 13ea84302..09443cf72 100644 --- a/keyboards/ergodox_ez/ergodox_ez.c +++ b/keyboards/ergodox_ez/ergodox_ez.c @@ -269,68 +269,39 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { }; -rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { - - /*{row | col << 4} - | {x=0..224, y=0..64} - | | flags - | | | */ - {{ 8|(0<<4)}, {17.2* 8, 12.8*0}, 4}, // LED 1 on right > Key 6 - {{ 9|(0<<4)}, {17.2* 9, 12.8*0}, 4}, // LED 2 > Key 7 - {{10|(0<<4)}, {17.2*10, 12.8*0}, 4}, // LED 3 > Key 8 - {{11|(0<<4)}, {17.2*11, 12.8*0}, 4}, // LED 4 > Key 9 - {{12|(0<<4)}, {17.2*12, 12.8*0}, 4}, // LED 5 > Key 0 - - {{ 8|(1<<4)}, {17.2* 8, 12.8*1}, 4}, // LED 6 - {{ 9|(1<<4)}, {17.2* 9, 12.8*1}, 4}, // LED 7 - {{10|(1<<4)}, {17.2*10, 12.8*1}, 4}, // LED 8 - {{11|(1<<4)}, {17.2*11, 12.8*1}, 4}, // LED 9 - {{12|(1<<4)}, {17.2*12, 12.8*1}, 4}, // LED 10 - - {{ 8|(2<<4)}, {17.2* 8, 12.8*2}, 4}, // LED 11 - {{ 9|(2<<4)}, {17.2* 9, 12.8*2}, 4}, // LED 12 - {{10|(2<<4)}, {17.2*10, 12.8*2}, 4}, // LED 13 - {{11|(2<<4)}, {17.2*11, 12.8*2}, 4}, // LED 14 - {{12|(2<<4)}, {17.2*12, 12.8*2}, 4}, // LED 15 - - {{ 8|(3<<4)}, {17.2* 8, 12.8*3}, 4}, // LED 16 - {{ 9|(3<<4)}, {17.2* 9, 12.8*3}, 4}, // LED 17 - {{10|(3<<4)}, {17.2*10, 12.8*3}, 4}, // LED 18 - {{11|(3<<4)}, {17.2*11, 12.8*3}, 4}, // LED 19 - {{12|(3<<4)}, {17.2*12, 12.8*3}, 4}, // LED 20 - - {{ 9|(4<<4)}, {17.2* 9, 12.8*4}, 1}, // LED 21 - {{10|(4<<4)}, {17.2*10, 12.8*4}, 1}, // LED 22 - {{11|(4<<4)}, {17.2*11, 12.8*4}, 1}, // LED 23 - {{12|(4<<4)}, {17.2*12, 12.8*4}, 1}, // LED 24 - - {{ 5|(0<<4)}, {17.2* 5, 12.8*0}, 4}, // LED 1 on left > Key 5 - {{ 4|(0<<4)}, {17.2* 4, 12.8*0}, 4}, // LED 2 > Key 4 - {{ 3|(0<<4)}, {17.2* 3, 12.8*0}, 4}, // LED 3 > Key 3 - {{ 2|(0<<4)}, {17.2* 2, 12.8*0}, 4}, // LED 4 > Key 2 - {{ 1|(0<<4)}, {17.2* 1, 12.8*0}, 4}, // LED 5 > Key 1 - - {{ 5|(1<<4)}, {17.2* 5, 12.8*1}, 4}, // LED 6 - {{ 4|(1<<4)}, {17.2* 4, 12.8*1}, 4}, // LED 7 - {{ 3|(1<<4)}, {17.2* 3, 12.8*1}, 4}, // LED 8 - {{ 2|(1<<4)}, {17.2* 2, 12.8*1}, 4}, // LED 9 - {{ 1|(1<<4)}, {17.2* 1, 12.8*1}, 4}, // LED 10 - - {{ 5|(2<<4)}, {17.2* 5, 12.8*2}, 4}, // LED 11 - {{ 4|(2<<4)}, {17.2* 4, 12.8*2}, 4}, // LED 12 - {{ 3|(2<<4)}, {17.2* 3, 12.8*2}, 4}, // LED 13 - {{ 2|(2<<4)}, {17.2* 2, 12.8*2}, 4}, // LED 14 - {{ 1|(2<<4)}, {17.2* 1, 12.8*2}, 4}, // LED 15 - - {{ 5|(3<<4)}, {17.2* 5, 12.8*3}, 4}, // LED 16 - {{ 4|(3<<4)}, {17.2* 4, 12.8*3}, 4}, // LED 17 - {{ 3|(3<<4)}, {17.2* 3, 12.8*3}, 4}, // LED 18 - {{ 2|(3<<4)}, {17.2* 2, 12.8*3}, 4}, // LED 19 - {{ 1|(3<<4)}, {17.2* 1, 12.8*3}, 4}, // LED 20 - - {{ 4|(4<<4)}, {17.2* 4, 12.8*4}, 1}, // LED 21 - {{ 3|(4<<4)}, {17.2* 3, 12.8*4}, 1}, // LED 22 - {{ 2|(4<<4)}, {17.2* 2, 12.8*4}, 1}, // LED 23 - {{ 1|(4<<4)}, {17.2* 1, 12.8*4}, 1}, // LED 24 > Key Hack -}; +led_config_t g_led_config = { { + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, + { 28, 33, 38, 43, 47, NO_LED }, + { 27, 32, 37, 42, 46, NO_LED }, + { 26, 31, 36, 41, 45, NO_LED }, + { 25, 30, 35, 40, 44, NO_LED }, + { 24, 29, 34, 39, NO_LED, NO_LED }, + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, + { 0, 5, 10, 15, NO_LED, NO_LED }, + { 1, 6, 11, 16, 20, NO_LED }, + { 2, 7, 12, 17, 21, NO_LED }, + { 3, 8, 13, 18, 22, NO_LED }, + { 4, 9, 14, 19, 23, NO_LED }, + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED } +}, { + { 137, 0 }, { 154, 0 }, { 172, 0 }, { 189, 0 }, { 206, 0 }, { 137, 12 }, + { 154, 12 }, { 172, 12 }, { 189, 12 }, { 206, 12 }, { 137, 25 }, { 154, 25 }, + { 172, 25 }, { 189, 25 }, { 206, 25 }, { 137, 38 }, { 154, 38 }, { 172, 38 }, + { 189, 38 }, { 206, 38 }, { 154, 51 }, { 172, 51 }, { 189, 51 }, { 206, 51 }, + { 86, 0 }, { 68, 0 }, { 51, 0 }, { 34, 0 }, { 17, 0 }, { 86, 12 }, + { 68, 12 }, { 51, 12 }, { 34, 12 }, { 17, 12 }, { 86, 25 }, { 68, 25 }, + { 51, 25 }, { 34, 25 }, { 17, 25 }, { 86, 38 }, { 68, 38 }, { 51, 38 }, + { 34, 38 }, { 17, 38 }, { 68, 51 }, { 51, 51 }, { 34, 51 }, { 17, 51 } +}, { + 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, + 4, 4, 1, 1, 1, 1, + 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, + 4, 4, 1, 1, 1, 1 +} }; + #endif |