diff options
author | Drashna Jael're <drashna@live.com> | 2021-11-16 11:33:17 -0800 |
---|---|---|
committer | Drashna Jael're <drashna@live.com> | 2021-11-16 11:33:17 -0800 |
commit | adb6feb9f069cfcda1d5da9038da76bd07226086 (patch) | |
tree | e93d98543405a6de3d7bcaa262dd5004ac6fbdaf /keyboards/xelus | |
parent | 557e5ddf99e95eee63f764f6dab05f94fa657c22 (diff) | |
parent | f3897f55b5cc254b30aef73cd08a8d9ba42e6fc0 (diff) | |
download | qmk_firmware-adb6feb9f069cfcda1d5da9038da76bd07226086.tar.gz qmk_firmware-adb6feb9f069cfcda1d5da9038da76bd07226086.zip |
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'keyboards/xelus')
18 files changed, 932 insertions, 352 deletions
diff --git a/keyboards/xelus/pachi/readme.md b/keyboards/xelus/pachi/readme.md index 4f4046567..d6a0aec88 100644 --- a/keyboards/xelus/pachi/readme.md +++ b/keyboards/xelus/pachi/readme.md | |||
@@ -9,6 +9,7 @@ Make example for this keyboard (after setting up your build environment): | |||
9 | 9 | ||
10 | make xelus/pachi/rev1:default | 10 | make xelus/pachi/rev1:default |
11 | make xelus/pachi/mini_32u4:default | 11 | make xelus/pachi/mini_32u4:default |
12 | make xelus/pachi/rgb:default | 12 | make xelus/pachi/rgb/rev1:default |
13 | make xelus/pachi/rgb/rev2:default | ||
13 | 14 | ||
14 | See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). | 15 | See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). |
diff --git a/keyboards/xelus/pachi/rgb/config.h b/keyboards/xelus/pachi/rgb/config.h index ee937119b..956d35d69 100644 --- a/keyboards/xelus/pachi/rgb/config.h +++ b/keyboards/xelus/pachi/rgb/config.h | |||
@@ -14,110 +14,4 @@ | |||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #pragma once | 17 | #include "config_common.h" |
18 | |||
19 | /* USB Device descriptor parameter */ | ||
20 | #define VENDOR_ID 0x5845 // "XE" | ||
21 | #define PRODUCT_ID 0x5052 // "PR" | ||
22 | #define DEVICE_VER 0x0001 | ||
23 | #define MANUFACTURER Xelus | ||
24 | #define PRODUCT Xelus Pachi RGB | ||
25 | |||
26 | /* key matrix size */ | ||
27 | #define MATRIX_ROWS 6 | ||
28 | #define MATRIX_COLS 17 | ||
29 | |||
30 | /* key matrix pins */ | ||
31 | #define MATRIX_ROW_PINS { B14, B13, B12, B2, A8, B15 } | ||
32 | #define MATRIX_COL_PINS { C13, C14, C15, H0, A0, A1, A2, A3, A4, A5, A6, A7, B0, B1, H1, B10, B11 } | ||
33 | #define UNUSED_PINS | ||
34 | |||
35 | /* COL2ROW or ROW2COL */ | ||
36 | #define DIODE_DIRECTION COL2ROW | ||
37 | |||
38 | /* Set 0 if debouncing isn't needed */ | ||
39 | #define DEBOUNCE 5 | ||
40 | |||
41 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
42 | #define LOCKING_SUPPORT_ENABLE | ||
43 | |||
44 | /* Locking resynchronize hack */ | ||
45 | #define LOCKING_RESYNC_ENABLE | ||
46 | |||
47 | // I2C setup | ||
48 | #define I2C1_SCL_PIN B8 | ||
49 | #define I2C1_SDA_PIN B9 | ||
50 | #define I2C1_SCL_PAL_MODE 4 | ||
51 | #define I2C1_SDA_PAL_MODE 4 | ||
52 | #define I2C1_TIMINGR_PRESC 0U | ||
53 | #define I2C1_TIMINGR_SCLDEL 11U | ||
54 | #define I2C1_TIMINGR_SDADEL 0U | ||
55 | #define I2C1_TIMINGR_SCLH 14U | ||
56 | #define I2C1_TIMINGR_SCLL 42U | ||
57 | |||
58 | // I2C EEPROM | ||
59 | #define EEPROM_I2C_24LC64 | ||
60 | |||
61 | // RGB Matrix defines | ||
62 | #define DRIVER_ADDR_1 0b0110000 | ||
63 | //#define DRIVER_ADDR_2 0b0110001 | ||
64 | |||
65 | #define DRIVER_COUNT 1 | ||
66 | #define DRIVER_LED_TOTAL 117 | ||
67 | #define ISSI_DRIVER_TOTAL DRIVER_LED_TOTAL | ||
68 | |||
69 | #define RGB_MATRIX_STARTUP_VAL 80 | ||
70 | #define RGB_MATRIX_FRAMEBUFFER_EFFECTS | ||
71 | #define RGB_MATRIX_KEYPRESSES | ||
72 | #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended | ||
73 | #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL | ||
74 | // RGB Matrix Animation modes. Explicitly enabled | ||
75 | // For full list of effects, see: | ||
76 | // https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects | ||
77 | #define ENABLE_RGB_MATRIX_ALPHAS_MODS | ||
78 | #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN | ||
79 | #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT | ||
80 | #define ENABLE_RGB_MATRIX_BREATHING | ||
81 | #define ENABLE_RGB_MATRIX_BAND_SAT | ||
82 | #define ENABLE_RGB_MATRIX_BAND_VAL | ||
83 | #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT | ||
84 | #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL | ||
85 | #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT | ||
86 | #define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL | ||
87 | #define ENABLE_RGB_MATRIX_CYCLE_ALL | ||
88 | #define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT | ||
89 | #define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN | ||
90 | #define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON | ||
91 | #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN | ||
92 | #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL | ||
93 | #define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL | ||
94 | #define ENABLE_RGB_MATRIX_CYCLE_SPIRAL | ||
95 | #define ENABLE_RGB_MATRIX_DUAL_BEACON | ||
96 | #define ENABLE_RGB_MATRIX_RAINBOW_BEACON | ||
97 | #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS | ||
98 | #define ENABLE_RGB_MATRIX_RAINDROPS | ||
99 | #define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS | ||
100 | #define ENABLE_RGB_MATRIX_HUE_BREATHING | ||
101 | #define ENABLE_RGB_MATRIX_HUE_PENDULUM | ||
102 | #define ENABLE_RGB_MATRIX_HUE_WAVE | ||
103 | #define ENABLE_RGB_MATRIX_PIXEL_RAIN | ||
104 | #define ENABLE_RGB_MATRIX_PIXEL_FLOW | ||
105 | #define ENABLE_RGB_MATRIX_PIXEL_FRACTAL | ||
106 | // enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined | ||
107 | #define ENABLE_RGB_MATRIX_TYPING_HEATMAP | ||
108 | #define ENABLE_RGB_MATRIX_DIGITAL_RAIN | ||
109 | // enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined | ||
110 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE | ||
111 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE | ||
112 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE | ||
113 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE | ||
114 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS | ||
115 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS | ||
116 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS | ||
117 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS | ||
118 | #define ENABLE_RGB_MATRIX_SPLASH | ||
119 | #define ENABLE_RGB_MATRIX_MULTISPLASH | ||
120 | #define ENABLE_RGB_MATRIX_SOLID_SPLASH | ||
121 | #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH | ||
122 | |||
123 | #define FORCE_NKRO | ||
diff --git a/keyboards/xelus/pachi/rgb/rev1/config.h b/keyboards/xelus/pachi/rgb/rev1/config.h new file mode 100644 index 000000000..276a128e0 --- /dev/null +++ b/keyboards/xelus/pachi/rgb/rev1/config.h | |||
@@ -0,0 +1,120 @@ | |||
1 | /* Copyright 2021 Harrison Chan (Xelus) | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | #pragma once | ||
18 | |||
19 | /* USB Device descriptor parameter */ | ||
20 | #define VENDOR_ID 0x5845 // "XE" | ||
21 | #define PRODUCT_ID 0x5052 // "PR" | ||
22 | #define DEVICE_VER 0x0001 | ||
23 | #define MANUFACTURER Xelus | ||
24 | #define PRODUCT Xelus Pachi RGB | ||
25 | |||
26 | /* key matrix size */ | ||
27 | #define MATRIX_ROWS 6 | ||
28 | #define MATRIX_COLS 17 | ||
29 | |||
30 | /* key matrix pins */ | ||
31 | #define MATRIX_ROW_PINS { B14, B13, B12, B2, A8, B15 } | ||
32 | #define MATRIX_COL_PINS { C13, C14, C15, H0, A0, A1, A2, A3, A4, A5, A6, A7, B0, B1, H1, B10, B11 } | ||
33 | #define UNUSED_PINS | ||
34 | |||
35 | /* COL2ROW or ROW2COL */ | ||
36 | #define DIODE_DIRECTION COL2ROW | ||
37 | |||
38 | /* Set 0 if debouncing isn't needed */ | ||
39 | #define DEBOUNCE 5 | ||
40 | |||
41 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
42 | #define LOCKING_SUPPORT_ENABLE | ||
43 | |||
44 | /* Locking resynchronize hack */ | ||
45 | #define LOCKING_RESYNC_ENABLE | ||
46 | |||
47 | // I2C setup | ||
48 | #define I2C1_SCL 8 | ||
49 | #define I2C1_SDA 9 | ||
50 | #define I2C1_SCL_PAL_MODE 4 | ||
51 | #define I2C1_SDA_PAL_MODE 4 | ||
52 | #define I2C1_TIMINGR_PRESC 0U | ||
53 | #define I2C1_TIMINGR_SCLDEL 11U | ||
54 | #define I2C1_TIMINGR_SDADEL 0U | ||
55 | #define I2C1_TIMINGR_SCLH 14U | ||
56 | #define I2C1_TIMINGR_SCLL 42U | ||
57 | |||
58 | // I2C EEPROM | ||
59 | #define EEPROM_I2C_24LC64 | ||
60 | |||
61 | // RGB Matrix defines | ||
62 | #define DRIVER_ADDR_1 0b0110000 | ||
63 | |||
64 | #define DRIVER_COUNT 1 | ||
65 | #define DRIVER_1_LED_TOTAL 117 | ||
66 | #define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL | ||
67 | #define ISSI_DRIVER_TOTAL DRIVER_LED_TOTAL | ||
68 | |||
69 | #define RGB_MATRIX_STARTUP_VAL 80 | ||
70 | #define RGB_MATRIX_FRAMEBUFFER_EFFECTS | ||
71 | #define RGB_MATRIX_KEYPRESSES | ||
72 | #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended | ||
73 | #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL | ||
74 | |||
75 | #define ENABLE_RGB_MATRIX_ALPHAS_MODS | ||
76 | #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN | ||
77 | #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT | ||
78 | #define ENABLE_RGB_MATRIX_BREATHING | ||
79 | #define ENABLE_RGB_MATRIX_BAND_SAT | ||
80 | #define ENABLE_RGB_MATRIX_BAND_VAL | ||
81 | #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT | ||
82 | #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL | ||
83 | #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT | ||
84 | #define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL | ||
85 | #define ENABLE_RGB_MATRIX_CYCLE_ALL | ||
86 | #define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT | ||
87 | #define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN | ||
88 | #define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON | ||
89 | #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN | ||
90 | #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL | ||
91 | #define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL | ||
92 | #define ENABLE_RGB_MATRIX_CYCLE_SPIRAL | ||
93 | #define ENABLE_RGB_MATRIX_DUAL_BEACON | ||
94 | #define ENABLE_RGB_MATRIX_RAINBOW_BEACON | ||
95 | #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS | ||
96 | #define ENABLE_RGB_MATRIX_RAINDROPS | ||
97 | #define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS | ||
98 | #define ENABLE_RGB_MATRIX_HUE_BREATHING | ||
99 | #define ENABLE_RGB_MATRIX_HUE_PENDULUM | ||
100 | #define ENABLE_RGB_MATRIX_HUE_WAVE | ||
101 | #define ENABLE_RGB_MATRIX_FRACTAL | ||
102 | #define ENABLE_RGB_MATRIX_PIXEL_RAIN | ||
103 | |||
104 | #define ENABLE_RGB_MATRIX_TYPING_HEATMAP | ||
105 | #define ENABLE_RGB_MATRIX_DIGITAL_RAIN | ||
106 | |||
107 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE | ||
108 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE | ||
109 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE | ||
110 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE | ||
111 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS | ||
112 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS | ||
113 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS | ||
114 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS | ||
115 | #define ENABLE_RGB_MATRIX_SPLASH | ||
116 | #define ENABLE_RGB_MATRIX_MULTISPLASH | ||
117 | #define ENABLE_RGB_MATRIX_SOLID_SPLASH | ||
118 | #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH | ||
119 | |||
120 | #define FORCE_NKRO | ||
diff --git a/keyboards/xelus/pachi/rgb/halconf.h b/keyboards/xelus/pachi/rgb/rev1/halconf.h index 633d94a88..633d94a88 100644 --- a/keyboards/xelus/pachi/rgb/halconf.h +++ b/keyboards/xelus/pachi/rgb/rev1/halconf.h | |||
diff --git a/keyboards/xelus/pachi/rgb/mcuconf.h b/keyboards/xelus/pachi/rgb/rev1/mcuconf.h index 20db196d2..20db196d2 100644 --- a/keyboards/xelus/pachi/rgb/mcuconf.h +++ b/keyboards/xelus/pachi/rgb/rev1/mcuconf.h | |||
diff --git a/keyboards/xelus/pachi/rgb/rev1/readme.md b/keyboards/xelus/pachi/rgb/rev1/readme.md new file mode 100644 index 000000000..2fa775255 --- /dev/null +++ b/keyboards/xelus/pachi/rgb/rev1/readme.md | |||
@@ -0,0 +1,17 @@ | |||
1 | # Pachi RGB Rev 1 | ||
2 | |||
3 | Pachi RGB Rev 1 TKL Keyboard that is a per-key RGB, hotswap, ANSI and tsangan. | ||
4 | |||
5 | * Keyboard Maintainer: [Xelus22](https://github.com/Xelus22) | ||
6 | * Hardware Supported: Group buys | ||
7 | |||
8 | Make example for this keyboard (after setting up your build environment): | ||
9 | |||
10 | make xelus/pachi/rgb/rev1:default | ||
11 | |||
12 | Reset your keyboard in 3 ways: | ||
13 | * Software reset on Fn + Backspace | ||
14 | * Bootmagic reset: hold down the top left key (usually escape) and plugin the keyboard | ||
15 | * Physical reset button: on the back of the PCB, there should be a small golden button you can press | ||
16 | |||
17 | See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). | ||
diff --git a/keyboards/xelus/pachi/rgb/rev1/rev1.c b/keyboards/xelus/pachi/rgb/rev1/rev1.c new file mode 100644 index 000000000..74f46e681 --- /dev/null +++ b/keyboards/xelus/pachi/rgb/rev1/rev1.c | |||
@@ -0,0 +1,239 @@ | |||
1 | /* Copyright 2021 Harrison Chan (Xelus) | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | #include "rev1.h" | ||
18 | |||
19 | // tested and working | ||
20 | void matrix_io_delay(void) { __asm__ volatile("nop\nnop\nnop\n"); } | ||
21 | |||
22 | #ifdef RGB_MATRIX_ENABLE | ||
23 | #include "i2c_master.h" | ||
24 | #include "drivers/led/issi/is31fl3741.h" | ||
25 | const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { | ||
26 | /* Refer to IS31 manual for these locations | ||
27 | * driver | ||
28 | * | R location | ||
29 | * | | G location | ||
30 | * | | | B location | ||
31 | * | | | | */ | ||
32 | {0, CS39_SW1, CS38_SW1, CS37_SW1}, //A1 | ||
33 | {0, CS36_SW1, CS35_SW1, CS34_SW1}, //A2 | ||
34 | {0, CS33_SW1, CS32_SW1, CS31_SW1}, //A3 | ||
35 | {0, CS30_SW1, CS29_SW1, CS28_SW1}, //A4 | ||
36 | {0, CS27_SW1, CS26_SW1, CS25_SW1}, //A5 | ||
37 | {0, CS24_SW1, CS23_SW1, CS22_SW1}, //A6 | ||
38 | {0, CS21_SW1, CS20_SW1, CS19_SW1}, //A7 | ||
39 | {0, CS18_SW1, CS17_SW1, CS16_SW1}, //A8 | ||
40 | {0, CS15_SW1, CS14_SW1, CS13_SW1}, //A9 | ||
41 | {0, CS12_SW1, CS11_SW1, CS10_SW1}, //A10 | ||
42 | {0, CS9_SW1 , CS8_SW1 , CS7_SW1 }, //A11 | ||
43 | {0, CS6_SW1 , CS5_SW1 , CS4_SW1 }, //A12 | ||
44 | {0, CS3_SW1 , CS2_SW1 , CS1_SW1 }, //A13 | ||
45 | |||
46 | {0, CS39_SW2, CS38_SW2, CS37_SW2}, //B1 | ||
47 | {0, CS36_SW2, CS35_SW2, CS34_SW2}, //B2 | ||
48 | {0, CS33_SW2, CS32_SW2, CS31_SW2}, //B3 | ||
49 | {0, CS30_SW2, CS29_SW2, CS28_SW2}, //B4 | ||
50 | {0, CS27_SW2, CS26_SW2, CS25_SW2}, //B5 | ||
51 | {0, CS24_SW2, CS23_SW2, CS22_SW2}, //B6 | ||
52 | {0, CS21_SW2, CS20_SW2, CS19_SW2}, //B7 | ||
53 | {0, CS18_SW2, CS17_SW2, CS16_SW2}, //B8 | ||
54 | {0, CS15_SW2, CS14_SW2, CS13_SW2}, //B9 | ||
55 | {0, CS12_SW2, CS11_SW2, CS10_SW2}, //B10 | ||
56 | {0, CS9_SW2 , CS8_SW2 , CS7_SW2 }, //B11 | ||
57 | {0, CS6_SW2 , CS5_SW2 , CS4_SW2 }, //B12 | ||
58 | {0, CS3_SW2 , CS2_SW2 , CS1_SW2 }, //B13 | ||
59 | |||
60 | {0, CS39_SW3, CS38_SW3, CS37_SW3}, //C1 | ||
61 | {0, CS36_SW3, CS35_SW3, CS34_SW3}, //C2 | ||
62 | {0, CS33_SW3, CS32_SW3, CS31_SW3}, //C3 | ||
63 | {0, CS30_SW3, CS29_SW3, CS28_SW3}, //C4 | ||
64 | {0, CS27_SW3, CS26_SW3, CS25_SW3}, //C5 | ||
65 | {0, CS24_SW3, CS23_SW3, CS22_SW3}, //C6 | ||
66 | {0, CS21_SW3, CS20_SW3, CS19_SW3}, //C7 | ||
67 | {0, CS18_SW3, CS17_SW3, CS16_SW3}, //C8 | ||
68 | {0, CS15_SW3, CS14_SW3, CS13_SW3}, //C9 | ||
69 | {0, CS12_SW3, CS11_SW3, CS10_SW3}, //C10 | ||
70 | {0, CS9_SW3 , CS8_SW3 , CS7_SW3 }, //C11 | ||
71 | {0, CS6_SW3 , CS5_SW3 , CS4_SW3 }, //C12 | ||
72 | {0, CS3_SW3 , CS2_SW3 , CS1_SW3 }, //C13 | ||
73 | |||
74 | {0, CS39_SW4, CS38_SW4, CS37_SW4}, //D1 | ||
75 | {0, CS36_SW4, CS35_SW4, CS34_SW4}, //D2 | ||
76 | {0, CS33_SW4, CS32_SW4, CS31_SW4}, //D3 | ||
77 | {0, CS30_SW4, CS29_SW4, CS28_SW4}, //D4 | ||
78 | {0, CS27_SW4, CS26_SW4, CS25_SW4}, //D5 | ||
79 | {0, CS24_SW4, CS23_SW4, CS22_SW4}, //D6 | ||
80 | {0, CS21_SW4, CS20_SW4, CS19_SW4}, //D7 | ||
81 | {0, CS18_SW4, CS17_SW4, CS16_SW4}, //D8 | ||
82 | {0, CS15_SW4, CS14_SW4, CS13_SW4}, //D9 | ||
83 | {0, CS12_SW4, CS11_SW4, CS10_SW4}, //D10 | ||
84 | {0, CS9_SW4 , CS8_SW4 , CS7_SW4 }, //D11 | ||
85 | {0, CS6_SW4 , CS5_SW4 , CS4_SW4 }, //D12 | ||
86 | {0, CS3_SW4 , CS2_SW4 , CS1_SW4 }, //D13 | ||
87 | |||
88 | {0, CS39_SW5, CS38_SW5, CS37_SW5}, //E1 | ||
89 | {0, CS36_SW5, CS35_SW5, CS34_SW5}, //E2 | ||
90 | {0, CS33_SW5, CS32_SW5, CS31_SW5}, //E3 | ||
91 | {0, CS30_SW5, CS29_SW5, CS28_SW5}, //E4 | ||
92 | {0, CS27_SW5, CS26_SW5, CS25_SW5}, //E5 | ||
93 | {0, CS24_SW5, CS23_SW5, CS22_SW5}, //E6 | ||
94 | {0, CS21_SW5, CS20_SW5, CS19_SW5}, //E7 | ||
95 | {0, CS18_SW5, CS17_SW5, CS16_SW5}, //E8 | ||
96 | {0, CS15_SW5, CS14_SW5, CS13_SW5}, //E9 | ||
97 | {0, CS12_SW5, CS11_SW5, CS10_SW5}, //E10 | ||
98 | {0, CS9_SW5 , CS8_SW5 , CS7_SW5 }, //E11 | ||
99 | {0, CS6_SW5 , CS5_SW5 , CS4_SW5 }, //E12 | ||
100 | {0, CS3_SW5 , CS2_SW5 , CS1_SW5 }, //E13 | ||
101 | |||
102 | {0, CS39_SW6, CS38_SW6, CS37_SW6}, //F1 | ||
103 | {0, CS36_SW6, CS35_SW6, CS34_SW6}, //F2 | ||
104 | {0, CS33_SW6, CS32_SW6, CS31_SW6}, //F3 | ||
105 | {0, CS30_SW6, CS29_SW6, CS28_SW6}, //F4 | ||
106 | {0, CS27_SW6, CS26_SW6, CS25_SW6}, //F5 | ||
107 | {0, CS24_SW6, CS23_SW6, CS22_SW6}, //F6 | ||
108 | {0, CS21_SW6, CS20_SW6, CS19_SW6}, //F7 | ||
109 | {0, CS18_SW6, CS17_SW6, CS16_SW6}, //F8 | ||
110 | {0, CS15_SW6, CS14_SW6, CS13_SW6}, //F9 | ||
111 | {0, CS12_SW6, CS11_SW6, CS10_SW6}, //F10 | ||
112 | {0, CS9_SW6 , CS8_SW6 , CS7_SW6 }, //F11 | ||
113 | {0, CS6_SW6 , CS5_SW6 , CS4_SW6 }, //F12 | ||
114 | {0, CS3_SW6 , CS2_SW6 , CS1_SW6 }, //F13 | ||
115 | |||
116 | {0, CS39_SW7, CS38_SW7, CS37_SW7}, //G1 | ||
117 | {0, CS36_SW7, CS35_SW7, CS34_SW7}, //G2 | ||
118 | {0, CS33_SW7, CS32_SW7, CS31_SW7}, //G3 | ||
119 | {0, CS30_SW7, CS29_SW7, CS28_SW7}, //G4 | ||
120 | {0, CS27_SW7, CS26_SW7, CS25_SW7}, //G5 | ||
121 | {0, CS24_SW7, CS23_SW7, CS22_SW7}, //G6 | ||
122 | {0, CS21_SW7, CS20_SW7, CS19_SW7}, //G7 | ||
123 | {0, CS18_SW7, CS17_SW7, CS16_SW7}, //G8 | ||
124 | {0, CS15_SW7, CS14_SW7, CS13_SW7}, //G9 | ||
125 | {0, CS12_SW7, CS11_SW7, CS10_SW7}, //G10 | ||
126 | {0, CS9_SW7 , CS8_SW7 , CS7_SW7 }, //G11 | ||
127 | {0, CS6_SW7 , CS5_SW7 , CS4_SW7 }, //G12 | ||
128 | {0, CS3_SW7 , CS2_SW7 , CS1_SW7 }, //G13 | ||
129 | |||
130 | {0, CS39_SW8, CS38_SW8, CS37_SW8}, //H1 | ||
131 | {0, CS36_SW8, CS35_SW8, CS34_SW8}, //H2 | ||
132 | {0, CS33_SW8, CS32_SW8, CS31_SW8}, //H3 | ||
133 | {0, CS30_SW8, CS29_SW8, CS28_SW8}, //H4 | ||
134 | {0, CS27_SW8, CS26_SW8, CS25_SW8}, //H5 | ||
135 | {0, CS24_SW8, CS23_SW8, CS22_SW8}, //H6 | ||
136 | {0, CS21_SW8, CS20_SW8, CS19_SW8}, //H7 | ||
137 | {0, CS18_SW8, CS17_SW8, CS16_SW8}, //H8 | ||
138 | {0, CS15_SW8, CS14_SW8, CS13_SW8}, //H9 | ||
139 | {0, CS12_SW8, CS11_SW8, CS10_SW8}, //H10 | ||
140 | {0, CS9_SW8 , CS8_SW8 , CS7_SW8 }, //H11 | ||
141 | {0, CS6_SW8 , CS5_SW8 , CS4_SW8 }, //H12 | ||
142 | {0, CS3_SW8 , CS2_SW8 , CS1_SW8 }, //H13 | ||
143 | |||
144 | {0, CS39_SW9, CS38_SW9, CS37_SW9}, //I1 | ||
145 | {0, CS36_SW9, CS35_SW9, CS34_SW9}, //I2 | ||
146 | {0, CS33_SW9, CS32_SW9, CS31_SW9}, //I3 | ||
147 | {0, CS30_SW9, CS29_SW9, CS28_SW9}, //I4 | ||
148 | {0, CS27_SW9, CS26_SW9, CS25_SW9}, //I5 | ||
149 | {0, CS24_SW9, CS23_SW9, CS22_SW9}, //I6 | ||
150 | {0, CS21_SW9, CS20_SW9, CS19_SW9}, //I7 | ||
151 | {0, CS18_SW9, CS17_SW9, CS16_SW9}, //I8 | ||
152 | {0, CS15_SW9, CS14_SW9, CS13_SW9}, //I9 | ||
153 | {0, CS12_SW9, CS11_SW9, CS10_SW9}, //I10 | ||
154 | {0, CS9_SW9 , CS8_SW9 , CS7_SW9 }, //I11 | ||
155 | {0, CS6_SW9 , CS5_SW9 , CS4_SW9 }, //I12 | ||
156 | {0, CS3_SW9 , CS2_SW9 , CS1_SW9 } //I13 | ||
157 | }; | ||
158 | |||
159 | __attribute__ ((weak)) | ||
160 | led_config_t g_led_config = { { | ||
161 | { -1+00+3 , NO_LED, -1+26+3 , -1+39+3 , -1+52+3 , -1+65+3 , -1+78+3 , -1+91+3 , -1+104+3 , -1+00+1 , -1+13+1 , -1+26+1 , -1+39+1 , -1+52+1 , -1+65+1 , -1+78+1 , -1+91+1 }, | ||
162 | { -1+00+4 , -1+13+4 , -1+26+4 , -1+39+4 , -1+52+4 , -1+65+4 , -1+78+4 , -1+91+4 , -1+104+4 , -1+00+2 , -1+13+2 , -1+26+2 , -1+39+2 , -1+52+2 , -1+65+2 , -1+78+2 , -1+91+2 }, | ||
163 | { -1+00+6 , -1+13+6 , -1+26+6 , -1+39+6 , -1+52+6 , -1+65+6 , -1+78+6 , -1+91+6 , -1+104+6 , -1+00+5 , -1+13+5 , -1+26+5 , -1+39+5 , -1+52+5 , -1+65+5 , -1+78+5 , -1+91+6 }, | ||
164 | { -1+00+8 , -1+13+8 , -1+26+8 , -1+39+8 , -1+52+8 , -1+65+8 , -1+78+8 , -1+91+8 , -1+104+8 , -1+00+7 , -1+13+7 , -1+26+7 , NO_LED , -1+52+7 , NO_LED , NO_LED , NO_LED }, | ||
165 | { -1+00+11, -1+13+11, -1+26+11, -1+39+11, -1+52+11, -1+65+11, -1+78+11, -1+91+11, -1+104+11, -1+00+10, -1+13+10, NO_LED , -1+52+10, NO_LED , NO_LED , -1+78+10, NO_LED }, | ||
166 | { -1+00+9 , -1+13+9 , -1+26+9 , NO_LED , NO_LED , -1+65+9 , NO_LED , NO_LED , NO_LED , NO_LED , -1+13+12, NO_LED , -1+39+12, -1+52+12, -1+65+12, -1+78+12, -1+91+12} | ||
167 | }, { | ||
168 | {123, 0}, {117, 15}, {0 , 0}, {0 , 15}, {123, 27}, {3 , 27}, {127, 40}, {5 , 40}, {2 , 64}, {133, 52}, {8 , 52}, {131, 64}, {255,255}, | ||
169 | {143, 0}, {130, 15}, {255,255}, {13 , 15}, {136, 27}, {19 , 27}, {140, 40}, {23 , 40}, {18 , 64}, {146, 52}, {29 , 52}, {148, 64}, {255,255}, | ||
170 | {156, 0}, {143, 15}, {26 , 0}, {26 , 15}, {149, 27}, {32 , 27}, {153, 40}, {36 , 40}, {34 , 64}, {255,255}, {42 , 52}, {255,255}, {255,255}, | ||
171 | {169, 0}, {156, 15}, {39 , 0}, {39 , 15}, {162, 27}, {45 , 27}, {255,255}, {49 , 40}, {255,255}, {255,255}, {55 , 52}, {164, 64}, {255,255}, | ||
172 | {182, 0}, {175, 15}, {52 , 0}, {52 , 15}, {179, 27}, {58 , 27}, {174, 40}, {62 , 40}, {255,255}, {170, 52}, {68 , 52}, {180, 64}, {255,255}, | ||
173 | {198, 0}, {198, 15}, {65 , 0}, {65 , 15}, {198, 27}, {71 , 27}, {255,255}, {75 , 40}, {83 , 64}, {255,255}, {81 , 52}, {198, 64}, {255,255}, | ||
174 | {211, 0}, {211, 15}, {84 , 0}, {78 , 15}, {211, 27}, {84 , 27}, {255,255}, {88 , 40}, {255,255}, {211, 52}, {94 , 52}, {211, 64}, {255,255}, | ||
175 | {224, 0}, {224, 15}, {97 , 0}, {91 , 15}, {224, 27}, {97 , 27}, {255,255}, {101, 40}, {255,255}, {255,255}, {107, 52}, {224, 64}, {255,255}, | ||
176 | {255,255}, {255,255}, {110, 0}, {104, 15}, {255,255}, {110, 27}, {255,255}, {114, 40}, {255,255}, {255,255}, {120, 52}, {255,255}, {255,255} | ||
177 | }, { | ||
178 | 1, 4, 1, 1, 4, 1, 4, 1, 1, 4, 1, 4, 4, //0-12 | ||
179 | 1, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, 1, 4, //13-25 | ||
180 | 1, 4, 1, 4, 4, 4, 4, 4, 1, 4, 4, 4, 4, //26-38 | ||
181 | 1, 4, 1, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, //39-51 | ||
182 | 1, 1, 1, 4, 1, 4, 1, 4, 4, 1, 4, 1, 4, //52-64 | ||
183 | 1, 1, 1, 4, 1, 4, 4, 4, 1, 4, 4, 1, 4, //65-77 | ||
184 | 1, 1, 1, 4, 1, 4, 4, 4, 4, 1, 4, 1, 4, //78-90 | ||
185 | 1, 1, 1, 4, 1, 4, 4, 4, 4, 4, 4, 1, 4, //91-103 | ||
186 | 4, 4, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 //104-116 | ||
187 | } }; | ||
188 | |||
189 | static void init(void) { | ||
190 | i2c_init(); | ||
191 | IS31FL3741_init(DRIVER_ADDR_1); | ||
192 | for (int index = 0; index < ISSI_DRIVER_TOTAL; index++) { | ||
193 | bool enabled = !( ( index == -1+0+13) || //A13 | ||
194 | ( index == -1+13+3) || //B3 | ||
195 | ( index == -1+13+13) || //B13 | ||
196 | ( index == -1+26+10) || //C10 | ||
197 | ( index == -1+26+12) || //C12 | ||
198 | ( index == -1+26+13) || //C13 | ||
199 | ( index == -1+39+7) || //D7 | ||
200 | ( index == -1+39+9) || //D9 | ||
201 | ( index == -1+39+10) || //D10 | ||
202 | ( index == -1+39+13) || //D13 | ||
203 | ( index == -1+52+9) || //E9 | ||
204 | ( index == -1+52+13) || //E13 | ||
205 | ( index == -1+65+7) || //F7 | ||
206 | ( index == -1+65+10) || //F10 | ||
207 | ( index == -1+65+13) || //F13 | ||
208 | ( index == -1+78+7) || //G7 | ||
209 | ( index == -1+78+9) || //G9 | ||
210 | ( index == -1+78+13) || //G13 | ||
211 | ( index == -1+91+7) || //H7 | ||
212 | ( index == -1+91+9) || //H9 | ||
213 | ( index == -1+91+10) || //H10 | ||
214 | ( index == -1+91+13) || //H13 | ||
215 | ( index == -1+104+1) || //I1 | ||
216 | ( index == -1+104+2) || //I2 | ||
217 | ( index == -1+104+5) || //I5 | ||
218 | ( index == -1+104+7) || //I7 | ||
219 | ( index == -1+104+9) || //I9 | ||
220 | ( index == -1+104+10) || //I10 | ||
221 | ( index == -1+104+12) || //I12 | ||
222 | ( index == -1+104+13) //I13 | ||
223 | ); | ||
224 | IS31FL3741_set_led_control_register(index, enabled, enabled, enabled); | ||
225 | } | ||
226 | IS31FL3741_update_led_control_registers(DRIVER_ADDR_1, 0); | ||
227 | } | ||
228 | |||
229 | static void flush(void) { | ||
230 | IS31FL3741_update_pwm_buffers(DRIVER_ADDR_1, 0); | ||
231 | } | ||
232 | |||
233 | const rgb_matrix_driver_t rgb_matrix_driver = { | ||
234 | .init = init, | ||
235 | .flush = flush, | ||
236 | .set_color = IS31FL3741_set_color, | ||
237 | .set_color_all = IS31FL3741_set_color_all | ||
238 | }; | ||
239 | #endif | ||
diff --git a/keyboards/xelus/pachi/rgb/rev1/rev1.h b/keyboards/xelus/pachi/rgb/rev1/rev1.h new file mode 100644 index 000000000..894519ebe --- /dev/null +++ b/keyboards/xelus/pachi/rgb/rev1/rev1.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /* Copyright 2021 Harrison Chan (Xelus) | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | #pragma once | ||
17 | |||
18 | #include "quantum.h" | ||
19 | |||
20 | #define ____ KC_NO | ||
21 | |||
22 | #define LAYOUT_ansi_tsangan( \ | ||
23 | K000, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, \ | ||
24 | K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, \ | ||
25 | K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, \ | ||
26 | K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \ | ||
27 | K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K412, K415, \ | ||
28 | K500, K501, K502, K505, K510, K512, K513, K514, K515, K516 \ | ||
29 | ) { \ | ||
30 | { K000, ____, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016 }, \ | ||
31 | { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116 }, \ | ||
32 | { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216 }, \ | ||
33 | { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, ____, K313, ____, ____, ____ }, \ | ||
34 | { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, ____, K412, ____, ____, K415, ____ }, \ | ||
35 | { K500, K501, K502, ____, ____, K505, ____, ____, ____, ____, K510, ____, K512, K513, K514, K515, K516 } \ | ||
36 | } | ||
diff --git a/keyboards/xelus/pachi/rgb/rules.mk b/keyboards/xelus/pachi/rgb/rev1/rules.mk index 501060fbd..501060fbd 100644 --- a/keyboards/xelus/pachi/rgb/rules.mk +++ b/keyboards/xelus/pachi/rgb/rev1/rules.mk | |||
diff --git a/keyboards/xelus/pachi/rgb/rev2/config.h b/keyboards/xelus/pachi/rgb/rev2/config.h new file mode 100644 index 000000000..f66afcfb7 --- /dev/null +++ b/keyboards/xelus/pachi/rgb/rev2/config.h | |||
@@ -0,0 +1,121 @@ | |||
1 | /* Copyright 2021 Harrison Chan (Xelus) | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | #pragma once | ||
18 | |||
19 | /* USB Device descriptor parameter */ | ||
20 | #define VENDOR_ID 0x5845 // "XE" | ||
21 | #define PRODUCT_ID 0x5052 // "PR" | ||
22 | #define DEVICE_VER 0x0002 | ||
23 | #define MANUFACTURER Xelus | ||
24 | #define PRODUCT Xelus Pachi RGB | ||
25 | |||
26 | /* key matrix size */ | ||
27 | #define MATRIX_ROWS 12 | ||
28 | #define MATRIX_COLS 9 | ||
29 | |||
30 | /* key matrix pins */ | ||
31 | #define MATRIX_ROW_PINS { A5, A6, B0, A7, A8, B1, B4, B5, A15, B3, A13, A14 } | ||
32 | #define MATRIX_COL_PINS { C14, C15, A0, A1, A2, A3, A4, A10, A9} | ||
33 | #define UNUSED_PINS | ||
34 | |||
35 | /* COL2ROW or ROW2COL */ | ||
36 | #define DIODE_DIRECTION COL2ROW | ||
37 | |||
38 | /* Set 0 if debouncing isn't needed */ | ||
39 | #define DEBOUNCE 5 | ||
40 | |||
41 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
42 | #define LOCKING_SUPPORT_ENABLE | ||
43 | |||
44 | /* Locking resynchronize hack */ | ||
45 | #define LOCKING_RESYNC_ENABLE | ||
46 | |||
47 | // I2C setup | ||
48 | #define I2C1_SCL 6 | ||
49 | #define I2C1_SDA 7 | ||
50 | #define I2C1_SCL_PAL_MODE 4 | ||
51 | #define I2C1_SDA_PAL_MODE 4 | ||
52 | #define I2C1_TIMINGR_PRESC 0U | ||
53 | #define I2C1_TIMINGR_SCLDEL 11U | ||
54 | #define I2C1_TIMINGR_SDADEL 0U | ||
55 | #define I2C1_TIMINGR_SCLH 14U | ||
56 | #define I2C1_TIMINGR_SCLL 42U | ||
57 | |||
58 | // I2C EEPROM | ||
59 | #define EEPROM_I2C_24LC64 | ||
60 | |||
61 | // RGB Matrix defines | ||
62 | #define DRIVER_ADDR_1 0b0110000 | ||
63 | |||
64 | #define DRIVER_COUNT 1 | ||
65 | #define DRIVER_1_LED_TOTAL 117 | ||
66 | #define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL | ||
67 | #define ISSI_DRIVER_TOTAL DRIVER_LED_TOTAL | ||
68 | |||
69 | #define RGB_MATRIX_STARTUP_VAL 80 | ||
70 | #define RGB_MATRIX_FRAMEBUFFER_EFFECTS | ||
71 | #define RGB_MATRIX_KEYPRESSES | ||
72 | #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended | ||
73 | #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL | ||
74 | |||
75 | #define ENABLE_RGB_MATRIX_ALPHAS_MODS | ||
76 | #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN | ||
77 | #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT | ||
78 | #define ENABLE_RGB_MATRIX_BREATHING | ||
79 | #define ENABLE_RGB_MATRIX_BAND_SAT | ||
80 | #define ENABLE_RGB_MATRIX_BAND_VAL | ||
81 | #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT | ||
82 | #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL | ||
83 | #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT | ||
84 | #define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL | ||
85 | #define ENABLE_RGB_MATRIX_CYCLE_ALL | ||
86 | #define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT | ||
87 | #define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN | ||
88 | #define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON | ||
89 | #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN | ||
90 | #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL | ||
91 | #define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL | ||
92 | #define ENABLE_RGB_MATRIX_CYCLE_SPIRAL | ||
93 | #define ENABLE_RGB_MATRIX_DUAL_BEACON | ||
94 | #define ENABLE_RGB_MATRIX_RAINBOW_BEACON | ||
95 | #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS | ||
96 | #define ENABLE_RGB_MATRIX_RAINDROPS | ||
97 | #define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS | ||
98 | #define ENABLE_RGB_MATRIX_HUE_BREATHING | ||
99 | #define ENABLE_RGB_MATRIX_HUE_PENDULUM | ||
100 | #define ENABLE_RGB_MATRIX_HUE_WAVE | ||
101 | #define ENABLE_RGB_MATRIX_FRACTAL | ||
102 | #define ENABLE_RGB_MATRIX_PIXEL_RAIN | ||
103 | |||
104 | #define ENABLE_RGB_MATRIX_TYPING_HEATMAP | ||
105 | #define ENABLE_RGB_MATRIX_DIGITAL_RAIN | ||
106 | |||
107 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE | ||
108 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE | ||
109 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE | ||
110 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE | ||
111 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS | ||
112 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS | ||
113 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS | ||
114 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS | ||
115 | #define ENABLE_RGB_MATRIX_SPLASH | ||
116 | #define ENABLE_RGB_MATRIX_MULTISPLASH | ||
117 | #define ENABLE_RGB_MATRIX_SOLID_SPLASH | ||
118 | #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH | ||
119 | |||
120 | |||
121 | #define FORCE_NKRO | ||
diff --git a/keyboards/xelus/pachi/rgb/rev2/halconf.h b/keyboards/xelus/pachi/rgb/rev2/halconf.h new file mode 100644 index 000000000..633d94a88 --- /dev/null +++ b/keyboards/xelus/pachi/rgb/rev2/halconf.h | |||
@@ -0,0 +1,27 @@ | |||
1 | /* Copyright 2020 QMK | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | /* | ||
18 | * This file was auto-generated by: | ||
19 | * `qmk chibios-confmigrate -i keyboards/xelus/kangaroo/halconf.h -r platforms/chibios/common/configs/halconf.h` | ||
20 | */ | ||
21 | |||
22 | #pragma once | ||
23 | |||
24 | #define HAL_USE_I2C TRUE | ||
25 | |||
26 | #include_next <halconf.h> | ||
27 | |||
diff --git a/keyboards/xelus/pachi/rgb/rev2/mcuconf.h b/keyboards/xelus/pachi/rgb/rev2/mcuconf.h new file mode 100644 index 000000000..20db196d2 --- /dev/null +++ b/keyboards/xelus/pachi/rgb/rev2/mcuconf.h | |||
@@ -0,0 +1,28 @@ | |||
1 | /* Copyright 2020 QMK | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | /* | ||
18 | * This file was auto-generated by: | ||
19 | * `qmk chibios-confmigrate -i keyboards/xelus/kangaroo/mcuconf.h -r platforms/chibios/GENERIC_STM32_F072XB/configs/mcuconf.h` | ||
20 | */ | ||
21 | |||
22 | #pragma once | ||
23 | |||
24 | #include_next <mcuconf.h> | ||
25 | |||
26 | #undef STM32_I2C_USE_I2C1 | ||
27 | #define STM32_I2C_USE_I2C1 TRUE | ||
28 | |||
diff --git a/keyboards/xelus/pachi/rgb/rev2/readme.md b/keyboards/xelus/pachi/rgb/rev2/readme.md new file mode 100644 index 000000000..82a10e418 --- /dev/null +++ b/keyboards/xelus/pachi/rgb/rev2/readme.md | |||
@@ -0,0 +1,18 @@ | |||
1 | # Pachi RGB Rev 2 | ||
2 | |||
3 | Pachi RGB Rev 2 TKL Keyboard that is a per-key RGB, hotswap, ANSI and tsangan. | ||
4 | |||
5 | * Keyboard Maintainer: [Xelus22](https://github.com/Xelus22) | ||
6 | * Hardware Supported: Group buys | ||
7 | |||
8 | Make example for this keyboard (after setting up your build environment): | ||
9 | |||
10 | make xelus/pachi/rgb/rev2:default | ||
11 | |||
12 | Reset your keyboard in 3 ways: | ||
13 | |||
14 | * Software reset on Fn + Backspace | ||
15 | * Bootmagic reset: hold down the top left key (usually escape) and plugin the keyboard | ||
16 | * Physical reset button: on the back of the PCB, there should be a small golden button you can press | ||
17 | |||
18 | See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). | ||
diff --git a/keyboards/xelus/pachi/rgb/rev2/rev2.c b/keyboards/xelus/pachi/rgb/rev2/rev2.c new file mode 100644 index 000000000..3a2e7caca --- /dev/null +++ b/keyboards/xelus/pachi/rgb/rev2/rev2.c | |||
@@ -0,0 +1,245 @@ | |||
1 | /* Copyright 2021 Harrison Chan (Xelus) | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | #include "rev2.h" | ||
18 | |||
19 | // tested and working | ||
20 | void matrix_io_delay(void) { __asm__ volatile("nop\nnop\nnop\n"); } | ||
21 | |||
22 | #ifdef RGB_MATRIX_ENABLE | ||
23 | #include "i2c_master.h" | ||
24 | #include "drivers/led/issi/is31fl3741.h" | ||
25 | const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { | ||
26 | /* Refer to IS31 manual for these locations | ||
27 | * driver | ||
28 | * | R location | ||
29 | * | | G location | ||
30 | * | | | B location | ||
31 | * | | | | */ | ||
32 | {0, CS39_SW1, CS38_SW1, CS37_SW1}, //A1 | ||
33 | {0, CS36_SW1, CS35_SW1, CS34_SW1}, //A2 | ||
34 | {0, CS33_SW1, CS32_SW1, CS31_SW1}, //A3 | ||
35 | {0, CS30_SW1, CS29_SW1, CS28_SW1}, //A4 | ||
36 | {0, CS27_SW1, CS26_SW1, CS25_SW1}, //A5 | ||
37 | {0, CS24_SW1, CS23_SW1, CS22_SW1}, //A6 | ||
38 | {0, CS21_SW1, CS20_SW1, CS19_SW1}, //A7 | ||
39 | {0, CS18_SW1, CS17_SW1, CS16_SW1}, //A8 | ||
40 | {0, CS15_SW1, CS14_SW1, CS13_SW1}, //A9 | ||
41 | {0, CS12_SW1, CS11_SW1, CS10_SW1}, //A10 | ||
42 | {0, CS9_SW1 , CS8_SW1 , CS7_SW1 }, //A11 | ||
43 | {0, CS6_SW1 , CS5_SW1 , CS4_SW1 }, //A12 | ||
44 | {0, CS3_SW1 , CS2_SW1 , CS1_SW1 }, //A13 | ||
45 | |||
46 | {0, CS39_SW2, CS38_SW2, CS37_SW2}, //B1 | ||
47 | {0, CS36_SW2, CS35_SW2, CS34_SW2}, //B2 | ||
48 | {0, CS33_SW2, CS32_SW2, CS31_SW2}, //B3 | ||
49 | {0, CS30_SW2, CS29_SW2, CS28_SW2}, //B4 | ||
50 | {0, CS27_SW2, CS26_SW2, CS25_SW2}, //B5 | ||
51 | {0, CS24_SW2, CS23_SW2, CS22_SW2}, //B6 | ||
52 | {0, CS21_SW2, CS20_SW2, CS19_SW2}, //B7 | ||
53 | {0, CS18_SW2, CS17_SW2, CS16_SW2}, //B8 | ||
54 | {0, CS15_SW2, CS14_SW2, CS13_SW2}, //B9 | ||
55 | {0, CS12_SW2, CS11_SW2, CS10_SW2}, //B10 | ||
56 | {0, CS9_SW2 , CS8_SW2 , CS7_SW2 }, //B11 | ||
57 | {0, CS6_SW2 , CS5_SW2 , CS4_SW2 }, //B12 | ||
58 | {0, CS3_SW2 , CS2_SW2 , CS1_SW2 }, //B13 | ||
59 | |||
60 | {0, CS39_SW3, CS38_SW3, CS37_SW3}, //C1 | ||
61 | {0, CS36_SW3, CS35_SW3, CS34_SW3}, //C2 | ||
62 | {0, CS33_SW3, CS32_SW3, CS31_SW3}, //C3 | ||
63 | {0, CS30_SW3, CS29_SW3, CS28_SW3}, //C4 | ||
64 | {0, CS27_SW3, CS26_SW3, CS25_SW3}, //C5 | ||
65 | {0, CS24_SW3, CS23_SW3, CS22_SW3}, //C6 | ||
66 | {0, CS21_SW3, CS20_SW3, CS19_SW3}, //C7 | ||
67 | {0, CS18_SW3, CS17_SW3, CS16_SW3}, //C8 | ||
68 | {0, CS15_SW3, CS14_SW3, CS13_SW3}, //C9 | ||
69 | {0, CS12_SW3, CS11_SW3, CS10_SW3}, //C10 | ||
70 | {0, CS9_SW3 , CS8_SW3 , CS7_SW3 }, //C11 | ||
71 | {0, CS6_SW3 , CS5_SW3 , CS4_SW3 }, //C12 | ||
72 | {0, CS3_SW3 , CS2_SW3 , CS1_SW3 }, //C13 | ||
73 | |||
74 | {0, CS39_SW4, CS38_SW4, CS37_SW4}, //D1 | ||
75 | {0, CS36_SW4, CS35_SW4, CS34_SW4}, //D2 | ||
76 | {0, CS33_SW4, CS32_SW4, CS31_SW4}, //D3 | ||
77 | {0, CS30_SW4, CS29_SW4, CS28_SW4}, //D4 | ||
78 | {0, CS27_SW4, CS26_SW4, CS25_SW4}, //D5 | ||
79 | {0, CS24_SW4, CS23_SW4, CS22_SW4}, //D6 | ||
80 | {0, CS21_SW4, CS20_SW4, CS19_SW4}, //D7 | ||
81 | {0, CS18_SW4, CS17_SW4, CS16_SW4}, //D8 | ||
82 | {0, CS15_SW4, CS14_SW4, CS13_SW4}, //D9 | ||
83 | {0, CS12_SW4, CS11_SW4, CS10_SW4}, //D10 | ||
84 | {0, CS9_SW4 , CS8_SW4 , CS7_SW4 }, //D11 | ||
85 | {0, CS6_SW4 , CS5_SW4 , CS4_SW4 }, //D12 | ||
86 | {0, CS3_SW4 , CS2_SW4 , CS1_SW4 }, //D13 | ||
87 | |||
88 | {0, CS39_SW5, CS38_SW5, CS37_SW5}, //E1 | ||
89 | {0, CS36_SW5, CS35_SW5, CS34_SW5}, //E2 | ||
90 | {0, CS33_SW5, CS32_SW5, CS31_SW5}, //E3 | ||
91 | {0, CS30_SW5, CS29_SW5, CS28_SW5}, //E4 | ||
92 | {0, CS27_SW5, CS26_SW5, CS25_SW5}, //E5 | ||
93 | {0, CS24_SW5, CS23_SW5, CS22_SW5}, //E6 | ||
94 | {0, CS21_SW5, CS20_SW5, CS19_SW5}, //E7 | ||
95 | {0, CS18_SW5, CS17_SW5, CS16_SW5}, //E8 | ||
96 | {0, CS15_SW5, CS14_SW5, CS13_SW5}, //E9 | ||
97 | {0, CS12_SW5, CS11_SW5, CS10_SW5}, //E10 | ||
98 | {0, CS9_SW5 , CS8_SW5 , CS7_SW5 }, //E11 | ||
99 | {0, CS6_SW5 , CS5_SW5 , CS4_SW5 }, //E12 | ||
100 | {0, CS3_SW5 , CS2_SW5 , CS1_SW5 }, //E13 | ||
101 | |||
102 | {0, CS39_SW6, CS38_SW6, CS37_SW6}, //F1 | ||
103 | {0, CS36_SW6, CS35_SW6, CS34_SW6}, //F2 | ||
104 | {0, CS33_SW6, CS32_SW6, CS31_SW6}, //F3 | ||
105 | {0, CS30_SW6, CS29_SW6, CS28_SW6}, //F4 | ||
106 | {0, CS27_SW6, CS26_SW6, CS25_SW6}, //F5 | ||
107 | {0, CS24_SW6, CS23_SW6, CS22_SW6}, //F6 | ||
108 | {0, CS21_SW6, CS20_SW6, CS19_SW6}, //F7 | ||
109 | {0, CS18_SW6, CS17_SW6, CS16_SW6}, //F8 | ||
110 | {0, CS15_SW6, CS14_SW6, CS13_SW6}, //F9 | ||
111 | {0, CS12_SW6, CS11_SW6, CS10_SW6}, //F10 | ||
112 | {0, CS9_SW6 , CS8_SW6 , CS7_SW6 }, //F11 | ||
113 | {0, CS6_SW6 , CS5_SW6 , CS4_SW6 }, //F12 | ||
114 | {0, CS3_SW6 , CS2_SW6 , CS1_SW6 }, //F13 | ||
115 | |||
116 | {0, CS39_SW7, CS38_SW7, CS37_SW7}, //G1 | ||
117 | {0, CS36_SW7, CS35_SW7, CS34_SW7}, //G2 | ||
118 | {0, CS33_SW7, CS32_SW7, CS31_SW7}, //G3 | ||
119 | {0, CS30_SW7, CS29_SW7, CS28_SW7}, //G4 | ||
120 | {0, CS27_SW7, CS26_SW7, CS25_SW7}, //G5 | ||
121 | {0, CS24_SW7, CS23_SW7, CS22_SW7}, //G6 | ||
122 | {0, CS21_SW7, CS20_SW7, CS19_SW7}, //G7 | ||
123 | {0, CS18_SW7, CS17_SW7, CS16_SW7}, //G8 | ||
124 | {0, CS15_SW7, CS14_SW7, CS13_SW7}, //G9 | ||
125 | {0, CS12_SW7, CS11_SW7, CS10_SW7}, //G10 | ||
126 | {0, CS9_SW7 , CS8_SW7 , CS7_SW7 }, //G11 | ||
127 | {0, CS6_SW7 , CS5_SW7 , CS4_SW7 }, //G12 | ||
128 | {0, CS3_SW7 , CS2_SW7 , CS1_SW7 }, //G13 | ||
129 | |||
130 | {0, CS39_SW8, CS38_SW8, CS37_SW8}, //H1 | ||
131 | {0, CS36_SW8, CS35_SW8, CS34_SW8}, //H2 | ||
132 | {0, CS33_SW8, CS32_SW8, CS31_SW8}, //H3 | ||
133 | {0, CS30_SW8, CS29_SW8, CS28_SW8}, //H4 | ||
134 | {0, CS27_SW8, CS26_SW8, CS25_SW8}, //H5 | ||
135 | {0, CS24_SW8, CS23_SW8, CS22_SW8}, //H6 | ||
136 | {0, CS21_SW8, CS20_SW8, CS19_SW8}, //H7 | ||
137 | {0, CS18_SW8, CS17_SW8, CS16_SW8}, //H8 | ||
138 | {0, CS15_SW8, CS14_SW8, CS13_SW8}, //H9 | ||
139 | {0, CS12_SW8, CS11_SW8, CS10_SW8}, //H10 | ||
140 | {0, CS9_SW8 , CS8_SW8 , CS7_SW8 }, //H11 | ||
141 | {0, CS6_SW8 , CS5_SW8 , CS4_SW8 }, //H12 | ||
142 | {0, CS3_SW8 , CS2_SW8 , CS1_SW8 }, //H13 | ||
143 | |||
144 | {0, CS39_SW9, CS38_SW9, CS37_SW9}, //I1 | ||
145 | {0, CS36_SW9, CS35_SW9, CS34_SW9}, //I2 | ||
146 | {0, CS33_SW9, CS32_SW9, CS31_SW9}, //I3 | ||
147 | {0, CS30_SW9, CS29_SW9, CS28_SW9}, //I4 | ||
148 | {0, CS27_SW9, CS26_SW9, CS25_SW9}, //I5 | ||
149 | {0, CS24_SW9, CS23_SW9, CS22_SW9}, //I6 | ||
150 | {0, CS21_SW9, CS20_SW9, CS19_SW9}, //I7 | ||
151 | {0, CS18_SW9, CS17_SW9, CS16_SW9}, //I8 | ||
152 | {0, CS15_SW9, CS14_SW9, CS13_SW9}, //I9 | ||
153 | {0, CS12_SW9, CS11_SW9, CS10_SW9}, //I10 | ||
154 | {0, CS9_SW9 , CS8_SW9 , CS7_SW9 }, //I11 | ||
155 | {0, CS6_SW9 , CS5_SW9 , CS4_SW9 }, //I12 | ||
156 | {0, CS3_SW9 , CS2_SW9 , CS1_SW9 } //I13 | ||
157 | }; | ||
158 | |||
159 | __attribute__ ((weak)) | ||
160 | led_config_t g_led_config = { { | ||
161 | { -1+00+3 , -1+26+3 , -1+52+3 , -1+78+3 , -1+104+3, -1+13+1 , -1+39+1 , -1+65+1 , -1+91+1 }, | ||
162 | { NO_LED , -1+39+3 , -1+65+3 , -1+91+3 , -1+00+1 , -1+26+1 , -1+52+1 , -1+78+1 , NO_LED }, | ||
163 | { -1+00+4 , -1+26+4 , -1+52+4 , -1+78+4 , -1+104+4, -1+13+2 , -1+39+2 , -1+65+2 , -1+91+2 }, | ||
164 | { -1+13+4 , -1+39+4 , -1+65+4 , -1+91+4 , -1+00+2 , -1+26+2 , -1+52+2 , -1+78+2 , NO_LED }, | ||
165 | { -1+00+6 , -1+26+6 , -1+52+6 , -1+78+6 , -1+104+6, -1+13+5 , -1+39+5 , -1+65+5 , -1+91+6 }, | ||
166 | { -1+13+6 , -1+39+6 , -1+65+6 , -1+91+6 , -1+00+5 , -1+26+5 , -1+52+5 , -1+78+5 , NO_LED }, | ||
167 | { -1+00+8 , -1+26+8 , -1+52+8 , -1+78+8 , -1+104+8, -1+13+7 , NO_LED , NO_LED , NO_LED }, | ||
168 | { -1+13+8 , -1+39+8 , -1+65+8 , -1+91+8 , -1+00+7 , -1+26+7 , -1+52+7 , NO_LED , NO_LED }, | ||
169 | { -1+00+11, -1+26+11, -1+52+11, -1+78+11,-1+104+11, -1+13+10, -1+52+10, NO_LED , NO_LED }, | ||
170 | { -1+13+11, -1+39+11, -1+65+11, -1+91+11, -1+00+10, NO_LED , NO_LED , -1+78+10, NO_LED }, | ||
171 | { -1+00+9 , -1+26+9 , NO_LED , NO_LED , NO_LED , -1+13+12, -1+39+12, -1+65+12, -1+91+12 }, | ||
172 | { -1+13+9 , NO_LED , -1+65+9 , NO_LED , NO_LED , NO_LED , -1+52+12, -1+78+12, NO_LED } | ||
173 | }, { | ||
174 | {123, 0}, {117, 15}, {0 , 0}, {0 , 15}, {123, 27}, {3 , 27}, {127, 40}, {5 , 40}, {2 , 64}, {133, 52}, {8 , 52}, {131, 64}, {255,255}, | ||
175 | {143, 0}, {130, 15}, {255,255}, {13 , 15}, {136, 27}, {19 , 27}, {140, 40}, {23 , 40}, {18 , 64}, {146, 52}, {29 , 52}, {148, 64}, {255,255}, | ||
176 | {156, 0}, {143, 15}, {26 , 0}, {26 , 15}, {149, 27}, {32 , 27}, {153, 40}, {36 , 40}, {34 , 64}, {255,255}, {42 , 52}, {255,255}, {255,255}, | ||
177 | {169, 0}, {156, 15}, {39 , 0}, {39 , 15}, {162, 27}, {45 , 27}, {255,255}, {49 , 40}, {255,255}, {255,255}, {55 , 52}, {164, 64}, {255,255}, | ||
178 | {182, 0}, {175, 15}, {52 , 0}, {52 , 15}, {179, 27}, {58 , 27}, {174, 40}, {62 , 40}, {255,255}, {170, 52}, {68 , 52}, {180, 64}, {255,255}, | ||
179 | {198, 0}, {198, 15}, {65 , 0}, {65 , 15}, {198, 27}, {71 , 27}, {255,255}, {75 , 40}, {83 , 64}, {255,255}, {81 , 52}, {198, 64}, {255,255}, | ||
180 | {211, 0}, {211, 15}, {84 , 0}, {78 , 15}, {211, 27}, {84 , 27}, {255,255}, {88 , 40}, {255,255}, {211, 52}, {94 , 52}, {211, 64}, {255,255}, | ||
181 | {224, 0}, {224, 15}, {97 , 0}, {91 , 15}, {224, 27}, {97 , 27}, {255,255}, {101, 40}, {255,255}, {255,255}, {107, 52}, {224, 64}, {255,255}, | ||
182 | {255,255}, {255,255}, {110, 0}, {104, 15}, {255,255}, {110, 27}, {255,255}, {114, 40}, {255,255}, {255,255}, {120, 52}, {255,255}, {255,255} | ||
183 | }, { | ||
184 | 1, 4, 1, 1, 4, 1, 4, 1, 1, 4, 1, 4, 4, //0-12 | ||
185 | 1, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, 1, 4, //13-25 | ||
186 | 1, 4, 1, 4, 4, 4, 4, 4, 1, 4, 4, 4, 4, //26-38 | ||
187 | 1, 4, 1, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, //39-51 | ||
188 | 1, 1, 1, 4, 1, 4, 1, 4, 4, 1, 4, 1, 4, //52-64 | ||
189 | 1, 1, 1, 4, 1, 4, 4, 4, 1, 4, 4, 1, 4, //65-77 | ||
190 | 1, 1, 1, 4, 1, 4, 4, 4, 4, 1, 4, 1, 4, //78-90 | ||
191 | 1, 1, 1, 4, 1, 4, 4, 4, 4, 4, 4, 1, 4, //91-103 | ||
192 | 4, 4, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 //104-116 | ||
193 | } }; | ||
194 | |||
195 | static void init(void) { | ||
196 | i2c_init(); | ||
197 | IS31FL3741_init(DRIVER_ADDR_1); | ||
198 | for (int index = 0; index < ISSI_DRIVER_TOTAL; index++) { | ||
199 | bool enabled = !( ( index == -1+0+13) || //A13 | ||
200 | ( index == -1+13+3) || //B3 | ||
201 | ( index == -1+13+13) || //B13 | ||
202 | ( index == -1+26+10) || //C10 | ||
203 | ( index == -1+26+12) || //C12 | ||
204 | ( index == -1+26+13) || //C13 | ||
205 | ( index == -1+39+7) || //D7 | ||
206 | ( index == -1+39+9) || //D9 | ||
207 | ( index == -1+39+10) || //D10 | ||
208 | ( index == -1+39+13) || //D13 | ||
209 | ( index == -1+52+9) || //E9 | ||
210 | ( index == -1+52+13) || //E13 | ||
211 | ( index == -1+65+7) || //F7 | ||
212 | ( index == -1+65+10) || //F10 | ||
213 | ( index == -1+65+13) || //F13 | ||
214 | ( index == -1+78+7) || //G7 | ||
215 | ( index == -1+78+9) || //G9 | ||
216 | ( index == -1+78+13) || //G13 | ||
217 | ( index == -1+91+7) || //H7 | ||
218 | ( index == -1+91+9) || //H9 | ||
219 | ( index == -1+91+10) || //H10 | ||
220 | ( index == -1+91+13) || //H13 | ||
221 | ( index == -1+104+1) || //I1 | ||
222 | ( index == -1+104+2) || //I2 | ||
223 | ( index == -1+104+5) || //I5 | ||
224 | ( index == -1+104+7) || //I7 | ||
225 | ( index == -1+104+9) || //I9 | ||
226 | ( index == -1+104+10) || //I10 | ||
227 | ( index == -1+104+12) || //I12 | ||
228 | ( index == -1+104+13) //I13 | ||
229 | ); | ||
230 | IS31FL3741_set_led_control_register(index, enabled, enabled, enabled); | ||
231 | } | ||
232 | IS31FL3741_update_led_control_registers(DRIVER_ADDR_1, 0); | ||
233 | } | ||
234 | |||
235 | static void flush(void) { | ||
236 | IS31FL3741_update_pwm_buffers(DRIVER_ADDR_1, 0); | ||
237 | } | ||
238 | |||
239 | const rgb_matrix_driver_t rgb_matrix_driver = { | ||
240 | .init = init, | ||
241 | .flush = flush, | ||
242 | .set_color = IS31FL3741_set_color, | ||
243 | .set_color_all = IS31FL3741_set_color_all | ||
244 | }; | ||
245 | #endif | ||
diff --git a/keyboards/xelus/pachi/rgb/rev2/rev2.h b/keyboards/xelus/pachi/rgb/rev2/rev2.h new file mode 100644 index 000000000..edc164d72 --- /dev/null +++ b/keyboards/xelus/pachi/rgb/rev2/rev2.h | |||
@@ -0,0 +1,42 @@ | |||
1 | /* Copyright 2021 Harrison Chan (Xelus) | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | #pragma once | ||
17 | |||
18 | #include "quantum.h" | ||
19 | |||
20 | #define _____ KC_NO | ||
21 | |||
22 | #define LAYOUT_ansi_tsangan( \ | ||
23 | K0000, K0001, K0101, K0002, K0102, K0003, K0103, K0004, K0104, K0005, K0105, K0006, K0106, K0007, K0107, K0008, \ | ||
24 | K0200, K0300, K0201, K0301, K0202, K0302, K0203, K0303, K0204, K0304, K0205, K0305, K0206, K0306, K0207, K0307, K0208, \ | ||
25 | K0400, K0500, K0401, K0501, K0402, K0502, K0403, K0503, K0404, K0504, K0405, K0505, K0406, K0506, K0407, K0507, K0408, \ | ||
26 | K0600, K0700, K0601, K0701, K0602, K0702, K0603, K0703, K0604, K0704, K0605, K0705, K0706, \ | ||
27 | K0800, K0900, K0801, K0901, K0802, K0902, K0803, K0903, K0804, K0904, K0805, K0806, K0907, \ | ||
28 | K1000, K1100, K1001, K1102, K1005, K1006, K1106, K1007, K1107, K1008 \ | ||
29 | ) { \ | ||
30 | { K0000, K0001, K0002, K0003, K0004, K0005, K0006, K0007, K0008 }, \ | ||
31 | { _____, K0101, K0102, K0103, K0104, K0105, K0106, K0107, _____ }, \ | ||
32 | { K0200, K0201, K0202, K0203, K0204, K0205, K0206, K0207, K0208 }, \ | ||
33 | { K0300, K0301, K0302, K0303, K0304, K0305, K0306, K0307, _____ }, \ | ||
34 | { K0400, K0401, K0402, K0403, K0404, K0405, K0406, K0407, K0408 }, \ | ||
35 | { K0500, K0501, K0502, K0503, K0504, K0505, K0506, K0507, _____ }, \ | ||
36 | { K0600, K0601, K0602, K0603, K0604, K0605, _____, _____, _____ }, \ | ||
37 | { K0700, K0701, K0702, K0703, K0704, K0705, K0706, _____, _____ }, \ | ||
38 | { K0800, K0801, K0802, K0803, K0804, K0805, K0806, _____, _____ }, \ | ||
39 | { K0900, K0901, K0902, K0903, K0904, _____, _____, K0907, _____ }, \ | ||
40 | { K1000, K1001, _____, _____, _____, K1005, K1006, K1007, K1008 }, \ | ||
41 | { K1100, _____, K1102, _____, _____, _____, K1106, K1107, _____ } \ | ||
42 | } | ||
diff --git a/keyboards/xelus/pachi/rgb/rev2/rules.mk b/keyboards/xelus/pachi/rgb/rev2/rules.mk new file mode 100644 index 000000000..0834a9ab6 --- /dev/null +++ b/keyboards/xelus/pachi/rgb/rev2/rules.mk | |||
@@ -0,0 +1,31 @@ | |||
1 | # MCU name | ||
2 | MCU = STM32L422 | ||
3 | |||
4 | # Bootloader selection | ||
5 | BOOTLOADER = stm32-dfu | ||
6 | |||
7 | # Build Options | ||
8 | # change yes to no to disable | ||
9 | # | ||
10 | BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite | ||
11 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
12 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
13 | CONSOLE_ENABLE = yes # Console for debug | ||
14 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
15 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
16 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
17 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
18 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
19 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
20 | AUDIO_ENABLE = no # Audio output | ||
21 | |||
22 | EEPROM_DRIVER = i2c | ||
23 | |||
24 | RGB_MATRIX_ENABLE = yes | ||
25 | RGB_MATRIX_DRIVER = custom | ||
26 | |||
27 | COMMON_VPATH += $(DRIVER_PATH)/issi | ||
28 | SRC += drivers/led/issi/is31fl3741.c | ||
29 | |||
30 | LTO_ENABLE = yes | ||
31 | OPT = 2 | ||
diff --git a/keyboards/xelus/pachi/rgb/rgb.c b/keyboards/xelus/pachi/rgb/rgb.c index 4f2f2c7b7..93ca8406d 100644 --- a/keyboards/xelus/pachi/rgb/rgb.c +++ b/keyboards/xelus/pachi/rgb/rgb.c | |||
@@ -13,231 +13,4 @@ | |||
13 | * You should have received a copy of the GNU General Public License | 13 | * You should have received a copy of the GNU General Public License |
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | */ | 15 | */ |
16 | |||
17 | #include "rgb.h" | 16 | #include "rgb.h" |
18 | #include <hal.h> | ||
19 | #include <ch.h> | ||
20 | |||
21 | // tested and working | ||
22 | void matrix_io_delay(void) { __asm__ volatile("nop\nnop\nnop\n"); } | ||
23 | |||
24 | #ifdef RGB_MATRIX_ENABLE | ||
25 | #include <i2c_master.h> | ||
26 | #include "drivers/led/issi/is31fl3741.h" | ||
27 | const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { | ||
28 | /* Refer to IS31 manual for these locations | ||
29 | * driver | ||
30 | * | R location | ||
31 | * | | G location | ||
32 | * | | | B location | ||
33 | * | | | | */ | ||
34 | {0, CS39_SW1, CS38_SW1, CS37_SW1}, //A1 | ||
35 | {0, CS36_SW1, CS35_SW1, CS34_SW1}, //A2 | ||
36 | {0, CS33_SW1, CS32_SW1, CS31_SW1}, //A3 | ||
37 | {0, CS30_SW1, CS29_SW1, CS28_SW1}, //A4 | ||
38 | {0, CS27_SW1, CS26_SW1, CS25_SW1}, //A5 | ||
39 | {0, CS24_SW1, CS23_SW1, CS22_SW1}, //A6 | ||
40 | {0, CS21_SW1, CS20_SW1, CS19_SW1}, //A7 | ||
41 | {0, CS18_SW1, CS17_SW1, CS16_SW1}, //A8 | ||
42 | {0, CS15_SW1, CS14_SW1, CS13_SW1}, //A9 | ||
43 | {0, CS12_SW1, CS11_SW1, CS10_SW1}, //A10 | ||
44 | {0, CS9_SW1 , CS8_SW1 , CS7_SW1 }, //A11 | ||
45 | {0, CS6_SW1 , CS5_SW1 , CS4_SW1 }, //A12 | ||
46 | {0, CS3_SW1 , CS2_SW1 , CS1_SW1 }, //A13 | ||
47 | |||
48 | {0, CS39_SW2, CS38_SW2, CS37_SW2}, //B1 | ||
49 | {0, CS36_SW2, CS35_SW2, CS34_SW2}, //B2 | ||
50 | {0, CS33_SW2, CS32_SW2, CS31_SW2}, //B3 | ||
51 | {0, CS30_SW2, CS29_SW2, CS28_SW2}, //B4 | ||
52 | {0, CS27_SW2, CS26_SW2, CS25_SW2}, //B5 | ||
53 | {0, CS24_SW2, CS23_SW2, CS22_SW2}, //B6 | ||
54 | {0, CS21_SW2, CS20_SW2, CS19_SW2}, //B7 | ||
55 | {0, CS18_SW2, CS17_SW2, CS16_SW2}, //B8 | ||
56 | {0, CS15_SW2, CS14_SW2, CS13_SW2}, //B9 | ||
57 | {0, CS12_SW2, CS11_SW2, CS10_SW2}, //B10 | ||
58 | {0, CS9_SW2 , CS8_SW2 , CS7_SW2 }, //B11 | ||
59 | {0, CS6_SW2 , CS5_SW2 , CS4_SW2 }, //B12 | ||
60 | {0, CS3_SW2 , CS2_SW2 , CS1_SW2 }, //B13 | ||
61 | |||
62 | {0, CS39_SW3, CS38_SW3, CS37_SW3}, //C1 | ||
63 | {0, CS36_SW3, CS35_SW3, CS34_SW3}, //C2 | ||
64 | {0, CS33_SW3, CS32_SW3, CS31_SW3}, //C3 | ||
65 | {0, CS30_SW3, CS29_SW3, CS28_SW3}, //C4 | ||
66 | {0, CS27_SW3, CS26_SW3, CS25_SW3}, //C5 | ||
67 | {0, CS24_SW3, CS23_SW3, CS22_SW3}, //C6 | ||
68 | {0, CS21_SW3, CS20_SW3, CS19_SW3}, //C7 | ||
69 | {0, CS18_SW3, CS17_SW3, CS16_SW3}, //C8 | ||
70 | {0, CS15_SW3, CS14_SW3, CS13_SW3}, //C9 | ||
71 | {0, CS12_SW3, CS11_SW3, CS10_SW3}, //C10 | ||
72 | {0, CS9_SW3 , CS8_SW3 , CS7_SW3 }, //C11 | ||
73 | {0, CS6_SW3 , CS5_SW3 , CS4_SW3 }, //C12 | ||
74 | {0, CS3_SW3 , CS2_SW3 , CS1_SW3 }, //C13 | ||
75 | |||
76 | {0, CS39_SW4, CS38_SW4, CS37_SW4}, //D1 | ||
77 | {0, CS36_SW4, CS35_SW4, CS34_SW4}, //D2 | ||
78 | {0, CS33_SW4, CS32_SW4, CS31_SW4}, //D3 | ||
79 | {0, CS30_SW4, CS29_SW4, CS28_SW4}, //D4 | ||
80 | {0, CS27_SW4, CS26_SW4, CS25_SW4}, //D5 | ||
81 | {0, CS24_SW4, CS23_SW4, CS22_SW4}, //D6 | ||
82 | {0, CS21_SW4, CS20_SW4, CS19_SW4}, //D7 | ||
83 | {0, CS18_SW4, CS17_SW4, CS16_SW4}, //D8 | ||
84 | {0, CS15_SW4, CS14_SW4, CS13_SW4}, //D9 | ||
85 | {0, CS12_SW4, CS11_SW4, CS10_SW4}, //D10 | ||
86 | {0, CS9_SW4 , CS8_SW4 , CS7_SW4 }, //D11 | ||
87 | {0, CS6_SW4 , CS5_SW4 , CS4_SW4 }, //D12 | ||
88 | {0, CS3_SW4 , CS2_SW4 , CS1_SW4 }, //D13 | ||
89 | |||
90 | {0, CS39_SW5, CS38_SW5, CS37_SW5}, //E1 | ||
91 | {0, CS36_SW5, CS35_SW5, CS34_SW5}, //E2 | ||
92 | {0, CS33_SW5, CS32_SW5, CS31_SW5}, //E3 | ||
93 | {0, CS30_SW5, CS29_SW5, CS28_SW5}, //E4 | ||
94 | {0, CS27_SW5, CS26_SW5, CS25_SW5}, //E5 | ||
95 | {0, CS24_SW5, CS23_SW5, CS22_SW5}, //E6 | ||
96 | {0, CS21_SW5, CS20_SW5, CS19_SW5}, //E7 | ||
97 | {0, CS18_SW5, CS17_SW5, CS16_SW5}, //E8 | ||
98 | {0, CS15_SW5, CS14_SW5, CS13_SW5}, //E9 | ||
99 | {0, CS12_SW5, CS11_SW5, CS10_SW5}, //E10 | ||
100 | {0, CS9_SW5 , CS8_SW5 , CS7_SW5 }, //E11 | ||
101 | {0, CS6_SW5 , CS5_SW5 , CS4_SW5 }, //E12 | ||
102 | {0, CS3_SW5 , CS2_SW5 , CS1_SW5 }, //E13 | ||
103 | |||
104 | {0, CS39_SW6, CS38_SW6, CS37_SW6}, //F1 | ||
105 | {0, CS36_SW6, CS35_SW6, CS34_SW6}, //F2 | ||
106 | {0, CS33_SW6, CS32_SW6, CS31_SW6}, //F3 | ||
107 | {0, CS30_SW6, CS29_SW6, CS28_SW6}, //F4 | ||
108 | {0, CS27_SW6, CS26_SW6, CS25_SW6}, //F5 | ||
109 | {0, CS24_SW6, CS23_SW6, CS22_SW6}, //F6 | ||
110 | {0, CS21_SW6, CS20_SW6, CS19_SW6}, //F7 | ||
111 | {0, CS18_SW6, CS17_SW6, CS16_SW6}, //F8 | ||
112 | {0, CS15_SW6, CS14_SW6, CS13_SW6}, //F9 | ||
113 | {0, CS12_SW6, CS11_SW6, CS10_SW6}, //F10 | ||
114 | {0, CS9_SW6 , CS8_SW6 , CS7_SW6 }, //F11 | ||
115 | {0, CS6_SW6 , CS5_SW6 , CS4_SW6 }, //F12 | ||
116 | {0, CS3_SW6 , CS2_SW6 , CS1_SW6 }, //F13 | ||
117 | |||
118 | {0, CS39_SW7, CS38_SW7, CS37_SW7}, //G1 | ||
119 | {0, CS36_SW7, CS35_SW7, CS34_SW7}, //G2 | ||
120 | {0, CS33_SW7, CS32_SW7, CS31_SW7}, //G3 | ||
121 | {0, CS30_SW7, CS29_SW7, CS28_SW7}, //G4 | ||
122 | {0, CS27_SW7, CS26_SW7, CS25_SW7}, //G5 | ||
123 | {0, CS24_SW7, CS23_SW7, CS22_SW7}, //G6 | ||
124 | {0, CS21_SW7, CS20_SW7, CS19_SW7}, //G7 | ||
125 | {0, CS18_SW7, CS17_SW7, CS16_SW7}, //G8 | ||
126 | {0, CS15_SW7, CS14_SW7, CS13_SW7}, //G9 | ||
127 | {0, CS12_SW7, CS11_SW7, CS10_SW7}, //G10 | ||
128 | {0, CS9_SW7 , CS8_SW7 , CS7_SW7 }, //G11 | ||
129 | {0, CS6_SW7 , CS5_SW7 , CS4_SW7 }, //G12 | ||
130 | {0, CS3_SW7 , CS2_SW7 , CS1_SW7 }, //G13 | ||
131 | |||
132 | {0, CS39_SW8, CS38_SW8, CS37_SW8}, //H1 | ||
133 | {0, CS36_SW8, CS35_SW8, CS34_SW8}, //H2 | ||
134 | {0, CS33_SW8, CS32_SW8, CS31_SW8}, //H3 | ||
135 | {0, CS30_SW8, CS29_SW8, CS28_SW8}, //H4 | ||
136 | {0, CS27_SW8, CS26_SW8, CS25_SW8}, //H5 | ||
137 | {0, CS24_SW8, CS23_SW8, CS22_SW8}, //H6 | ||
138 | {0, CS21_SW8, CS20_SW8, CS19_SW8}, //H7 | ||
139 | {0, CS18_SW8, CS17_SW8, CS16_SW8}, //H8 | ||
140 | {0, CS15_SW8, CS14_SW8, CS13_SW8}, //H9 | ||
141 | {0, CS12_SW8, CS11_SW8, CS10_SW8}, //H10 | ||
142 | {0, CS9_SW8 , CS8_SW8 , CS7_SW8 }, //H11 | ||
143 | {0, CS6_SW8 , CS5_SW8 , CS4_SW8 }, //H12 | ||
144 | {0, CS3_SW8 , CS2_SW8 , CS1_SW8 }, //H13 | ||
145 | |||
146 | {0, CS39_SW9, CS38_SW9, CS37_SW9}, //I1 | ||
147 | {0, CS36_SW9, CS35_SW9, CS34_SW9}, //I2 | ||
148 | {0, CS33_SW9, CS32_SW9, CS31_SW9}, //I3 | ||
149 | {0, CS30_SW9, CS29_SW9, CS28_SW9}, //I4 | ||
150 | {0, CS27_SW9, CS26_SW9, CS25_SW9}, //I5 | ||
151 | {0, CS24_SW9, CS23_SW9, CS22_SW9}, //I6 | ||
152 | {0, CS21_SW9, CS20_SW9, CS19_SW9}, //I7 | ||
153 | {0, CS18_SW9, CS17_SW9, CS16_SW9}, //I8 | ||
154 | {0, CS15_SW9, CS14_SW9, CS13_SW9}, //I9 | ||
155 | {0, CS12_SW9, CS11_SW9, CS10_SW9}, //I10 | ||
156 | {0, CS9_SW9 , CS8_SW9 , CS7_SW9 }, //I11 | ||
157 | {0, CS6_SW9 , CS5_SW9 , CS4_SW9 }, //I12 | ||
158 | {0, CS3_SW9 , CS2_SW9 , CS1_SW9 } //I13 | ||
159 | }; | ||
160 | |||
161 | __attribute__ ((weak)) | ||
162 | led_config_t g_led_config = { { | ||
163 | { -1+00+3 , NO_LED, -1+26+3 , -1+39+3 , -1+52+3 , -1+65+3 , -1+78+3 , -1+91+3 , -1+104+3 , -1+00+1 , -1+13+1 , -1+26+1 , -1+39+1 , -1+52+1 , -1+65+1 , -1+78+1 , -1+91+1 }, | ||
164 | { -1+00+4 , -1+13+4 , -1+26+4 , -1+39+4 , -1+52+4 , -1+65+4 , -1+78+4 , -1+91+4 , -1+104+4 , -1+00+2 , -1+13+2 , -1+26+2 , -1+39+2 , -1+52+2 , -1+65+2 , -1+78+2 , -1+91+2 }, | ||
165 | { -1+00+6 , -1+13+6 , -1+26+6 , -1+39+6 , -1+52+6 , -1+65+6 , -1+78+6 , -1+91+6 , -1+104+6 , -1+00+5 , -1+13+5 , -1+26+5 , -1+39+5 , -1+52+5 , -1+65+5 , -1+78+5 , -1+91+6 }, | ||
166 | { -1+00+8 , -1+13+8 , -1+26+8 , -1+39+8 , -1+52+8 , -1+65+8 , -1+78+8 , -1+91+8 , -1+104+8 , -1+00+7 , -1+13+7 , -1+26+7 , NO_LED , -1+52+7 , NO_LED , NO_LED , NO_LED }, | ||
167 | { -1+00+11, -1+13+11, -1+26+11, -1+39+11, -1+52+11, -1+65+11, -1+78+11, -1+91+11, -1+104+11, -1+00+10, -1+13+10, NO_LED , -1+52+10, NO_LED , NO_LED , -1+78+10, NO_LED }, | ||
168 | { -1+00+9 , -1+13+9 , -1+26+9 , NO_LED , NO_LED , -1+65+9 , NO_LED , NO_LED , NO_LED , NO_LED , -1+13+12, NO_LED , -1+39+12, -1+52+12, -1+65+12, -1+78+12, -1+91+12} | ||
169 | }, { | ||
170 | {123, 0}, {117, 15}, {0 , 0}, {0 , 15}, {123, 27}, {3 , 27}, {127, 40}, {5 , 40}, {2 , 64}, {133, 52}, {8 , 52}, {131, 64}, {255,255}, | ||
171 | {143, 0}, {130, 15}, {255,255}, {13 , 15}, {136, 27}, {19 , 27}, {140, 40}, {23 , 40}, {18 , 64}, {146, 52}, {29 , 52}, {148, 64}, {255,255}, | ||
172 | {156, 0}, {143, 15}, {26 , 0}, {26 , 15}, {149, 27}, {32 , 27}, {153, 40}, {36 , 40}, {34 , 64}, {255,255}, {42 , 52}, {255,255}, {255,255}, | ||
173 | {169, 0}, {156, 15}, {39 , 0}, {39 , 15}, {162, 27}, {45 , 27}, {255,255}, {49 , 40}, {255,255}, {255,255}, {55 , 52}, {164, 64}, {255,255}, | ||
174 | {182, 0}, {175, 15}, {52 , 0}, {52 , 15}, {179, 27}, {58 , 27}, {174, 40}, {62 , 40}, {255,255}, {170, 52}, {68 , 52}, {180, 64}, {255,255}, | ||
175 | {198, 0}, {198, 15}, {65 , 0}, {65 , 15}, {198, 27}, {71 , 27}, {255,255}, {75 , 40}, {83 , 64}, {255,255}, {81 , 52}, {198, 64}, {255,255}, | ||
176 | {211, 0}, {211, 15}, {84 , 0}, {78 , 15}, {211, 27}, {84 , 27}, {255,255}, {88 , 40}, {255,255}, {211, 52}, {94 , 52}, {211, 64}, {255,255}, | ||
177 | {224, 0}, {224, 15}, {97 , 0}, {91 , 15}, {224, 27}, {97 , 27}, {255,255}, {101, 40}, {255,255}, {255,255}, {107, 52}, {224, 64}, {255,255}, | ||
178 | {255,255}, {255,255}, {110, 0}, {104, 15}, {255,255}, {110, 27}, {255,255}, {114, 40}, {255,255}, {255,255}, {120, 52}, {255,255}, {255,255} | ||
179 | }, { | ||
180 | 1, 4, 1, 1, 4, 1, 4, 1, 1, 4, 1, 4, 4, //0-12 | ||
181 | 1, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, 1, 4, //13-25 | ||
182 | 1, 4, 1, 4, 4, 4, 4, 4, 1, 4, 4, 4, 4, //26-38 | ||
183 | 1, 4, 1, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, //39-51 | ||
184 | 1, 1, 1, 4, 1, 4, 1, 4, 4, 1, 4, 1, 4, //52-64 | ||
185 | 1, 1, 1, 4, 1, 4, 4, 4, 1, 4, 4, 1, 4, //65-77 | ||
186 | 1, 1, 1, 4, 1, 4, 4, 4, 4, 1, 4, 1, 4, //78-90 | ||
187 | 1, 1, 1, 4, 1, 4, 4, 4, 4, 4, 4, 1, 4, //91-103 | ||
188 | 4, 4, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 //104-116 | ||
189 | } }; | ||
190 | |||
191 | static void init(void) { | ||
192 | i2c_init(); | ||
193 | IS31FL3741_init(DRIVER_ADDR_1); | ||
194 | for (int index = 0; index < ISSI_DRIVER_TOTAL; index++) { | ||
195 | bool enabled = !( ( index == -1+0+13) || //A13 | ||
196 | ( index == -1+13+3) || //B3 | ||
197 | ( index == -1+13+13) || //B13 | ||
198 | ( index == -1+26+10) || //C10 | ||
199 | ( index == -1+26+12) || //C12 | ||
200 | ( index == -1+26+13) || //C13 | ||
201 | ( index == -1+39+7) || //D7 | ||
202 | ( index == -1+39+9) || //D9 | ||
203 | ( index == -1+39+10) || //D10 | ||
204 | ( index == -1+39+13) || //D13 | ||
205 | ( index == -1+52+9) || //E9 | ||
206 | ( index == -1+52+13) || //E13 | ||
207 | ( index == -1+65+7) || //F7 | ||
208 | ( index == -1+65+10) || //F10 | ||
209 | ( index == -1+65+13) || //F13 | ||
210 | ( index == -1+78+7) || //G7 | ||
211 | ( index == -1+78+9) || //G9 | ||
212 | ( index == -1+78+13) || //G13 | ||
213 | ( index == -1+91+7) || //H7 | ||
214 | ( index == -1+91+9) || //H9 | ||
215 | ( index == -1+91+10) || //H10 | ||
216 | ( index == -1+91+13) || //H13 | ||
217 | ( index == -1+104+1) || //I1 | ||
218 | ( index == -1+104+2) || //I2 | ||
219 | ( index == -1+104+5) || //I5 | ||
220 | ( index == -1+104+7) || //I7 | ||
221 | ( index == -1+104+9) || //I9 | ||
222 | ( index == -1+104+10) || //I10 | ||
223 | ( index == -1+104+12) || //I12 | ||
224 | ( index == -1+104+13) //I13 | ||
225 | ); | ||
226 | IS31FL3741_set_led_control_register(index, enabled, enabled, enabled); | ||
227 | } | ||
228 | IS31FL3741_update_led_control_registers(DRIVER_ADDR_1, 0); | ||
229 | } | ||
230 | |||
231 | static void flush(void) { | ||
232 | IS31FL3741_update_pwm_buffers(DRIVER_ADDR_1, 0); | ||
233 | // Just for reference. Only first driver is used? | ||
234 | // IS31FL3741_update_pwm_buffers(DRIVER_ADDR_2, 1); | ||
235 | } | ||
236 | |||
237 | const rgb_matrix_driver_t rgb_matrix_driver = { | ||
238 | .init = init, | ||
239 | .flush = flush, | ||
240 | .set_color = IS31FL3741_set_color, | ||
241 | .set_color_all = IS31FL3741_set_color_all | ||
242 | }; | ||
243 | #endif | ||
diff --git a/keyboards/xelus/pachi/rgb/rgb.h b/keyboards/xelus/pachi/rgb/rgb.h index 894519ebe..36ca2937a 100644 --- a/keyboards/xelus/pachi/rgb/rgb.h +++ b/keyboards/xelus/pachi/rgb/rgb.h | |||
@@ -17,20 +17,8 @@ | |||
17 | 17 | ||
18 | #include "quantum.h" | 18 | #include "quantum.h" |
19 | 19 | ||
20 | #define ____ KC_NO | 20 | #if defined(KEYBOARD_xelus_pachi_rgb_rev1) |
21 | 21 | #include "rev1.h" | |
22 | #define LAYOUT_ansi_tsangan( \ | 22 | #elif defined(KEYBOARD_xelus_pachi_rgb_rev2) |
23 | K000, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, \ | 23 | #include "rev2.h" |
24 | K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, \ | 24 | #endif |
25 | K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, \ | ||
26 | K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \ | ||
27 | K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K412, K415, \ | ||
28 | K500, K501, K502, K505, K510, K512, K513, K514, K515, K516 \ | ||
29 | ) { \ | ||
30 | { K000, ____, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016 }, \ | ||
31 | { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116 }, \ | ||
32 | { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216 }, \ | ||
33 | { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, ____, K313, ____, ____, ____ }, \ | ||
34 | { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, ____, K412, ____, ____, K415, ____ }, \ | ||
35 | { K500, K501, K502, ____, ____, K505, ____, ____, ____, ____, K510, ____, K512, K513, K514, K515, K516 } \ | ||
36 | } | ||