summaryrefslogtreecommitdiff
path: root/keyboards/dztech
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/dztech
parentc7f8548d9af2045996294602d2a4bd9a214ae23c (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')
-rw-r--r--keyboards/dztech/dz40rgb/dz40rgb.c163
-rw-r--r--keyboards/dztech/dz40rgb/keymaps/default/keymap.c6
-rw-r--r--keyboards/dztech/dz40rgb/keymaps/split_space/keymap.c6
-rw-r--r--keyboards/dztech/dz60rgb/dz60rgb.c419
-rw-r--r--keyboards/dztech/dz60rgb/keymaps/ansi/keymap.c5
-rw-r--r--keyboards/dztech/dz60rgb/keymaps/hhkb/keymap.c5
-rw-r--r--keyboards/dztech/dz60rgb/keymaps/hhkb_iso/keymap.c5
-rw-r--r--keyboards/dztech/dz60rgb/keymaps/iso/keymap.c5
-rw-r--r--keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c30
-rw-r--r--keyboards/dztech/dz65rgb/dz65rgb.c90
10 files changed, 183 insertions, 551 deletions
diff --git a/keyboards/dztech/dz40rgb/dz40rgb.c b/keyboards/dztech/dz40rgb/dz40rgb.c
index 34bfc4366f..e5e39c92ab 100644
--- a/keyboards/dztech/dz40rgb/dz40rgb.c
+++ b/keyboards/dztech/dz40rgb/dz40rgb.c
@@ -52,7 +52,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, E_3, D_3, F_3},
{0, E_2, D_2, F_2},
{0, E_1, D_1, F_1},
-
+
{0, E_13, D_13, F_13},
{0, E_14, D_14, F_14},
@@ -71,70 +71,25 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
};
-rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
-
- {{0|(11<<4)}, {20.36*11, 0}, 1},
- {{0|(10<<4)}, {20.36*10, 0}, 1},
- {{0|(9<<4)}, {20.36*9, 0}, 1},
- {{0|(8<<4)}, {20.36*8, 0}, 1},
- {{0|(7<<4)}, {20.36*7, 0}, 1},
- {{0|(6<<4)}, { 20.36*6, 0}, 1},
- {{0|(5<<4)}, { 20.36*5, 0}, 1},
- {{0|(4<<4)}, { 20.36*4, 0}, 1},
- {{0|(3<<4)}, { 20.36*3, 0}, 1},
- {{0|(2<<4)}, { 20.36*2, 0}, 1},
- {{0|(1<<4)}, { 20.36*1, 0}, 1},
- {{0|(0<<4)}, { 20.36*0, 0}, 1},
-
- {{0|(12<<4)}, {20.36*11, 21.33*0.5}, 1},
- {{0|(13<<4)}, {20.36*0,21.33*0.5}, 1},
-
- {{1|(11<<4)}, {20.36*11, 21.33}, 1},
- {{1|(10<<4)}, {20.36*10, 21.33}, 4},
- {{1|(9<<4)}, {20.36*9, 21.33}, 4},
- {{1|(8<<4)}, {20.36*8, 21.33}, 4},
- {{1|(7<<4)}, {20.36*7, 21.33}, 4},
- {{1|(6<<4)}, { 20.36*6, 21.33}, 4},
- {{1|(5<<4)}, { 20.36*5, 21.33}, 4},
- {{1|(4<<4)}, { 20.36*4, 21.33}, 4},
- {{1|(3<<4)}, { 20.36*3, 21.33}, 4},
- {{1|(2<<4)}, { 20.36*2, 21.33}, 4},
- {{1|(1<<4)}, { 20.36*1, 21.33}, 4},
- {{1|(0<<4)}, { 20.36*0, 21.33}, 1},
-
- {{1|(12<<4)}, {20.36*11, 21.33*1.5}, 1},
- {{1|(13<<4)}, {20.36*0,21.33*1.5}, 1},
+led_config_t g_led_config = { {
+ { 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 },
+ { 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 },
+ { 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28 },
+ { 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42 }
+}, {
+ { 223, 0 }, { 203, 0 }, { 183, 0 }, { 162, 0 }, { 142, 0 }, { 122, 0 }, { 101, 0 }, { 81, 0 }, { 61, 0 }, { 40, 0 }, { 20, 0 }, { 0, 0 },
+ { 223, 10 }, { 0, 10 }, { 223, 21 }, { 203, 21 }, { 183, 21 }, { 162, 21 }, { 142, 21 }, { 122, 21 }, { 101, 21 }, { 81, 21 }, { 61, 21 }, { 40, 21 },
+ { 20, 21 }, { 0, 21 }, { 223, 31 }, { 0, 31 }, { 223, 42 }, { 203, 42 }, { 183, 42 }, { 162, 42 }, { 142, 42 }, { 122, 42 }, { 101, 42 }, { 81, 42 },
+ { 61, 42 }, { 40, 42 }, { 20, 42 }, { 0, 42 }, { 223, 53 }, { 0, 53 }, { 223, 63 }, { 203, 63 }, { 183, 63 }, { 162, 63 }, { 142, 63 }, { 122, 63 },
+ { 101, 63 }, { 81, 63 }, { 61, 63 }, { 40, 63 }, { 20, 63 }, { 0, 63 }
+}, {
+ 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, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1
+} };
- {{2|(11<<4)}, {20.36*11, 21.33*2}, 1},
- {{2|(10<<4)}, {20.36*10, 21.33*2}, 4},
- {{2|(9<<4)}, {20.36*9, 21.33*2}, 4},
- {{2|(8<<4)}, {20.36*8, 21.33*2}, 4},
- {{2|(7<<4)}, {20.36*7, 21.33*2}, 4},
- {{2|(6<<4)}, { 20.36*6, 21.33*2}, 4},
- {{2|(5<<4)}, { 20.36*5, 21.33*2}, 4},
- {{2|(4<<4)}, { 20.36*4, 21.33*2}, 4},
- {{2|(3<<4)}, { 20.36*3, 21.33*2}, 4},
- {{2|(2<<4)}, { 20.36*2, 21.33*2}, 4},
- {{2|(1<<4)}, { 20.36*1, 21.33*2}, 4},
- {{2|(0<<4)}, { 20.36*0, 21.33*2}, 1},
-
- {{2|(12<<4)}, {20.36*11, 21.33*2.5}, 1},
- {{2|(13<<4)}, {20.36*0,21.33*2.5}, 1},
-
- {{3|(11<<4)}, {20.36*11, 21.33*3}, 1},
- {{3|(10<<4)}, {20.36*10, 21.33*3}, 1},
- {{3|(9<<4)}, {20.36*9, 21.33*3}, 1},
- {{3|(8<<4)}, {20.36*8, 21.33*3}, 1},
- {{3|(7<<4)}, {20.36*7, 21.33*3}, 1},
- {{3|(6<<4)}, { 20.36*6, 21.33*3}, 1},
- {{3|(5<<4)}, { 20.36*5, 21.33*3}, 1},
- {{3|(4<<4)}, { 20.36*4, 21.33*3}, 1},
- {{3|(3<<4)}, { 20.36*3, 21.33*3}, 1},
- {{3|(2<<4)}, { 20.36*2, 21.33*3}, 1},
- {{3|(1<<4)}, { 20.36*1, 21.33*3}, 1},
- {{3|(0<<4)}, { 20.36*0, 21.33*3}, 1}
-
-};
#else
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
/* Refer to IS31 manual for these locations
@@ -205,69 +160,25 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
};
-rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
+led_config_t g_led_config = { {
+ { 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 },
+ { 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 },
+ { 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28 },
+ { 52, 51, 50, 49, 48, NO_LED, 47, 46, 45, 44, 43, 42 }
+}, {
+ { 223, 0 }, { 203, 0 }, { 183, 0 }, { 162, 0 }, { 142, 0 }, { 122, 0 }, { 101, 0 }, { 81, 0 }, { 61, 0 }, { 40, 0 }, { 20, 0 }, { 0, 0 },
+ { 223, 10 }, { 0, 10 }, { 223, 21 }, { 203, 21 }, { 183, 21 }, { 162, 21 }, { 142, 21 }, { 122, 21 }, { 101, 21 }, { 81, 21 }, { 61, 21 }, { 40, 21 },
+ { 20, 21 }, { 0, 21 }, { 223, 31 }, { 0, 31 }, { 223, 42 }, { 203, 42 }, { 183, 42 }, { 162, 42 }, { 142, 42 }, { 122, 42 }, { 101, 42 }, { 81, 42 },
+ { 61, 42 }, { 40, 42 }, { 20, 42 }, { 0, 42 }, { 223, 53 }, { 0, 53 }, { 223, 63 }, { 203, 63 }, { 183, 63 }, { 162, 63 }, { 142, 63 }, { 111, 63 },
+ { 81, 63 }, { 61, 63 }, { 40, 63 }, { 20, 63 }, { 0, 63 }
+}, {
+ 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, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1
+} };
- {{0|(11<<4)}, {20.36*11, 0}, 1},
- {{0|(10<<4)}, {20.36*10, 0}, 1},
- {{0|(9<<4)}, {20.36*9, 0}, 1},
- {{0|(8<<4)}, {20.36*8, 0}, 1},
- {{0|(7<<4)}, {20.36*7, 0}, 1},
- {{0|(6<<4)}, { 20.36*6, 0}, 1},
- {{0|(5<<4)}, { 20.36*5, 0}, 1},
- {{0|(4<<4)}, { 20.36*4, 0}, 1},
- {{0|(3<<4)}, { 20.36*3, 0}, 1},
- {{0|(2<<4)}, { 20.36*2, 0}, 1},
- {{0|(1<<4)}, { 20.36*1, 0}, 1},
- {{0|(0<<4)}, { 20.36*0, 0}, 1},
-
- {{0|(12<<4)}, {20.36*11, 21.33*0.5}, 1},
- {{0|(13<<4)}, {20.36*0,21.33*0.5}, 1},
-
- {{1|(11<<4)}, {20.36*11, 21.33}, 1},
- {{1|(10<<4)}, {20.36*10, 21.33}, 4},
- {{1|(9<<4)}, {20.36*9, 21.33}, 4},
- {{1|(8<<4)}, {20.36*8, 21.33}, 4},
- {{1|(7<<4)}, {20.36*7, 21.33}, 4},
- {{1|(6<<4)}, { 20.36*6, 21.33}, 4},
- {{1|(5<<4)}, { 20.36*5, 21.33}, 4},
- {{1|(4<<4)}, { 20.36*4, 21.33}, 4},
- {{1|(3<<4)}, { 20.36*3, 21.33}, 4},
- {{1|(2<<4)}, { 20.36*2, 21.33}, 4},
- {{1|(1<<4)}, { 20.36*1, 21.33}, 4},
- {{1|(0<<4)}, { 20.36*0, 21.33}, 1},
-
- {{1|(12<<4)}, {20.36*11, 21.33*1.5}, 1},
- {{1|(13<<4)}, {20.36*0,21.33*1.5}, 1},
-
- {{2|(11<<4)}, {20.36*11, 21.33*2}, 1},
- {{2|(10<<4)}, {20.36*10, 21.33*2}, 4},
- {{2|(9<<4)}, {20.36*9, 21.33*2}, 4},
- {{2|(8<<4)}, {20.36*8, 21.33*2}, 4},
- {{2|(7<<4)}, {20.36*7, 21.33*2}, 4},
- {{2|(6<<4)}, { 20.36*6, 21.33*2}, 4},
- {{2|(5<<4)}, { 20.36*5, 21.33*2}, 4},
- {{2|(4<<4)}, { 20.36*4, 21.33*2}, 4},
- {{2|(3<<4)}, { 20.36*3, 21.33*2}, 4},
- {{2|(2<<4)}, { 20.36*2, 21.33*2}, 4},
- {{2|(1<<4)}, { 20.36*1, 21.33*2}, 4},
- {{2|(0<<4)}, { 20.36*0, 21.33*2}, 1},
-
- {{2|(12<<4)}, {20.36*11, 21.33*2.5}, 1},
- {{2|(13<<4)}, {20.36*0,21.33*2.5}, 1},
-
- {{3|(11<<4)}, {20.36*11, 21.33*3}, 1},
- {{3|(10<<4)}, {20.36*10, 21.33*3}, 1},
- {{3|(9<<4)}, {20.36*9, 21.33*3}, 1},
- {{3|(8<<4)}, {20.36*8, 21.33*3}, 1},
- {{3|(7<<4)}, {20.36*7, 21.33*3}, 1},
- {{3|(6<<4)}, { 20.36*5.5, 21.33*3}, 1},
- {{3|(4<<4)}, { 20.36*4, 21.33*3}, 1},
- {{3|(3<<4)}, { 20.36*3, 21.33*3}, 1},
- {{3|(2<<4)}, { 20.36*2, 21.33*3}, 1},
- {{3|(1<<4)}, { 20.36*1, 21.33*3}, 1},
- {{3|(0<<4)}, { 20.36*0, 21.33*3}, 1}
-
-};
#endif
diff --git a/keyboards/dztech/dz40rgb/keymaps/default/keymap.c b/keyboards/dztech/dz40rgb/keymaps/default/keymap.c
index 59b917121c..650c178a7e 100644
--- a/keyboards/dztech/dz40rgb/keymaps/default/keymap.c
+++ b/keyboards/dztech/dz40rgb/keymaps/default/keymap.c
@@ -31,11 +31,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
+
+extern led_config_t g_led_config;
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
- rgb_led led;
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
- led = g_rgb_leds[i];
- if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
+ if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
rgb_matrix_set_color( i, red, green, blue );
}
}
diff --git a/keyboards/dztech/dz40rgb/keymaps/split_space/keymap.c b/keyboards/dztech/dz40rgb/keymaps/split_space/keymap.c
index 5613e35000..80741b19c4 100644
--- a/keyboards/dztech/dz40rgb/keymaps/split_space/keymap.c
+++ b/keyboards/dztech/dz40rgb/keymaps/split_space/keymap.c
@@ -53,12 +53,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
+extern led_config_t g_led_config;
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
- rgb_led led;
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
- led = g_rgb_leds[i];
- if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
+ if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
rgb_matrix_set_color( i, red, green, blue );
}
}
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) {
diff --git a/keyboards/dztech/dz60rgb/keymaps/ansi/keymap.c b/keyboards/dztech/dz60rgb/keymaps/ansi/keymap.c
index 741fc55fb9..584f035ef4 100644
--- a/keyboards/dztech/dz60rgb/keymaps/ansi/keymap.c
+++ b/keyboards/dztech/dz60rgb/keymaps/ansi/keymap.c
@@ -38,11 +38,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, TO(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
};
+extern led_config_t g_led_config;
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
- rgb_led led;
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
- led = g_rgb_leds[i];
- if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
+ if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
rgb_matrix_set_color( i, red, green, blue );
}
}
diff --git a/keyboards/dztech/dz60rgb/keymaps/hhkb/keymap.c b/keyboards/dztech/dz60rgb/keymaps/hhkb/keymap.c
index 1f3807c3b7..5a7a56801a 100644
--- a/keyboards/dztech/dz60rgb/keymaps/hhkb/keymap.c
+++ b/keyboards/dztech/dz60rgb/keymaps/hhkb/keymap.c
@@ -39,11 +39,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
+extern led_config_t g_led_config;
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
- rgb_led led;
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
- led = g_rgb_leds[i];
- if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
+ if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
rgb_matrix_set_color( i, red, green, blue );
}
}
diff --git a/keyboards/dztech/dz60rgb/keymaps/hhkb_iso/keymap.c b/keyboards/dztech/dz60rgb/keymaps/hhkb_iso/keymap.c
index 4575eb19d5..34c1752ffa 100644
--- a/keyboards/dztech/dz60rgb/keymaps/hhkb_iso/keymap.c
+++ b/keyboards/dztech/dz60rgb/keymaps/hhkb_iso/keymap.c
@@ -39,11 +39,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, TO(0), KC_TRNS, KC_TRNS, KC_TRNS),
};
+extern led_config_t g_led_config;
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
- rgb_led led;
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
- led = g_rgb_leds[i];
- if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
+ if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
rgb_matrix_set_color( i, red, green, blue );
}
}
diff --git a/keyboards/dztech/dz60rgb/keymaps/iso/keymap.c b/keyboards/dztech/dz60rgb/keymaps/iso/keymap.c
index 5e38848035..3a90d2f335 100644
--- a/keyboards/dztech/dz60rgb/keymaps/iso/keymap.c
+++ b/keyboards/dztech/dz60rgb/keymaps/iso/keymap.c
@@ -38,11 +38,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, TO(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
};
+extern led_config_t g_led_config;
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
- rgb_led led;
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
- led = g_rgb_leds[i];
- if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
+ if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
rgb_matrix_set_color( i, red, green, blue );
}
}
diff --git a/keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c b/keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c
index 3dfa783744..a6d1e226bd 100644
--- a/keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c
+++ b/keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c
@@ -50,40 +50,36 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-void rgb_matrix_layer_helper(uint8_t red, uint8_t green, uint8_t blue, bool default_layer)
-{
- rgb_led led;
-
- for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
- led = g_rgb_leds[i];
-
- if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
- rgb_matrix_set_color( i, red, green, blue );
- }
- }
+extern led_config_t g_led_config;
+void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
+ for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
+ if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
+ rgb_matrix_set_color( i, red, green, blue );
+ }
+ }
}
void rgb_matrix_indicators_user(void)
{
uint8_t this_led = host_keyboard_leds();
-
+
if (!g_suspend_state) {
switch (biton32(layer_state)) {
case _LAYER1:
rgb_matrix_layer_helper(0xFF, 0x00, 0x00, false); break;
-
+
case _LAYER2:
rgb_matrix_layer_helper(0x00, 0xFF, 0x00, false); break;
-
+
case _LAYER4:
rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, false); break;
}
}
-
+
if (this_led & (1 << USB_LED_CAPS_LOCK)) {
rgb_matrix_set_color(40, 0xFF, 0xFF, 0xFF);
}
-
+
switch (biton32(layer_state)) {
case _LAYER3:
if (this_led & (1 << USB_LED_NUM_LOCK)) {
@@ -91,7 +87,7 @@ void rgb_matrix_indicators_user(void)
} else {
rgb_matrix_set_color(13, 0x00, 0x00, 0x00);
}
-
+
rgb_matrix_set_color(0, 0x00, 0xFF, 0x00);
rgb_matrix_set_color(1, 0x00, 0x00, 0x00);
rgb_matrix_set_color(1, 0x00, 0xFF, 0x00);
diff --git a/keyboards/dztech/dz65rgb/dz65rgb.c b/keyboards/dztech/dz65rgb/dz65rgb.c
index 78b345843c..e14943d974 100644
--- a/keyboards/dztech/dz65rgb/dz65rgb.c
+++ b/keyboards/dztech/dz65rgb/dz65rgb.c
@@ -73,76 +73,26 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{1, C9_16, C7_15, C6_15}, // LD16
{1, C8_16, C7_16, C6_16}, // LD17
};
-rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
- {{1|(7<<4)}, {16*7, 16}, 4},
- {{1|(6<<4)}, {16*6, 16}, 4},
- {{1|(5<<4)}, {16*5, 16}, 4},
- {{1|(4<<4)}, {16*4, 16}, 4},
- {{1|(3<<4)}, {16*3, 16}, 4},
- {{1|(2<<4)}, {16*2, 16}, 4},
- {{1|(1<<4)}, {16*1, 16}, 4},
- {{1|(0<<4)}, {16*0, 16}, 1},
- {{2|(0<<4)}, {16*0, 32}, 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},
- {{0|(9<<4)}, {16*9, 0}, 1},
- {{0|(10<<4)}, {16*10, 0}, 1},
- {{0|(11<<4)}, {16*11, 0}, 1},
- {{0|(12<<4)}, {16*12, 0}, 1},
- {{0|(13<<4)}, {16*13, 0}, 1},
- {{0|(14<<4)}, {16*14, 0}, 1},
- {{1|(14<<4)}, {16*14, 16}, 1},
- {{2|(14<<4)}, {16*14, 32}, 1},
- {{1|(8<<4)}, {16*8, 16}, 4},
- {{1|(9<<4)}, {16*9, 16}, 4},
- {{1|(10<<4)}, {16*10, 16}, 4},
- {{1|(11<<4)}, {16*11, 16}, 4},
- {{1|(12<<4)}, {16*12, 16}, 4},
- {{1|(13<<4)}, {16*13, 16}, 4},
- {{3|(14<<4)}, {16*14, 48}, 1},
- {{4|(14<<4)}, {16*14, 64}, 1},
- {{4|(13<<4)}, {16*13, 64}, 1},
- {{4|(5<<4)}, {16*5, 64}, 1},
- {{3|(5<<4)}, {16*5, 48}, 4},
- {{3|(4<<4)}, {16*4, 48}, 4},
- {{3|(3<<4)}, {16*3, 48}, 4},
- {{3|(2<<4)}, {16*2, 48}, 4},
- {{3|(1<<4)}, {16*1, 48}, 4},
- {{4|(2<<4)}, {16*2, 64}, 1},
- {{4|(1<<4)}, {16*1, 64}, 1},
- {{2|(6<<4)}, {16*6, 32}, 4},
- {{2|(5<<4)}, {16*5, 32}, 4},
- {{2|(4<<4)}, {16*4, 32}, 4},
- {{2|(3<<4)}, {16*3, 32}, 4},
- {{2|(2<<4)}, {16*2, 32}, 4},
- {{2|(1<<4)}, {16*1, 32}, 4},
- {{3|(0<<4)}, {16*0, 48}, 1},
- {{4|(0<<4)}, {16*0, 64}, 1},
- {{2|(7<<4)}, {16*7, 32}, 4},
- {{2|(8<<4)}, {16*8, 32}, 4},
- {{2|(9<<4)}, {16*9, 32}, 4},
- {{2|(10<<4)}, {16*10, 32}, 4},
- {{2|(11<<4)}, {16*11, 32}, 4},
- {{2|(13<<4)}, {16*13, 32}, 4},
- {{3|(10<<4)}, {16*10, 48}, 4},
- {{3|(11<<4)}, {16*11, 48}, 4},
- {{3|(13<<4)}, {16*13, 48}, 4},
- {{3|(6<<4)}, {16*6, 48}, 4},
- {{3|(7<<4)}, {16*7, 48}, 4},
- {{3|(8<<4)}, {16*8, 48}, 4},
- {{3|(9<<4)}, {16*9, 48}, 4},
- {{4|(8<<4)}, {16*8, 64}, 1},
- {{4|(9<<4)}, {16*9, 64}, 1},
- {{4|(10<<4)}, {16*10, 64}, 1},
- {{4|(11<<4)}, {16*11, 64}, 1},
-};
+
+led_config_t g_led_config = { {
+ { 17, 16, 15, 14, 13, 12, 11, 10, 9, 18, 19, 20, 21, 22, 23 },
+ { 7, 6, 5, 4, 3, 2, 1, 0, 26, 27, 28, 29, 30, 31, 24 },
+ { 8, 48, 47, 46, 45, 44, 43, 51, 52, 53, 54, 55, NO_LED, 56, 25 },
+ { 49, 40, 39, 38, 37, 36, 60, 61, 62, 63, 57, 58, NO_LED, 59, 32 },
+ { 50, 42, 41, NO_LED, NO_LED, 35, NO_LED, NO_LED, 64, 65, 66, 67, NO_LED, 34, 33 }
+}, {
+ { 112, 16 }, { 96, 16 }, { 80, 16 }, { 64, 16 }, { 48, 16 }, { 32, 16 }, { 16, 16 }, { 0, 16 }, { 0, 32 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 },
+ { 32, 0 }, { 16, 0 }, { 0, 0 }, { 144, 0 }, { 160, 0 }, { 176, 0 }, { 192, 0 }, { 208, 0 }, { 224, 0 }, { 224, 16 }, { 224, 32 }, { 128, 16 }, { 144, 16 }, { 160, 16 }, { 176, 16 },
+ { 192, 16 }, { 208, 16 }, { 224, 48 }, { 224, 64 }, { 208, 64 }, { 80, 64 }, { 80, 48 }, { 64, 48 }, { 48, 48 }, { 32, 48 }, { 16, 48 }, { 32, 64 }, { 16, 64 }, { 96, 32 }, { 80, 32 },
+ { 64, 32 }, { 48, 32 }, { 32, 32 }, { 16, 32 }, { 0, 48 }, { 0, 64 }, { 112, 32 }, { 128, 32 }, { 144, 32 }, { 160, 32 }, { 176, 32 }, { 208, 32 }, { 160, 48 }, { 176, 48 }, { 208, 48 },
+ { 96, 48 }, { 112, 48 }, { 128, 48 }, { 144, 48 }, { 128, 64 }, { 144, 64 }, { 160, 64 }, { 176, 64 }
+}, {
+ 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4,
+ 4, 4, 1, 1, 1, 1, 4, 4, 4, 4, 4, 1, 1, 4, 4,
+ 4, 4, 4, 4, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 1, 1, 1, 1
+} };
void suspend_power_down_kb(void)
{