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/sol/rev1 | |
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/sol/rev1')
-rw-r--r-- | keyboards/sol/rev1/rev1.c | 115 |
1 files changed, 39 insertions, 76 deletions
diff --git a/keyboards/sol/rev1/rev1.c b/keyboards/sol/rev1/rev1.c index 23896860e5..68e64af79e 100644 --- a/keyboards/sol/rev1/rev1.c +++ b/keyboards/sol/rev1/rev1.c @@ -1,83 +1,46 @@ #include "quantum.h" #ifdef RGB_MATRIX_ENABLE - rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { +led_config_t g_led_config = { { + { 0, 1, 2, 3, 4, 5, 6 }, + { 7, 8, 9, 10, 11, 12, 13 }, + { 14, 15, 16, 17, 18, 19, 20 }, + { 21, 22, 23, 24, 25, 26, 27 }, + { 28, 29, 30, 31, 32, 33, 34 }, + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 33, 34 }, + { 35, 36, 37, 38, 39, 40, 41 }, + { 42, 43, 44, 45, 46, 47, 48 }, + { 49, 50, 51, 52, 53, 54, 55 }, + { 56, 57, 58, 59, 60, 61, 62 }, + { 63, 64, 65, 66, 67, 68, 68 }, + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 68, 68 } +}, { // Left Hand Mapped Left to Right - { { 0 | (0 << 4) }, { 0, 0 }, 1}, - { { 0 | (1 << 4) }, { 22, 0 }, 4}, - { { 0 | (2 << 4) }, { 37, 0 }, 4}, - { { 0 | (3 << 4) }, { 37, 0 }, 4}, - { { 0 | (4 << 4) }, { 67, 0 }, 4}, - { { 0 | (5 << 4) }, { 82, 0 }, 4}, - { { 0 | (6 << 4) }, { 104, 0 }, 1}, - { { 1 | (0 << 4) }, { 0, 16 }, 1}, - { { 1 | (1 << 4) }, { 22, 16 }, 4}, - { { 1 | (2 << 4) }, { 37, 16 }, 4}, - { { 1 | (3 << 4) }, { 37, 16 }, 4}, - { { 1 | (4 << 4) }, { 67, 16 }, 4}, - { { 1 | (5 << 4) }, { 82, 16 }, 4}, - { { 1 | (6 << 4) }, { 104, 16 }, 1}, - { { 2 | (0 << 4) }, { 0, 32 }, 1}, - { { 2 | (1 << 4) }, { 22, 32 }, 4}, - { { 2 | (2 << 4) }, { 37, 32 }, 4}, - { { 2 | (3 << 4) }, { 37, 32 }, 4}, - { { 2 | (4 << 4) }, { 67, 32 }, 4}, - { { 2 | (5 << 4) }, { 82, 32 }, 4}, - { { 2 | (6 << 4) }, { 104, 32 }, 1}, - { { 3 | (0 << 4) }, { 0, 48 }, 1}, - { { 3 | (1 << 4) }, { 22, 48 }, 4}, - { { 3 | (2 << 4) }, { 37, 48 }, 4}, - { { 3 | (3 << 4) }, { 37, 48 }, 4}, - { { 3 | (4 << 4) }, { 67, 48 }, 4}, - { { 3 | (5 << 4) }, { 82, 48 }, 4}, - { { 3 | (6 << 4) }, { 104, 48 }, 1}, - { { 4 | (0 << 4) }, { 0, 64 }, 1}, - { { 4 | (1 << 4) }, { 22, 64 }, 1}, - { { 4 | (2 << 4) }, { 37, 64 }, 1}, - { { 4 | (3 << 4) }, { 37, 64 }, 1}, - { { 4 | (4 << 4) }, { 67, 64 }, 1}, - // These two control the 4 LEDs in the thumb cluster - // Top keys are { 4 | (5 << 4) & { 4 | (6 << 4) - { { 5 | (5 << 4) }, { 89, 45 }, 1}, - { { 5 | (6 << 4) }, { 97, 55 }, 1}, + { 0, 0 }, { 22, 0 }, { 37, 0 }, { 37, 0 }, { 67, 0 }, { 82, 0 }, { 104, 0 }, + { 0, 16 }, { 22, 16 }, { 37, 16 }, { 37, 16 }, { 67, 16 }, { 82, 16 }, { 104, 16 }, + { 0, 32 }, { 22, 32 }, { 37, 32 }, { 37, 32 }, { 67, 32 }, { 82, 32 }, { 104, 32 }, + { 0, 48 }, { 22, 48 }, { 37, 48 }, { 37, 48 }, { 67, 48 }, { 82, 48 }, { 104, 48 }, + { 0, 64 }, { 22, 64 }, { 37, 64 }, { 37, 64 }, { 67, 64 }, { 89, 45 }, { 97, 55 }, // Left Hand Mapped Right to Left - { { 6 | (0 << 4) }, { 224, 0 }, 1}, - { { 6 | (1 << 4) }, { 202, 0 }, 4}, - { { 6 | (2 << 4) }, { 187, 0 }, 4}, - { { 6 | (3 << 4) }, { 172, 0 }, 4}, - { { 6 | (4 << 4) }, { 157, 0 }, 4}, - { { 6 | (5 << 4) }, { 142, 0 }, 4}, - { { 6 | (6 << 4) }, { 120, 0 }, 1}, - { { 7 | (0 << 4) }, { 224, 16 }, 1}, - { { 7 | (1 << 4) }, { 202, 16 }, 4}, - { { 7 | (2 << 4) }, { 187, 16 }, 4}, - { { 7 | (3 << 4) }, { 172, 16 }, 4}, - { { 7 | (4 << 4) }, { 157, 16 }, 4}, - { { 7 | (5 << 4) }, { 142, 16 }, 4}, - { { 7 | (6 << 4) }, { 120, 16 }, 1}, - { { 8 | (0 << 4) }, { 224, 32 }, 1}, - { { 8 | (1 << 4) }, { 202, 32 }, 4}, - { { 8 | (2 << 4) }, { 187, 32 }, 4}, - { { 8 | (3 << 4) }, { 172, 32 }, 4}, - { { 8 | (4 << 4) }, { 157, 32 }, 4}, - { { 8 | (5 << 4) }, { 142, 32 }, 4}, - { { 8 | (6 << 4) }, { 120, 32 }, 1}, - { { 9 | (0 << 4) }, { 224, 48 }, 1}, - { { 9 | (1 << 4) }, { 202, 48 }, 4}, - { { 9 | (2 << 4) }, { 187, 48 }, 4}, - { { 9 | (3 << 4) }, { 172, 48 }, 4}, - { { 9 | (4 << 4) }, { 157, 48 }, 4}, - { { 9 | (5 << 4) }, { 142, 48 }, 4}, - { { 9 | (6 << 4) }, { 120, 48 }, 1}, - { { 10 | (0 << 4) }, { 224, 64 }, 1}, - { { 10 | (1 << 4) }, { 202, 64 }, 1}, - { { 10 | (2 << 4) }, { 187, 64 }, 1}, - { { 10 | (3 << 4) }, { 172, 64 }, 1}, - { { 10 | (4 << 4) }, { 157, 64 }, 1}, - // These two control the 4 LEDs in the thumb cluster - // Top keys are { 10 | (5 << 4) & { 10 | (6 << 4) - { { 11 | (5 << 4) }, { 135, 45 }, 1}, - { { 11 | (6 << 4) }, { 127, 55 }, 1} - }; + { 224, 0 }, { 202, 0 }, { 187, 0 }, { 172, 0 }, { 157, 0 }, { 142, 0 }, { 120, 0 }, + { 224, 16 }, { 202, 16 }, { 187, 16 }, { 172, 16 }, { 157, 16 }, { 142, 16 }, { 120, 16 }, + { 224, 32 }, { 202, 32 }, { 187, 32 }, { 172, 32 }, { 157, 32 }, { 142, 32 }, { 120, 32 }, + { 224, 48 }, { 202, 48 }, { 187, 48 }, { 172, 48 }, { 157, 48 }, { 142, 48 }, { 120, 48 }, + { 224, 64 }, { 202, 64 }, { 187, 64 }, { 172, 64 }, { 157, 64 }, { 135, 45 }, { 127, 55 } +}, { + // Left Hand Mapped Left to Right + 1, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 1, + 1, 1, 1, 1, 1, 1, 1, + // Left Hand Mapped Right to Left + 1, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 1, + 1, 1, 1, 1, 1, 1, 1 +} }; + #endif |