diff options
author | Xelus22 <17491233+Xelus22@users.noreply.github.com> | 2021-12-15 05:53:36 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-14 10:53:36 -0800 |
commit | 58fbafeeabc21e1f850b0e4672b5f1e4a5359ce5 (patch) | |
tree | af8661826080d54361b5aa89508ec63f89a85603 | |
parent | 99b35940bc4166eae3853c9e2fa94bd2be72742e (diff) | |
download | qmk_firmware-58fbafeeabc21e1f850b0e4672b5f1e4a5359ce5.tar.gz qmk_firmware-58fbafeeabc21e1f850b0e4672b5f1e4a5359ce5.zip |
[Keyboard] Add La+ (#15460)
-rwxr-xr-x | keyboards/xelus/la_plus/config.h | 106 | ||||
-rw-r--r-- | keyboards/xelus/la_plus/info.json | 83 | ||||
-rw-r--r-- | keyboards/xelus/la_plus/keymaps/default/config.h | 21 | ||||
-rwxr-xr-x | keyboards/xelus/la_plus/keymaps/default/keymap.c | 54 | ||||
-rwxr-xr-x | keyboards/xelus/la_plus/keymaps/default/readme.md | 2 | ||||
-rw-r--r-- | keyboards/xelus/la_plus/keymaps/via/config.h | 24 | ||||
-rwxr-xr-x | keyboards/xelus/la_plus/keymaps/via/keymap.c | 54 | ||||
-rwxr-xr-x | keyboards/xelus/la_plus/keymaps/via/readme.md | 2 | ||||
-rwxr-xr-x | keyboards/xelus/la_plus/keymaps/via/rules.mk | 1 | ||||
-rwxr-xr-x | keyboards/xelus/la_plus/la_plus.c | 111 | ||||
-rwxr-xr-x | keyboards/xelus/la_plus/la_plus.h | 50 | ||||
-rwxr-xr-x | keyboards/xelus/la_plus/readme.md | 18 | ||||
-rw-r--r-- | keyboards/xelus/la_plus/rgb_matrix_kb.inc | 59 | ||||
-rwxr-xr-x | keyboards/xelus/la_plus/rules.mk | 23 |
14 files changed, 608 insertions, 0 deletions
diff --git a/keyboards/xelus/la_plus/config.h b/keyboards/xelus/la_plus/config.h new file mode 100755 index 000000000..26064ebde --- /dev/null +++ b/keyboards/xelus/la_plus/config.h | |||
@@ -0,0 +1,106 @@ | |||
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 | #include "config_common.h" | ||
20 | |||
21 | /* USB Device descriptor parameter */ | ||
22 | #define VENDOR_ID 0x5845 // XE | ||
23 | #define PRODUCT_ID 0x4C50 // LP | ||
24 | #define DEVICE_VER 0x0001 | ||
25 | #define MANUFACTURER Xelus | ||
26 | #define PRODUCT MechaMaker La+ | ||
27 | |||
28 | /* key matrix size */ | ||
29 | #define MATRIX_ROWS 5 | ||
30 | #define MATRIX_COLS 15 | ||
31 | |||
32 | /* key matrix pins */ | ||
33 | #define MATRIX_ROW_PINS { B0, B1, F0, F4, F5 } | ||
34 | #define MATRIX_COL_PINS { E6, D5, B2, B3, D3, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4 } | ||
35 | #define UNUSED_PINS | ||
36 | |||
37 | /* COL2ROW or ROW2COL */ | ||
38 | #define DIODE_DIRECTION COL2ROW | ||
39 | |||
40 | /* Set 0 if debouncing isn't needed */ | ||
41 | #define DEBOUNCE 5 | ||
42 | |||
43 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
44 | #define LOCKING_SUPPORT_ENABLE | ||
45 | |||
46 | /* Locking resynchronize hack */ | ||
47 | #define LOCKING_RESYNC_ENABLE | ||
48 | |||
49 | // RGB Matrix | ||
50 | // The pin connected to the data pin of the LEDs | ||
51 | #define RGB_DI_PIN F1 | ||
52 | // The number of LEDs connected | ||
53 | #define DRIVER_LED_TOTAL 32 | ||
54 | |||
55 | #define RGB_MATRIX_STARTUP_VAL 80 | ||
56 | #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended | ||
57 | #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL | ||
58 | #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180 | ||
59 | |||
60 | #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN | ||
61 | #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT | ||
62 | #define ENABLE_RGB_MATRIX_BREATHING | ||
63 | #define ENABLE_RGB_MATRIX_BAND_SAT | ||
64 | #define ENABLE_RGB_MATRIX_BAND_VAL | ||
65 | #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT | ||
66 | #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL | ||
67 | #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT | ||
68 | #define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL | ||
69 | #define ENABLE_RGB_MATRIX_CYCLE_ALL | ||
70 | #define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT | ||
71 | #define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN | ||
72 | #define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON | ||
73 | #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN | ||
74 | #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL | ||
75 | #define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL | ||
76 | #define ENABLE_RGB_MATRIX_CYCLE_SPIRAL | ||
77 | #define ENABLE_RGB_MATRIX_DUAL_BEACON | ||
78 | #define ENABLE_RGB_MATRIX_RAINBOW_BEACON | ||
79 | #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS | ||
80 | #define ENABLE_RGB_MATRIX_RAINDROPS | ||
81 | #define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS | ||
82 | #define ENABLE_RGB_MATRIX_HUE_BREATHING | ||
83 | #define ENABLE_RGB_MATRIX_HUE_PENDULUM | ||
84 | #define ENABLE_RGB_MATRIX_HUE_WAVE | ||
85 | #define ENABLE_RGB_MATRIX_FRACTAL | ||
86 | #define ENABLE_RGB_MATRIX_PIXEL_RAIN | ||
87 | |||
88 | #define ENABLE_RGB_MATRIX_TYPING_HEATMAP | ||
89 | #define ENABLE_RGB_MATRIX_DIGITAL_RAIN | ||
90 | |||
91 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE | ||
92 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE | ||
93 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE | ||
94 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE | ||
95 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS | ||
96 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS | ||
97 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS | ||
98 | #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS | ||
99 | #define ENABLE_RGB_MATRIX_SPLASH | ||
100 | #define ENABLE_RGB_MATRIX_MULTISPLASH | ||
101 | #define ENABLE_RGB_MATRIX_SOLID_SPLASH | ||
102 | #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH | ||
103 | |||
104 | // Custom Startup Animation | ||
105 | // comment out for solid animation | ||
106 | // #define STARTUP_ANIMATION_DOTS | ||
diff --git a/keyboards/xelus/la_plus/info.json b/keyboards/xelus/la_plus/info.json new file mode 100644 index 000000000..bfa3a4dc2 --- /dev/null +++ b/keyboards/xelus/la_plus/info.json | |||
@@ -0,0 +1,83 @@ | |||
1 | { | ||
2 | "keyboard_name": "La+", | ||
3 | "url": "", | ||
4 | "maintainer": "Xelus22", | ||
5 | "layouts": { | ||
6 | "LAYOUT_all": { | ||
7 | "layout": [ | ||
8 | {"x":0, "y":0}, | ||
9 | {"x":1, "y":0}, | ||
10 | {"x":2, "y":0}, | ||
11 | {"x":3, "y":0}, | ||
12 | {"x":4, "y":0}, | ||
13 | {"x":5, "y":0}, | ||
14 | {"x":6, "y":0}, | ||
15 | {"x":7, "y":0}, | ||
16 | {"x":8, "y":0}, | ||
17 | {"x":9, "y":0}, | ||
18 | {"x":10, "y":0}, | ||
19 | {"x":11, "y":0}, | ||
20 | {"x":12, "y":0}, | ||
21 | {"x":13, "y":0}, | ||
22 | {"x":14, "y":0}, | ||
23 | {"x":15, "y":0}, | ||
24 | |||
25 | {"x":0, "y":1, "w":1.5}, | ||
26 | {"x":1.5, "y":1}, | ||
27 | {"x":2.5, "y":1}, | ||
28 | {"x":3.5, "y":1}, | ||
29 | {"x":4.5, "y":1}, | ||
30 | {"x":5.5, "y":1}, | ||
31 | {"x":6.5, "y":1}, | ||
32 | {"x":7.5, "y":1}, | ||
33 | {"x":8.5, "y":1}, | ||
34 | {"x":9.5, "y":1}, | ||
35 | {"x":10.5, "y":1}, | ||
36 | {"x":11.5, "y":1}, | ||
37 | {"x":12.5, "y":1}, | ||
38 | {"x":13.5, "y":1, "w":1.5}, | ||
39 | {"x":15, "y":1}, | ||
40 | |||
41 | {"x":0, "y":2, "w":1.75}, | ||
42 | {"x":1.75, "y":2}, | ||
43 | {"x":2.75, "y":2}, | ||
44 | {"x":3.75, "y":2}, | ||
45 | {"x":4.75, "y":2}, | ||
46 | {"x":5.75, "y":2}, | ||
47 | {"x":6.75, "y":2}, | ||
48 | {"x":7.75, "y":2}, | ||
49 | {"x":8.75, "y":2}, | ||
50 | {"x":9.75, "y":2}, | ||
51 | {"x":10.75, "y":2}, | ||
52 | {"label":"\"", "x":11.75, "y":2}, | ||
53 | {"x":12.75, "y":2, "w":2.25}, | ||
54 | {"x":15, "y":2}, | ||
55 | |||
56 | {"x":0, "y":3, "w":2.25}, | ||
57 | {"x":2.25, "y":3}, | ||
58 | {"x":3.25, "y":3}, | ||
59 | {"x":4.25, "y":3}, | ||
60 | {"x":5.25, "y":3}, | ||
61 | {"x":6.25, "y":3}, | ||
62 | {"x":7.25, "y":3}, | ||
63 | {"x":8.25, "y":3}, | ||
64 | {"x":9.25, "y":3}, | ||
65 | {"x":10.25, "y":3}, | ||
66 | {"x":11.25, "y":3}, | ||
67 | {"x":12.25, "y":3, "w":1.75}, | ||
68 | {"x":14, "y":3}, | ||
69 | {"x":15, "y":3}, | ||
70 | |||
71 | {"x":0, "y":4, "w":1.25}, | ||
72 | {"x":1.25, "y":4, "w":1.25}, | ||
73 | {"x":2.5, "y":4, "w":1.25}, | ||
74 | {"x":3.75, "y":4, "w":6.25}, | ||
75 | {"x":10, "y":4, "w":1.5}, | ||
76 | {"x":11.5, "y":4, "w":1.5}, | ||
77 | {"x":13, "y":4}, | ||
78 | {"x":14, "y":4}, | ||
79 | {"x":15, "y":4} | ||
80 | ] | ||
81 | } | ||
82 | } | ||
83 | } | ||
diff --git a/keyboards/xelus/la_plus/keymaps/default/config.h b/keyboards/xelus/la_plus/keymaps/default/config.h new file mode 100644 index 000000000..393166c4f --- /dev/null +++ b/keyboards/xelus/la_plus/keymaps/default/config.h | |||
@@ -0,0 +1,21 @@ | |||
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 | #define USB_POLLING_INTERVAL_MS 1 | ||
20 | #define QMK_KEYS_PER_SCAN 4 | ||
21 | |||
diff --git a/keyboards/xelus/la_plus/keymaps/default/keymap.c b/keyboards/xelus/la_plus/keymaps/default/keymap.c new file mode 100755 index 000000000..cf04368e5 --- /dev/null +++ b/keyboards/xelus/la_plus/keymaps/default/keymap.c | |||
@@ -0,0 +1,54 @@ | |||
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 | #include QMK_KEYBOARD_H | ||
17 | |||
18 | #define KB_SUAC STARTUP_ANIMATION_CONFIG | ||
19 | |||
20 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
21 | |||
22 | // Default layer | ||
23 | [0] = LAYOUT_all( | ||
24 | KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, KC_HOME, | ||
25 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGUP, | ||
26 | KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, | ||
27 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, | ||
28 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), | ||
29 | |||
30 | // Fn1 Layer | ||
31 | [1] = LAYOUT_all( | ||
32 | KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, KB_SUAC, | ||
33 | KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, | ||
34 | KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
35 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
36 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | ||
37 | |||
38 | // Fn2 Layer | ||
39 | [2] = LAYOUT_all( | ||
40 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
41 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
42 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
43 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
44 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | ||
45 | |||
46 | // Fn3 Layer | ||
47 | [3] = LAYOUT_all( | ||
48 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
49 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
50 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
51 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
52 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | ||
53 | }; | ||
54 | |||
diff --git a/keyboards/xelus/la_plus/keymaps/default/readme.md b/keyboards/xelus/la_plus/keymaps/default/readme.md new file mode 100755 index 000000000..779f6a019 --- /dev/null +++ b/keyboards/xelus/la_plus/keymaps/default/readme.md | |||
@@ -0,0 +1,2 @@ | |||
1 | # The Default La+ Layout | ||
2 | |||
diff --git a/keyboards/xelus/la_plus/keymaps/via/config.h b/keyboards/xelus/la_plus/keymaps/via/config.h new file mode 100644 index 000000000..ef2ec4205 --- /dev/null +++ b/keyboards/xelus/la_plus/keymaps/via/config.h | |||
@@ -0,0 +1,24 @@ | |||
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 | // Enable RGB Matrix | ||
20 | #define VIA_QMK_RGBLIGHT_ENABLE | ||
21 | |||
22 | #define USB_POLLING_INTERVAL_MS 1 | ||
23 | #define QMK_KEYS_PER_SCAN 4 | ||
24 | |||
diff --git a/keyboards/xelus/la_plus/keymaps/via/keymap.c b/keyboards/xelus/la_plus/keymaps/via/keymap.c new file mode 100755 index 000000000..cf04368e5 --- /dev/null +++ b/keyboards/xelus/la_plus/keymaps/via/keymap.c | |||
@@ -0,0 +1,54 @@ | |||
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 | #include QMK_KEYBOARD_H | ||
17 | |||
18 | #define KB_SUAC STARTUP_ANIMATION_CONFIG | ||
19 | |||
20 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
21 | |||
22 | // Default layer | ||
23 | [0] = LAYOUT_all( | ||
24 | KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, KC_HOME, | ||
25 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGUP, | ||
26 | KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, | ||
27 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, | ||
28 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), | ||
29 | |||
30 | // Fn1 Layer | ||
31 | [1] = LAYOUT_all( | ||
32 | KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, KB_SUAC, | ||
33 | KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, | ||
34 | KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
35 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
36 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | ||
37 | |||
38 | // Fn2 Layer | ||
39 | [2] = LAYOUT_all( | ||
40 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
41 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
42 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
43 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
44 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | ||
45 | |||
46 | // Fn3 Layer | ||
47 | [3] = LAYOUT_all( | ||
48 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
49 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
50 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
51 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
52 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | ||
53 | }; | ||
54 | |||
diff --git a/keyboards/xelus/la_plus/keymaps/via/readme.md b/keyboards/xelus/la_plus/keymaps/via/readme.md new file mode 100755 index 000000000..705b9df41 --- /dev/null +++ b/keyboards/xelus/la_plus/keymaps/via/readme.md | |||
@@ -0,0 +1,2 @@ | |||
1 | # The VIA La+ Layout | ||
2 | |||
diff --git a/keyboards/xelus/la_plus/keymaps/via/rules.mk b/keyboards/xelus/la_plus/keymaps/via/rules.mk new file mode 100755 index 000000000..1e5b99807 --- /dev/null +++ b/keyboards/xelus/la_plus/keymaps/via/rules.mk | |||
@@ -0,0 +1 @@ | |||
VIA_ENABLE = yes | |||
diff --git a/keyboards/xelus/la_plus/la_plus.c b/keyboards/xelus/la_plus/la_plus.c new file mode 100755 index 000000000..41358c359 --- /dev/null +++ b/keyboards/xelus/la_plus/la_plus.c | |||
@@ -0,0 +1,111 @@ | |||
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 "la_plus.h" | ||
18 | #include "print.h" | ||
19 | |||
20 | #define _____ NO_LED | ||
21 | |||
22 | keyboard_config_t keyboard_config; | ||
23 | |||
24 | led_config_t g_led_config = { { | ||
25 | // Key Matrix to LED Index | ||
26 | { _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____ }, \ | ||
27 | { _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____ }, \ | ||
28 | { _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____ }, \ | ||
29 | { _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____ }, \ | ||
30 | { _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____ } \ | ||
31 | }, { | ||
32 | // LED Index to Physical Position | ||
33 | { 2, 38 }, | ||
34 | { 0, 31 }, | ||
35 | { 2, 24 }, | ||
36 | { 0, 17 }, | ||
37 | { 2, 10 }, | ||
38 | { 0, 4 }, | ||
39 | { 4, 1 }, | ||
40 | { 14, 1 }, | ||
41 | { 30, 1 }, | ||
42 | { 47, 1 }, | ||
43 | { 63, 1 }, | ||
44 | { 79, 1 }, | ||
45 | { 95, 1 }, | ||
46 | {111, 1 }, | ||
47 | {144, 1 }, | ||
48 | {159, 1 }, | ||
49 | {176, 1 }, | ||
50 | {192, 1 }, | ||
51 | {208, 1 }, | ||
52 | {224, 1 }, | ||
53 | {241, 1 }, | ||
54 | {250, 0 }, | ||
55 | {255, 4 }, | ||
56 | {253, 10 }, | ||
57 | {255, 17 }, | ||
58 | {253, 24 }, | ||
59 | {255, 31 }, | ||
60 | {253, 38 }, | ||
61 | {241, 64 }, | ||
62 | {165, 64 }, | ||
63 | { 90, 64 }, | ||
64 | { 14, 64 } | ||
65 | }, { | ||
66 | // LED Index to Flag | ||
67 | 8, 8, 8, 8, 8, 8, 8, 8, | ||
68 | 8, 8, 8, 8, 8, 8, 8, 8, | ||
69 | 8, 8, 8, 8, 8, 8, 8, 8, | ||
70 | 8, 8, 8, 8, 8, 8, 8, 8 | ||
71 | } }; | ||
72 | |||
73 | void keyboard_post_init_kb(void) { | ||
74 | // Call the post init code. | ||
75 | // debug_enable=true; | ||
76 | |||
77 | keyboard_config.raw = eeconfig_read_kb(); | ||
78 | if (keyboard_config.startup_animation_dots) { | ||
79 | rgb_matrix_mode_noeeprom(RGB_MATRIX_CUSTOM_startup_animation_dots); | ||
80 | } else { | ||
81 | rgb_matrix_mode_noeeprom(RGB_MATRIX_CUSTOM_startup_animation_solid); | ||
82 | } | ||
83 | |||
84 | keyboard_post_init_user(); | ||
85 | } | ||
86 | |||
87 | void eeconfig_init_kb(void) { | ||
88 | #ifdef STARTUP_ANIMATION_DOTS | ||
89 | keyboard_config.startup_animation_dots = false; | ||
90 | #else | ||
91 | keyboard_config.startup_animation_dots = true; | ||
92 | #endif | ||
93 | eeconfig_update_kb(keyboard_config.raw); | ||
94 | eeconfig_init_user(); | ||
95 | } | ||
96 | |||
97 | bool process_record_kb(uint16_t keycode, keyrecord_t *record) { | ||
98 | if (!process_record_user(keycode, record)) { | ||
99 | return false; | ||
100 | } | ||
101 | |||
102 | if (keycode == STARTUP_ANIMATION_CONFIG && record->event.pressed) { | ||
103 | keyboard_config.startup_animation_dots = !(keyboard_config.startup_animation_dots); | ||
104 | #ifdef CONSOLE_ENABLE | ||
105 | uprintf("keyboard_config startup_animation_dots: %b\n", keyboard_config.startup_animation_dots); | ||
106 | #endif | ||
107 | eeconfig_update_kb(keyboard_config.raw); | ||
108 | } | ||
109 | |||
110 | return true; | ||
111 | } | ||
diff --git a/keyboards/xelus/la_plus/la_plus.h b/keyboards/xelus/la_plus/la_plus.h new file mode 100755 index 000000000..f19b79237 --- /dev/null +++ b/keyboards/xelus/la_plus/la_plus.h | |||
@@ -0,0 +1,50 @@ | |||
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 | #include "quantum.h" | ||
20 | |||
21 | #define ____ KC_NO | ||
22 | |||
23 | #define LAYOUT_all( \ | ||
24 | K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K213, K014, \ | ||
25 | K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ | ||
26 | K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \ | ||
27 | K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K312, K313, K314, \ | ||
28 | K400, K401, K402, K408, K409, K410, K412, K413, K414 \ | ||
29 | ) { \ | ||
30 | { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ | ||
31 | { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ | ||
32 | { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \ | ||
33 | { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, ____, K312, K313, K314 }, \ | ||
34 | { K400, K401, K402, ____, ____, ____, ____, ____, K408, K409, K410, ____, K412, K413, K414 } \ | ||
35 | } | ||
36 | |||
37 | typedef union { | ||
38 | uint32_t raw; | ||
39 | struct { | ||
40 | bool startup_animation_dots; | ||
41 | }; | ||
42 | } keyboard_config_t; | ||
43 | |||
44 | enum la_plus_keycodes { | ||
45 | #ifdef VIA_ENABLE | ||
46 | STARTUP_ANIMATION_CONFIG = USER00, | ||
47 | #else | ||
48 | STARTUP_ANIMATION_CONFIG = SAFE_RANGE, | ||
49 | #endif | ||
50 | }; | ||
diff --git a/keyboards/xelus/la_plus/readme.md b/keyboards/xelus/la_plus/readme.md new file mode 100755 index 000000000..3ea9bb9f9 --- /dev/null +++ b/keyboards/xelus/la_plus/readme.md | |||
@@ -0,0 +1,18 @@ | |||
1 | # La+ PCB | ||
2 | |||
3 | A gasket 65% keyboard by Mechamaker | ||
4 | |||
5 | * Keyboard Maintainer: [Xelus22](https://github.com/Xelus22) | ||
6 | * Hardware Supported: La+ | ||
7 | * Hardware Availability: Custom keyboard group buys | ||
8 | |||
9 | Make example for this keyboard (after setting up your build environment): | ||
10 | |||
11 | make xelus/la_plus:default | ||
12 | |||
13 | Reset your keyboard in 3 ways: | ||
14 | * Software reset on Fn + Backspace | ||
15 | * Bootmagic reset: hold down the top left key (usually escape) and plugin the keyboard | ||
16 | * Physical reset: on the back of the PCB, there is a ISP header which you should short the RST and GND together | ||
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/la_plus/rgb_matrix_kb.inc b/keyboards/xelus/la_plus/rgb_matrix_kb.inc new file mode 100644 index 000000000..aee484cdb --- /dev/null +++ b/keyboards/xelus/la_plus/rgb_matrix_kb.inc | |||
@@ -0,0 +1,59 @@ | |||
1 | // Step 1. | ||
2 | // Declare custom effects using the RGB_MATRIX_EFFECT macro | ||
3 | // (note the lack of semicolon after the macro!) | ||
4 | RGB_MATRIX_EFFECT(startup_animation_dots) | ||
5 | RGB_MATRIX_EFFECT(startup_animation_solid) | ||
6 | |||
7 | // Step 2. | ||
8 | // Define effects inside the `RGB_MATRIX_CUSTOM_EFFECT_IMPLS` ifdef block | ||
9 | #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS | ||
10 | |||
11 | #include "eeprom.h" | ||
12 | #include "eeconfig.h" | ||
13 | |||
14 | static void startup_animation_setleds(effect_params_t* params, bool dots) { | ||
15 | uint8_t factor = 5; | ||
16 | HSV hsv = rgb_matrix_config.hsv; | ||
17 | RGB rgb = rgb_matrix_hsv_to_rgb(hsv); | ||
18 | if (dots) { | ||
19 | rgb_matrix_set_color_all(0, 0, 0); | ||
20 | } | ||
21 | int32_t num = (g_rgb_timer & (0b11111 << factor)) >> factor; | ||
22 | |||
23 | if (num == 17 || num == 18 || num == 19 || | ||
24 | num == 20 || num == 21) { | ||
25 | if (dots == true) { | ||
26 | for (int i = 0; i < 28; i++) { | ||
27 | rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); | ||
28 | } | ||
29 | } | ||
30 | return; | ||
31 | } else if (num == 0 || num == 1 || num == 2) { | ||
32 | return; | ||
33 | } else if (num >= 22) { | ||
34 | eeprom_read_block(&rgb_matrix_config, EECONFIG_RGB_MATRIX, sizeof(rgb_matrix_config)); | ||
35 | rgb_matrix_mode_noeeprom(rgb_matrix_config.mode); | ||
36 | return; | ||
37 | } | ||
38 | |||
39 | int32_t num2 = (27/2) + num - 2; | ||
40 | int32_t num1 = 27 - num2; | ||
41 | #ifdef CONSOLE_ENABLE | ||
42 | uprintf("num: %u\n", num); | ||
43 | uprintf("num1: %u\n", num1); | ||
44 | uprintf("num2: %u\n", num2); | ||
45 | #endif | ||
46 | rgb_matrix_set_color(num1, rgb.r, rgb.g, rgb.b); | ||
47 | rgb_matrix_set_color(num2, rgb.r, rgb.g, rgb.b); | ||
48 | } | ||
49 | |||
50 | static bool startup_animation_dots(effect_params_t* params) { | ||
51 | startup_animation_setleds(params, true); | ||
52 | return false; | ||
53 | } | ||
54 | static bool startup_animation_solid(effect_params_t* params) { | ||
55 | startup_animation_setleds(params, false); | ||
56 | return false; | ||
57 | } | ||
58 | |||
59 | #endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS | ||
diff --git a/keyboards/xelus/la_plus/rules.mk b/keyboards/xelus/la_plus/rules.mk new file mode 100755 index 000000000..440396715 --- /dev/null +++ b/keyboards/xelus/la_plus/rules.mk | |||
@@ -0,0 +1,23 @@ | |||
1 | # MCU name | ||
2 | MCU = atmega32u4 | ||
3 | |||
4 | # Bootloader selection | ||
5 | BOOTLOADER = atmel-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 | NKRO_ENABLE = yes # Enable N-Key Rollover | ||
16 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
17 | AUDIO_ENABLE = no # Audio output | ||
18 | |||
19 | RGB_MATRIX_ENABLE = yes | ||
20 | RGB_MATRIX_DRIVER = WS2812 | ||
21 | RGB_MATRIX_CUSTOM_KB = yes | ||
22 | |||
23 | LTO_ENABLE = yes | ||