aboutsummaryrefslogtreecommitdiff
path: root/keyboards/idobao/id80/v3/v3.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/idobao/id80/v3/v3.c')
-rw-r--r--keyboards/idobao/id80/v3/v3.c62
1 files changed, 62 insertions, 0 deletions
diff --git a/keyboards/idobao/id80/v3/v3.c b/keyboards/idobao/id80/v3/v3.c
new file mode 100644
index 000000000..cd05a26a4
--- /dev/null
+++ b/keyboards/idobao/id80/v3/v3.c
@@ -0,0 +1,62 @@
1// Copyright 2022 peepeetee (@peepeetee)
2// Copyright 2022 Xelus22
3// SPDX-License-Identifier: GPL-2.0-or-later
4
5#include "v3.h"
6
7#ifdef ENCODER_ENABLE
8bool encoder_update_kb(uint8_t index, bool clockwise) {
9 if (!encoder_update_user(index, clockwise)) { return false; }
10 if (index == 0) {
11 if (clockwise) {
12 tap_code_delay(KC_VOLU, 10);
13 } else {
14 tap_code_delay(KC_VOLD, 10);
15 }
16 }
17 return true;
18}
19#endif
20
21#ifdef RGB_MATRIX_ENABLE
22led_config_t g_led_config = { {
23 // Key Matrix to LED Index
24 { 8, 9, 34, 35, 64, 65, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED },
25 { 7, NO_LED, 33, 36, 63, 66, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED },
26 { 6, 10, 32, 37, 62, 67, NO_LED, NO_LED, 49, 50, 79 },
27 { 0, 11, 31, 38, 61, 68, 21, NO_LED, 48, NO_LED, 77 },
28 { 1, 12, 30, 39, 60, 69, 20, 22, 47, 52, 76 },
29 { 2, 13, 29, 40, 59, 70, 19, 23, 46, 53, 75 },
30 { 5, 14, 28, 41, 58, 71, NO_LED, NO_LED, NO_LED, 51, 78 },
31 { 3, 15, 27, 42, 57, 72, 18, 24, 45, 54, 74 },
32 { 4, 16, 26, 43, 56, 73, 17, 25, 44, 55, NO_LED },
33}, {
34 // LED Index to Physical Position
35{224, 64}, {209, 64}, {195, 64}, {173, 61}, {151, 61}, {94 , 61}, {39 , 61}, {20 , 61}, {2 , 61}, {9 , 50}, {33 , 50},
36{48 , 50}, {62 , 50}, {77 , 50}, {92 , 50}, {106, 50}, {121, 50}, {136, 50}, {151, 50}, {165, 50}, {185, 50}, {209, 53},
37{196, 39}, {173, 39}, {158, 39}, {143, 39}, {129, 39}, {114, 39}, {99 , 39}, {84 , 39}, {70 , 39}, {55 , 39}, {40 , 39},
38{26 , 39}, {6 , 39}, {4 , 28}, {22 , 28}, {37 , 28}, {51 , 28}, {66 , 28}, {81 , 28}, {95 , 28}, {110, 28}, {125, 28},
39{140, 28}, {154, 28}, {169, 28}, {184, 28}, {202, 28}, {224, 28}, {224, 17}, {198, 17}, {176, 17}, {162, 17}, {147, 17},
40{132, 17}, {118, 17}, {103, 17}, {88 , 17}, {73 , 17}, {59 , 17}, {44 , 17}, {29 , 17}, {15 , 17}, {0 , 17}, {0 , 0},
41{18 , 0}, {33 , 0}, {48 , 0}, {62 , 0}, {81 , 0}, {95 , 0}, {110, 0}, {125, 0}, {143, 0}, {158, 0}, {173, 0},
42{187, 0}, {206, 0}, {224, 0},
43
44{ 207, 13},
45{ 207, 32},
46{ 207, 51},{ 174, 51},{ 141, 51},{ 108, 51},{ 73, 51},{ 40, 51},{ 13, 51 },
47{ 13, 32},
48{ 13, 13},{ 40, 13},{ 73, 13},{ 108, 13},{ 141, 13},{ 174, 13},
49
50}, {
51 // LED Index to Flag
521,1,1,1,1,4,1,1,1,
531,4,4,4,4,4,4,4,4,4,4,1,1,
541,4,4,4,4,4,4,4,4,4,4,4,1,
551,4,4,4,4,4,4,4,4,4,4,4,4,4,1,
561,1,4,4,4,4,4,4,4,4,4,4,4,4,4,
571,4,4,4,4,1,1,1,1,4,4,4,4,1,1,
582,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
59
60} };
61
62#endif