From af89752bffbaf5dcea30ea16be66b4d682701bc4 Mon Sep 17 00:00:00 2001 From: XScorpion2 Date: Tue, 7 May 2019 18:22:46 -0500 Subject: 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 --- keyboards/dztech/dz65rgb/dz65rgb.c | 90 +++++++++----------------------------- 1 file changed, 20 insertions(+), 70 deletions(-) (limited to 'keyboards/dztech/dz65rgb/dz65rgb.c') diff --git a/keyboards/dztech/dz65rgb/dz65rgb.c b/keyboards/dztech/dz65rgb/dz65rgb.c index 78b345843..e14943d97 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) { -- cgit v1.2.3