diff options
Diffstat (limited to 'keyboards/dztech/dz40rgb/dz40rgb.c')
-rw-r--r-- | keyboards/dztech/dz40rgb/dz40rgb.c | 172 |
1 files changed, 39 insertions, 133 deletions
diff --git a/keyboards/dztech/dz40rgb/dz40rgb.c b/keyboards/dztech/dz40rgb/dz40rgb.c index b1a03760f8..92e4a7cad3 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] = { }; -const 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}, 0}, - {{1|(9<<4)}, {20.36*9, 21.33}, 0}, - {{1|(8<<4)}, {20.36*8, 21.33}, 0}, - {{1|(7<<4)}, {20.36*7, 21.33}, 0}, - {{1|(6<<4)}, { 20.36*6, 21.33}, 0}, - {{1|(5<<4)}, { 20.36*5, 21.33}, 0}, - {{1|(4<<4)}, { 20.36*4, 21.33}, 0}, - {{1|(3<<4)}, { 20.36*3, 21.33}, 0}, - {{1|(2<<4)}, { 20.36*2, 21.33}, 0}, - {{1|(1<<4)}, { 20.36*1, 21.33}, 0}, - {{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}, 0}, - {{2|(9<<4)}, {20.36*9, 21.33*2}, 0}, - {{2|(8<<4)}, {20.36*8, 21.33*2}, 0}, - {{2|(7<<4)}, {20.36*7, 21.33*2}, 0}, - {{2|(6<<4)}, { 20.36*6, 21.33*2}, 0}, - {{2|(5<<4)}, { 20.36*5, 21.33*2}, 0}, - {{2|(4<<4)}, { 20.36*4, 21.33*2}, 0}, - {{2|(3<<4)}, { 20.36*3, 21.33*2}, 0}, - {{2|(2<<4)}, { 20.36*2, 21.33*2}, 0}, - {{2|(1<<4)}, { 20.36*1, 21.33*2}, 0}, - {{2|(0<<4)}, { 20.36*0, 21.33*2}, 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|(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,93 +160,44 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { }; -const 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}, 0}, - {{1|(9<<4)}, {20.36*9, 21.33}, 0}, - {{1|(8<<4)}, {20.36*8, 21.33}, 0}, - {{1|(7<<4)}, {20.36*7, 21.33}, 0}, - {{1|(6<<4)}, { 20.36*6, 21.33}, 0}, - {{1|(5<<4)}, { 20.36*5, 21.33}, 0}, - {{1|(4<<4)}, { 20.36*4, 21.33}, 0}, - {{1|(3<<4)}, { 20.36*3, 21.33}, 0}, - {{1|(2<<4)}, { 20.36*2, 21.33}, 0}, - {{1|(1<<4)}, { 20.36*1, 21.33}, 0}, - {{1|(0<<4)}, { 20.36*0, 21.33}, 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 }, + { 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 +} }; - {{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}, 0}, - {{2|(9<<4)}, {20.36*9, 21.33*2}, 0}, - {{2|(8<<4)}, {20.36*8, 21.33*2}, 0}, - {{2|(7<<4)}, {20.36*7, 21.33*2}, 0}, - {{2|(6<<4)}, { 20.36*6, 21.33*2}, 0}, - {{2|(5<<4)}, { 20.36*5, 21.33*2}, 0}, - {{2|(4<<4)}, { 20.36*4, 21.33*2}, 0}, - {{2|(3<<4)}, { 20.36*3, 21.33*2}, 0}, - {{2|(2<<4)}, { 20.36*2, 21.33*2}, 0}, - {{2|(1<<4)}, { 20.36*1, 21.33*2}, 0}, - {{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 - void matrix_init_kb(void) { matrix_init_user(); } - - void matrix_scan_kb(void) { matrix_scan_user(); } - - bool process_record_kb(uint16_t keycode, keyrecord_t *record) { return process_record_user(keycode, record); } - - void suspend_power_down_kb(void) { rgb_matrix_set_suspend_state(true); + suspend_power_down_user(); } void suspend_wakeup_init_kb(void) { rgb_matrix_set_suspend_state(false); + suspend_wakeup_init_user(); } |