summaryrefslogtreecommitdiff
path: root/keyboards/massdrop/alt
diff options
context:
space:
mode:
authorXScorpion2 <rcalt2vt@gmail.com>2019-05-07 18:22:46 -0500
committerMechMerlin <30334081+mechmerlin@users.noreply.github.com>2019-05-07 16:22:46 -0700
commitaf89752bffbaf5dcea30ea16be66b4d682701bc4 (patch)
treec82f2bc25409159a44778379db8b3a35afc47b8a /keyboards/massdrop/alt
parentc7f8548d9af2045996294602d2a4bd9a214ae23c (diff)
downloadqmk_firmware-af89752bffbaf5dcea30ea16be66b4d682701bc4.tar.gz
qmk_firmware-af89752bffbaf5dcea30ea16be66b4d682701bc4.zip
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/massdrop/alt')
-rw-r--r--keyboards/massdrop/alt/config_led.c143
1 files changed, 27 insertions, 116 deletions
diff --git a/keyboards/massdrop/alt/config_led.c b/keyboards/massdrop/alt/config_led.c
index 1a9a539a07..42d4d1474b 100644
--- a/keyboards/massdrop/alt/config_led.c
+++ b/keyboards/massdrop/alt/config_led.c
@@ -20,123 +20,34 @@
//
// There is a quick-and-dirty implementation of this under ledvis.html
-rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
- /* 0 */ { { (0)|(0 << 4) }, { 8, 56 }, 4 }, // KC_ESC
- /* 1 */ { { (0)|(1 << 4) }, { 22, 56 }, 4 }, // KC_1
- /* 2 */ { { (0)|(2 << 4) }, { 35, 56 }, 4 }, // KC_2
- /* 3 */ { { (0)|(3 << 4) }, { 49, 56 }, 4 }, // KC_3
- /* 4 */ { { (0)|(4 << 4) }, { 63, 56 }, 4 }, // KC_4
- /* 5 */ { { (0)|(5 << 4) }, { 77, 56 }, 4 }, // KC_5
- /* 6 */ { { (0)|(6 << 4) }, { 91, 56 }, 4 }, // KC_6
- /* 7 */ { { (0)|(7 << 4) }, { 105, 56 }, 4 }, // KC_7
- /* 8 */ { { (0)|(8 << 4) }, { 118, 56 }, 4 }, // KC_8
- /* 9 */ { { (0)|(9 << 4) }, { 132, 56 }, 4 }, // KC_9
- /* 10 */ { { (0)|(10 << 4) }, { 146, 56 }, 4 }, // KC_0
- /* 11 */ { { (0)|(11 << 4) }, { 160, 56 }, 4 }, // KC_MINS
- /* 12 */ { { (0)|(12 << 4) }, { 174, 56 }, 4 }, // KC_EQL
- /* 13 */ { { (0)|(13 << 4) }, { 195, 56 }, 4 }, // KC_BSPC
- /* 14 */ { { (0)|(14 << 4) }, { 215, 56 }, 4 }, // KC_DEL
- /* 15 */ { { (1)|(0 << 4) }, { 11, 44 }, 4 }, // KC_TAB
- /* 16 */ { { (1)|(1 << 4) }, { 28, 44 }, 4 }, // KC_Q
- /* 17 */ { { (1)|(2 << 4) }, { 42, 44 }, 4 }, // KC_W
- /* 18 */ { { (1)|(3 << 4) }, { 56, 44 }, 4 }, // KC_E
- /* 19 */ { { (1)|(4 << 4) }, { 70, 44 }, 4 }, // KC_R
- /* 20 */ { { (1)|(5 << 4) }, { 84, 44 }, 4 }, // KC_T
- /* 21 */ { { (1)|(6 << 4) }, { 98, 44 }, 4 }, // KC_Y
- /* 22 */ { { (1)|(7 << 4) }, { 112, 44 }, 4 }, // KC_U
- /* 23 */ { { (1)|(8 << 4) }, { 125, 44 }, 4 }, // KC_I
- /* 24 */ { { (1)|(9 << 4) }, { 139, 44 }, 4 }, // KC_O
- /* 25 */ { { (1)|(10 << 4) }, { 153, 44 }, 4 }, // KC_P
- /* 26 */ { { (1)|(11 << 4) }, { 167, 44 }, 4 }, // KC_LBRC
- /* 27 */ { { (1)|(12 << 4) }, { 181, 44 }, 4 }, // KC_RBRC
- /* 28 */ { { (1)|(13 << 4) }, { 198, 44 }, 4 }, // KC_BSLS
- /* 29 */ { { (1)|(14 << 4) }, { 215, 44 }, 4 }, // KC_HOME
- /* 30 */ { { (2)|(0 << 4) }, { 13, 32 }, 1 }, // KC_CAPS
- /* 31 */ { { (2)|(1 << 4) }, { 32, 32 }, 4 }, // KC_A
- /* 32 */ { { (2)|(2 << 4) }, { 46, 32 }, 4 }, // KC_S
- /* 33 */ { { (2)|(3 << 4) }, { 60, 32 }, 4 }, // KC_D
- /* 34 */ { { (2)|(4 << 4) }, { 73, 32 }, 4 }, // KC_F
- /* 35 */ { { (2)|(5 << 4) }, { 87, 32 }, 4 }, // KC_G
- /* 36 */ { { (2)|(6 << 4) }, { 101, 32 }, 4 }, // KC_H
- /* 37 */ { { (2)|(7 << 4) }, { 115, 32 }, 4 }, // KC_J
- /* 38 */ { { (2)|(8 << 4) }, { 129, 32 }, 4 }, // KC_K
- /* 39 */ { { (2)|(9 << 4) }, { 143, 32 }, 4 }, // KC_L
- /* 40 */ { { (2)|(10 << 4) }, { 156, 32 }, 4 }, // KC_SCLN
- /* 41 */ { { (2)|(11 << 4) }, { 170, 32 }, 4 }, // KC_QUOT
- /* _________________________________________ */ // ____
- /* 42 */ { { (2)|(13 << 4) }, { 193, 32 }, 4 }, // KC_ENT
- /* 43 */ { { (2)|(14 << 4) }, { 215, 32 }, 4 }, // KC_PGUP
- /* 44 */ { { (3)|(0 << 4) }, { 16, 19 }, 4 }, // KC_LSFT
- /* 45 */ { { (3)|(2 << 4) }, { 39, 19 }, 4 }, // KC_Z
- /* 46 */ { { (3)|(3 << 4) }, { 53, 19 }, 4 }, // KC_X
- /* 47 */ { { (3)|(4 << 4) }, { 67, 19 }, 4 }, // KC_C
- /* 48 */ { { (3)|(5 << 4) }, { 80, 19 }, 4 }, // KC_V
- /* 49 */ { { (3)|(6 << 4) }, { 94, 19 }, 4 }, // KC_B
- /* 50 */ { { (3)|(7 << 4) }, { 108, 19 }, 4 }, // KC_N
- /* 51 */ { { (3)|(8 << 4) }, { 122, 19 }, 4 }, // KC_M
- /* 52 */ { { (3)|(9 << 4) }, { 136, 19 }, 4 }, // KC_COMM
- /* 53 */ { { (3)|(10 << 4) }, { 150, 19 }, 4 }, // KC_DOT
- /* 54 */ { { (3)|(11 << 4) }, { 163, 19 }, 4 }, // KC_SLSH
- /* 55 */ { { (3)|(12 << 4) }, { 182, 19 }, 4 }, // KC_RSFT
- /* _________________________________________ */ // ____
- /* 56 */ { { (3)|(13 << 4) }, { 201, 19 }, 4 }, // KC_UP
- /* 57 */ { { (3)|(14 << 4) }, { 215, 19 }, 4 }, // KC_PGDN
- /* 58 */ { { (4)|(0 << 4) }, { 9, 7 }, 4 }, // KC_LCTL
- /* 59 */ { { (4)|(1 << 4) }, { 27, 7 }, 4 }, // KC_LGUI
- /* 60 */ { { (4)|(2 << 4) }, { 44, 7 }, 4 }, // KC_LALT
- /* _________________________________________ */ // ____
- /* _________________________________________ */ // ____
- /* _________________________________________ */ // ____
- /* 61 */ { { (4)|(6 << 4) }, { 96, 7 }, 4 }, // KC_SPC
- /* _________________________________________ */ // ____
- /* _________________________________________ */ // ____
- /* _________________________________________ */ // ____
- /* 62 */ { { (4)|(10 << 4) }, { 148, 7 }, 4 }, // KC_RALT
- /* 63 */ { { (4)|(11 << 4) }, { 165, 7 }, 4 }, // MO(1)
- /* 64 */ { { (4)|(12 << 4) }, { 188, 7 }, 4 }, // KC_LEFT
- /* 65 */ { { (4)|(13 << 4) }, { 201, 7 }, 4 }, // KC_DOWN
- /* 66 */ { { (4)|(14 << 4) }, { 215, 7 }, 4 }, // KC_RGHT
-
+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, 35, 36, 37, 38, 39, 40, 41, NO_LED, 42, 43 },
+ { 44, NO_LED, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57 },
+ { 58, 59, 60, NO_LED, NO_LED, NO_LED, 61, NO_LED, NO_LED, NO_LED, 62, 63, 64, 65, 66 }
+}, {
+ { 8, 56 }, { 22, 56 }, { 35, 56 }, { 49, 56 }, { 63, 56 }, { 77, 56 }, { 91, 56 }, { 105, 56 }, { 118, 56 }, { 132, 56 }, { 146, 56 }, { 160, 56 }, { 174, 56 }, { 195, 56 }, { 215, 56 },
+ { 11, 44 }, { 28, 44 }, { 42, 44 }, { 56, 44 }, { 70, 44 }, { 84, 44 }, { 98, 44 }, { 112, 44 }, { 125, 44 }, { 139, 44 }, { 153, 44 }, { 167, 44 }, { 181, 44 }, { 198, 44 }, { 215, 44 },
+ { 13, 32 }, { 32, 32 }, { 46, 32 }, { 60, 32 }, { 73, 32 }, { 87, 32 }, { 101, 32 }, { 115, 32 }, { 129, 32 }, { 143, 32 }, { 156, 32 }, { 170, 32 }, { 193, 32 }, { 215, 32 }, { 16, 19 },
+ { 39, 19 }, { 53, 19 }, { 67, 19 }, { 80, 19 }, { 94, 19 }, { 108, 19 }, { 122, 19 }, { 136, 19 }, { 150, 19 }, { 163, 19 }, { 182, 19 }, { 201, 19 }, { 215, 19 }, { 9, 7 }, { 27, 7 },
+ { 44, 7 }, { 96, 7 }, { 148, 7 }, { 165, 7 }, { 188, 7 }, { 201, 7 }, { 215, 7 },
+ // Underglow LEDs
+ { 1, 1 }, { 15, 0 }, { 31, 0 }, { 47, 0 }, { 63, 0 }, { 79, 0 }, { 95, 0 }, { 112, 0 }, { 128, 0 }, { 144, 0 }, { 160, 0 }, { 176, 0 }, { 192, 0 }, { 208, 0 }, { 222, 1 },
+ { 224, 13 }, { 224, 25 }, { 224, 38 }, { 224, 50 }, { 222, 62 }, { 191, 64 }, { 179, 64 }, { 167, 64 }, { 153, 64 }, { 139, 64 }, { 125, 64 }, { 112, 64 }, { 98, 64 }, { 84, 64 }, { 70, 64 },
+ { 56, 64 }, { 42, 64 }, { 28, 64 }, { 1, 62 }, { 0, 50 }, { 0, 38 }, { 0, 25 }, { 0, 13 }
+}, {
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4,
// Underglow LEDs
- { { 255 }, { 1, 1 }, 2 },
- { { 255 }, { 15, 0 }, 2 },
- { { 255 }, { 31, 0 }, 2 },
- { { 255 }, { 47, 0 }, 2 },
- { { 255 }, { 63, 0 }, 2 },
- { { 255 }, { 79, 0 }, 2 },
- { { 255 }, { 95, 0 }, 2 },
- { { 255 }, { 112, 0 }, 2 },
- { { 255 }, { 128, 0 }, 2 },
- { { 255 }, { 144, 0 }, 2 },
- { { 255 }, { 160, 0 }, 2 },
- { { 255 }, { 176, 0 }, 2 },
- { { 255 }, { 192, 0 }, 2 },
- { { 255 }, { 208, 0 }, 2 },
- { { 255 }, { 222, 1 }, 2 },
- { { 255 }, { 224, 13 }, 2 },
- { { 255 }, { 224, 25 }, 2 },
- { { 255 }, { 224, 38 }, 2 },
- { { 255 }, { 224, 50 }, 2 },
- { { 255 }, { 222, 62 }, 2 },
- { { 255 }, { 191, 64 }, 2 },
- { { 255 }, { 179, 64 }, 2 },
- { { 255 }, { 167, 64 }, 2 },
- { { 255 }, { 153, 64 }, 2 },
- { { 255 }, { 139, 64 }, 2 },
- { { 255 }, { 125, 64 }, 2 },
- { { 255 }, { 112, 64 }, 2 },
- { { 255 }, { 98, 64 }, 2 },
- { { 255 }, { 84, 64 }, 2 },
- { { 255 }, { 70, 64 }, 2 },
- { { 255 }, { 56, 64 }, 2 },
- { { 255 }, { 42, 64 }, 2 },
- { { 255 }, { 28, 64 }, 2 },
- { { 255 }, { 1, 62 }, 2 },
- { { 255 }, { 0, 50 }, 2 },
- { { 255 }, { 0, 38 }, 2 },
- { { 255 }, { 0, 25 }, 2 },
- { { 255 }, { 0, 13 }, 2 },
-};
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2
+} };
+
#ifdef USB_LED_INDICATOR_ENABLE
void rgb_matrix_indicators_kb(void)