diff options
author | mechlovin <57231893+mechlovin@users.noreply.github.com> | 2021-12-25 08:47:35 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-24 17:47:35 -0800 |
commit | 94fe31609e41902c0cf579f2d2601ad8b54c5d3f (patch) | |
tree | f8faba00cc7feaa999009ae05ab09f6e21a24d45 | |
parent | e1303a30d23e6ffb782d76cada2c144c2094f1f7 (diff) | |
download | qmk_firmware-94fe31609e41902c0cf579f2d2601ad8b54c5d3f.tar.gz qmk_firmware-94fe31609e41902c0cf579f2d2601ad8b54c5d3f.zip |
[Keyboard] Add LZ erGhost (#15451)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
-rw-r--r-- | keyboards/lz/erghost/config.h | 92 | ||||
-rw-r--r-- | keyboards/lz/erghost/erghost.c | 17 | ||||
-rw-r--r-- | keyboards/lz/erghost/erghost.h | 67 | ||||
-rw-r--r-- | keyboards/lz/erghost/info.json | 16 | ||||
-rw-r--r-- | keyboards/lz/erghost/keymaps/default/keymap.c | 27 | ||||
-rw-r--r-- | keyboards/lz/erghost/keymaps/default/readme.md | 1 | ||||
-rw-r--r-- | keyboards/lz/erghost/keymaps/via/keymap.c | 51 | ||||
-rw-r--r-- | keyboards/lz/erghost/keymaps/via/readme.md | 1 | ||||
-rw-r--r-- | keyboards/lz/erghost/keymaps/via/rules.mk | 2 | ||||
-rw-r--r-- | keyboards/lz/erghost/matrix.c | 344 | ||||
-rw-r--r-- | keyboards/lz/erghost/readme.md | 27 | ||||
-rw-r--r-- | keyboards/lz/erghost/rules.mk | 21 |
12 files changed, 666 insertions, 0 deletions
diff --git a/keyboards/lz/erghost/config.h b/keyboards/lz/erghost/config.h new file mode 100644 index 000000000..74867baf7 --- /dev/null +++ b/keyboards/lz/erghost/config.h | |||
@@ -0,0 +1,92 @@ | |||
1 | /* | ||
2 | Copyright 2021 Mechlovin' Studio | ||
3 | |||
4 | This program is free software: you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Public License as published by | ||
6 | the Free Software Foundation, either version 2 of the License, or | ||
7 | (at your option) any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU General Public License | ||
15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | ||
17 | |||
18 | #pragma once | ||
19 | |||
20 | #include "config_common.h" | ||
21 | |||
22 | /* USB Device descriptor parameter */ | ||
23 | #define VENDOR_ID 0x6C7A | ||
24 | #define PRODUCT_ID 0x0002 | ||
25 | #define DEVICE_VER 0x0001 | ||
26 | #define MANUFACTURER Mechlovin Studio | ||
27 | #define PRODUCT erGhost | ||
28 | |||
29 | /* key matrix size */ | ||
30 | #define MATRIX_ROWS 6 | ||
31 | #define MATRIX_COLS 17 | ||
32 | |||
33 | /* | ||
34 | * Keyboard Matrix Assignments | ||
35 | * | ||
36 | * Change this to how you wired your keyboard | ||
37 | * COLS: AVR pins used for columns, left to right | ||
38 | * ROWS: AVR pins used for rows, top to bottom | ||
39 | * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) | ||
40 | * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) | ||
41 | * | ||
42 | */ | ||
43 | #define MATRIX_ROW_PINS { D5, D2, D4, D3, D0, D1 } | ||
44 | #define UNUSED_PINS | ||
45 | |||
46 | /* COL2ROW, ROW2COL*/ | ||
47 | #define DIODE_DIRECTION ROW2COL | ||
48 | |||
49 | #define USB_POLLING_INTERVAL_MS 1 | ||
50 | |||
51 | |||
52 | #define LED_NUM_LOCK_PIN D7 | ||
53 | #define LED_CAPS_LOCK_PIN D6 | ||
54 | #define LED_SCROLL_LOCK_PIN B4 | ||
55 | #define LED_PIN_ON_STATE 1 | ||
56 | |||
57 | #define BACKLIGHT_PIN B6 | ||
58 | #define BACKLIGHT_LEVELS 3 | ||
59 | #define BACKLIGHT_BREATHING | ||
60 | |||
61 | #ifdef RGBLIGHT_ENABLE | ||
62 | #define RGB_DI_PIN E2 | ||
63 | #define RGBLED_NUM 28 | ||
64 | #define RGBLIGHT_HUE_STEP 8 | ||
65 | #define RGBLIGHT_SAT_STEP 8 | ||
66 | #define RGBLIGHT_VAL_STEP 8 | ||
67 | #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ | ||
68 | #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ | ||
69 | /*== all animations enable ==*/ | ||
70 | // #define RGBLIGHT_ANIMATIONS | ||
71 | /*== or choose animations ==*/ | ||
72 | # define RGBLIGHT_EFFECT_STATIC_LIGHT | ||
73 | # define RGBLIGHT_EFFECT_BREATHING | ||
74 | # define RGBLIGHT_EFFECT_RAINBOW_MOOD | ||
75 | # define RGBLIGHT_EFFECT_RAINBOW_SWIRL | ||
76 | # define RGBLIGHT_EFFECT_SNAKE | ||
77 | # define RGBLIGHT_EFFECT_KNIGHT | ||
78 | # define RGBLIGHT_EFFECT_CHRISTMAS | ||
79 | # define RGBLIGHT_EFFECT_STATIC_GRADIENT | ||
80 | # define RGBLIGHT_EFFECT_RGB_TEST | ||
81 | # define RGBLIGHT_EFFECT_ALTERNATING | ||
82 | # define RGBLIGHT_EFFECT_TWINKLE | ||
83 | /*== customize breathing effect ==*/ | ||
84 | /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ | ||
85 | //# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 | ||
86 | /*==== use exp() and sin() ====*/ | ||
87 | //# define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 | ||
88 | //# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 | ||
89 | #endif | ||
90 | |||
91 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
92 | #define DEBOUNCE 5 | ||
diff --git a/keyboards/lz/erghost/erghost.c b/keyboards/lz/erghost/erghost.c new file mode 100644 index 000000000..7ea321e12 --- /dev/null +++ b/keyboards/lz/erghost/erghost.c | |||
@@ -0,0 +1,17 @@ | |||
1 | /* Copyright 2021 Mechlovin | ||
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 "erghost.h" | ||
diff --git a/keyboards/lz/erghost/erghost.h b/keyboards/lz/erghost/erghost.h new file mode 100644 index 000000000..5f5244340 --- /dev/null +++ b/keyboards/lz/erghost/erghost.h | |||
@@ -0,0 +1,67 @@ | |||
1 | /* Copyright 2021 Mechlovin | ||
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 LAYOUT_all( \ | ||
22 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, K0F, K0G, \ | ||
23 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K0D, K1E, K1F, K1G, \ | ||
24 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, \ | ||
25 | K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ | ||
26 | K40, K41, K42, K43, K44, K45, K46, K57, K47, K48, K49, K4A, K4B, K4C, K4D, K4F, \ | ||
27 | K50, K51, K52, K54, K55, K56, K58, K59, K5A, K5B, K5C, K5D, K5E, K5F, K5G \ | ||
28 | ) { \ | ||
29 | { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G }, \ | ||
30 | { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G }, \ | ||
31 | { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G }, \ | ||
32 | { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO, KC_NO, KC_NO }, \ | ||
33 | { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, KC_NO, K4F, KC_NO }, \ | ||
34 | { K50, K51, K52, KC_NO, K54, K55, K56, K57, K58, K59, K5A, K5B, K5C, K5D, K5E, K5F, K5G }, \ | ||
35 | } | ||
36 | |||
37 | #define LAYOUT_ansi( \ | ||
38 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, K0F, K0G, \ | ||
39 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, \ | ||
40 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, \ | ||
41 | K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ | ||
42 | K40, K42, K43, K44, K45, K46, K57, K47, K48, K49, K4A, K4B, K4C, K4F, \ | ||
43 | K50, K51, K52, K54, K55, K56, K58, K59, K5A, K5B, K5C, K5D, K5E, K5F, K5G \ | ||
44 | ) { \ | ||
45 | { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E, K0F, K0G }, \ | ||
46 | { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G }, \ | ||
47 | { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G }, \ | ||
48 | { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, KC_NO, KC_NO, KC_NO }, \ | ||
49 | { K40, KC_NO, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, KC_NO, KC_NO, K4F, KC_NO }, \ | ||
50 | { K50, K51, K52, KC_NO, K54, K55, K56, K57, K58, K59, K5A, K5B, K5C, K5D, K5E, K5F, K5G }, \ | ||
51 | } | ||
52 | |||
53 | #define LAYOUT_iso( \ | ||
54 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, K0F, K0G, \ | ||
55 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, \ | ||
56 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2E, K2F, K2G, \ | ||
57 | K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ | ||
58 | K40, K41, K42, K43, K44, K45, K46, K57, K47, K48, K49, K4A, K4B, K4C, K4D, K4F, \ | ||
59 | K50, K51, K52, K54, K55, K56, K58, K59, K5A, K5B, K5C, K5D, K5E, K5F, K5G \ | ||
60 | ) { \ | ||
61 | { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E, K0F, K0G }, \ | ||
62 | { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G }, \ | ||
63 | { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, KC_NO, K2E, K2F, K2G }, \ | ||
64 | { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO, KC_NO, KC_NO }, \ | ||
65 | { K40, KC_NO, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, KC_NO, K4F, KC_NO }, \ | ||
66 | { K50, K51, K52, KC_NO, K54, K55, K56, K57, K58, K59, K5A, K5B, K5C, K5D, K5E, K5F, K5G }, \ | ||
67 | } | ||
diff --git a/keyboards/lz/erghost/info.json b/keyboards/lz/erghost/info.json new file mode 100644 index 000000000..1a5c9abf6 --- /dev/null +++ b/keyboards/lz/erghost/info.json | |||
@@ -0,0 +1,16 @@ | |||
1 | { | ||
2 | "keyboard_name": "Erghost", | ||
3 | "url": "", | ||
4 | "maintainer": "Mechlovin' Studio", | ||
5 | "layouts": { | ||
6 | "LAYOUT_all": { | ||
7 | "layout": [{"label":"0,0", "x":0, "y":0}, {"label":"0,1", "x":2, "y":0}, {"label":"0,2", "x":3, "y":0}, {"label":"0,3", "x":4, "y":0}, {"label":"0,4", "x":5, "y":0}, {"label":"0,5", "x":6, "y":0}, {"label":"0,6", "x":8.75, "y":0}, {"label":"0,7", "x":9.75, "y":0}, {"label":"0,8", "x":10.75, "y":0}, {"label":"0,9", "x":11.75, "y":0}, {"label":"0,10", "x":12.75, "y":0}, {"label":"0,11", "x":13.75, "y":0}, {"label":"0,12", "x":14.75, "y":0}, {"label":"0,14", "x":17, "y":0}, {"label":"0,15", "x":18, "y":0}, {"label":"0,16", "x":19, "y":0}, {"label":"1,0", "x":0, "y":1.25}, {"label":"1,1", "x":1, "y":1.25}, {"label":"1,2", "x":2, "y":1.25}, {"label":"1,3", "x":3, "y":1.25}, {"label":"1,4", "x":4, "y":1.25}, {"label":"1,5", "x":5, "y":1.25}, {"label":"1,6", "x":6, "y":1.25}, {"label":"1,7", "x":8.75, "y":1.25}, {"label":"1,8", "x":9.75, "y":1.25}, {"label":"1,9", "x":10.75, "y":1.25}, {"label":"1,10", "x":11.75, "y":1.25}, {"label":"1,11", "x":12.75, "y":1.25}, {"label":"1,12", "x":13.75, "y":1.25}, {"label":"1,13", "x":14.75, "y":1.25}, {"label":"0,13", "x":15.75, "y":1.25}, {"label":"1,14", "x":17, "y":1.25}, {"label":"1,15", "x":18, "y":1.25}, {"label":"1,16", "x":19, "y":1.25}, {"label":"2,0", "x":0, "y":2.25, "w":1.5}, {"label":"2,1", "x":1.5, "y":2.25}, {"label":"2,2", "x":2.5, "y":2.25}, {"label":"2,3", "x":3.5, "y":2.25}, {"label":"2,4", "x":4.5, "y":2.25}, {"label":"2,5", "x":5.5, "y":2.25}, {"label":"2,6", "x":8.25, "y":2.25}, {"label":"2,7", "x":9.25, "y":2.25}, {"label":"2,8", "x":10.25, "y":2.25}, {"label":"2,9", "x":11.25, "y":2.25}, {"label":"2,10", "x":12.25, "y":2.25}, {"label":"2,11", "x":13.25, "y":2.25}, {"label":"2,12", "x":14.25, "y":2.25}, {"label":"2,13", "x":15.25, "y":2.25, "w":1.5}, {"label":"2,14", "x":17, "y":2.25}, {"label":"2,15", "x":18, "y":2.25}, {"label":"2,16", "x":19, "y":2.25}, {"label":"3,0", "x":0, "y":3.25, "w":1.75}, {"label":"3,1", "x":1.75, "y":3.25}, {"label":"3,2", "x":2.75, "y":3.25}, {"label":"3,3", "x":3.75, "y":3.25}, {"label":"3,4", "x":4.75, "y":3.25}, {"label":"3,5", "x":5.75, "y":3.25}, {"label":"3,6", "x":8.5, "y":3.25}, {"label":"3,7", "x":9.5, "y":3.25}, {"label":"3,8", "x":10.5, "y":3.25}, {"label":"3,9", "x":11.5, "y":3.25}, {"label":"3,10", "x":12.5, "y":3.25}, {"label":"3,11", "x":13.5, "y":3.25}, {"label":"3,13", "x":14.5, "y":3.25, "w":1.25}, {"label":"3,12", "x":15.75, "y":3.25}, {"label":"4,0", "x":0, "y":4.25, "w":1.25}, {"label":"4,1", "x":1.25, "y":4.25}, {"label":"4,2", "x":2.25, "y":4.25}, {"label":"4,3", "x":3.25, "y":4.25}, {"label":"4,4", "x":4.25, "y":4.25}, {"label":"4,5", "x":5.25, "y":4.25}, {"label":"4,6", "x":6.25, "y":4.25}, {"label":"5,7", "x":8, "y":4.25}, {"label":"4,7", "x":9, "y":4.25}, {"label":"4,8", "x":10, "y":4.25}, {"label":"4,9", "x":11, "y":4.25}, {"label":"4,10", "x":12, "y":4.25}, {"label":"4,11", "x":13, "y":4.25}, {"label":"4,12", "x":14, "y":4.25, "w":1.75}, {"label":"4,13", "x":15.75, "y":4.25}, {"label":"4,15", "x":18, "y":4.25}, {"label":"5,0", "x":0, "y":5.25, "w":1.25}, {"label":"5,1", "x":1.25, "y":5.25, "w":1.25}, {"label":"5,2", "x":2.5, "y":5.25, "w":1.25}, {"label":"5,2", "x":3.75, "y":5.25, "w":1.25}, {"label":"5,6", "x":5, "y":5.25, "w":1.25}, {"x":6.25, "y":5.25}, {"label":"5,10", "x":8, "y":5.25, "w":1.75}, {"x":9.75, "y":5.25}, {"label":"5,11", "x":10.75, "y":5.25, "w":1.25}, {"label":"5,12", "x":12, "y":5.25, "w":1.25}, {"label":"5,13", "x":13.25, "y":5.25, "w":1.25}, {"label":"5,13", "x":14.5, "y":5.25, "w":1.25}, {"label":"5,14", "x":17, "y":5.25}, {"label":"5,15", "x":18, "y":5.25}, {"label":"5,16", "x":19, "y":5.25}] | ||
8 | }, | ||
9 | "LAYOUT_ansi": { | ||
10 | "layout": [{"label":"0,0", "x":0, "y":0}, {"label":"0,1", "x":2, "y":0}, {"label":"0,2", "x":3, "y":0}, {"label":"0,3", "x":4, "y":0}, {"label":"0,4", "x":5, "y":0}, {"label":"0,5", "x":6, "y":0}, {"label":"0,6", "x":8.75, "y":0}, {"label":"0,7", "x":9.75, "y":0}, {"label":"0,8", "x":10.75, "y":0}, {"label":"0,9", "x":11.75, "y":0}, {"label":"0,10", "x":12.75, "y":0}, {"label":"0,11", "x":13.75, "y":0}, {"label":"0,12", "x":14.75, "y":0}, {"label":"0,14", "x":17, "y":0}, {"label":"0,15", "x":18, "y":0}, {"label":"0,16", "x":19, "y":0}, {"label":"1,0", "x":0, "y":1.25}, {"label":"1,1", "x":1, "y":1.25}, {"label":"1,2", "x":2, "y":1.25}, {"label":"1,3", "x":3, "y":1.25}, {"label":"1,4", "x":4, "y":1.25}, {"label":"1,5", "x":5, "y":1.25}, {"label":"1,6", "x":6, "y":1.25}, {"label":"1,7", "x":8.75, "y":1.25}, {"label":"1,8", "x":9.75, "y":1.25}, {"label":"1,9", "x":10.75, "y":1.25}, {"label":"1,10", "x":11.75, "y":1.25}, {"label":"1,11", "x":12.75, "y":1.25}, {"label":"1,12", "x":13.75, "y":1.25}, {"label":"1,13", "x":14.75, "y":1.25, "w":2}, {"label":"1,14", "x":17, "y":1.25}, {"label":"1,15", "x":18, "y":1.25}, {"label":"1,16", "x":19, "y":1.25}, {"label":"2,0", "x":0, "y":2.25, "w":1.5}, {"label":"2,1", "x":1.5, "y":2.25}, {"label":"2,2", "x":2.5, "y":2.25}, {"label":"2,3", "x":3.5, "y":2.25}, {"label":"2,4", "x":4.5, "y":2.25}, {"label":"2,5", "x":5.5, "y":2.25}, {"label":"2,6", "x":8.25, "y":2.25}, {"label":"2,7", "x":9.25, "y":2.25}, {"label":"2,8", "x":10.25, "y":2.25}, {"label":"2,9", "x":11.25, "y":2.25}, {"label":"2,10", "x":12.25, "y":2.25}, {"label":"2,11", "x":13.25, "y":2.25}, {"label":"2,12", "x":14.25, "y":2.25}, {"label":"2,13", "x":15.25, "y":2.25, "w":1.5}, {"label":"2,14", "x":17, "y":2.25}, {"label":"2,15", "x":18, "y":2.25}, {"label":"2,16", "x":19, "y":2.25}, {"label":"3,0", "x":0, "y":3.25, "w":1.75}, {"label":"3,1", "x":1.75, "y":3.25}, {"label":"3,2", "x":2.75, "y":3.25}, {"label":"3,3", "x":3.75, "y":3.25}, {"label":"3,4", "x":4.75, "y":3.25}, {"label":"3,5", "x":5.75, "y":3.25}, {"label":"3,6", "x":8.5, "y":3.25}, {"label":"3,7", "x":9.5, "y":3.25}, {"label":"3,8", "x":10.5, "y":3.25}, {"label":"3,9", "x":11.5, "y":3.25}, {"label":"3,10", "x":12.5, "y":3.25}, {"label":"3,11", "x":13.5, "y":3.25}, {"label":"3,13", "x":14.5, "y":3.25, "w":2.25}, {"label":"4,0", "x":0, "y":4.25, "w":2.25}, {"label":"4,2", "x":2.25, "y":4.25}, {"label":"4,3", "x":3.25, "y":4.25}, {"label":"4,4", "x":4.25, "y":4.25}, {"label":"4,5", "x":5.25, "y":4.25}, {"label":"4,6", "x":6.25, "y":4.25}, {"label":"5,7", "x":8, "y":4.25}, {"label":"4,7", "x":9, "y":4.25}, {"label":"4,8", "x":10, "y":4.25}, {"label":"4,9", "x":11, "y":4.25}, {"label":"4,10", "x":12, "y":4.25}, {"label":"4,11", "x":13, "y":4.25}, {"label":"4,13", "x":14, "y":4.25, "w":2.75}, {"label":"4,15", "x":18, "y":4.25}, {"label":"5,0", "x":0, "y":5.25, "w":1.25}, {"label":"5,1", "x":1.25, "y":5.25, "w":1.25}, {"label":"5,2", "x":2.5, "y":5.25, "w":1.25}, {"label":"5,2", "x":3.75, "y":5.25, "w":1.25}, {"label":"5,6", "x":5, "y":5.25, "w":1.25}, {"x":6.25, "y":5.25}, {"label":"5,10", "x":8, "y":5.25, "w":1.75}, {"x":9.75, "y":5.25}, {"label":"5,11", "x":10.75, "y":5.25, "w":1.25}, {"label":"5,12", "x":12, "y":5.25, "w":1.25}, {"label":"5,13", "x":13.25, "y":5.25, "w":1.25}, {"label":"5,13", "x":14.5, "y":5.25, "w":1.25}, {"label":"5,14", "x":17, "y":5.25}, {"label":"5,15", "x":18, "y":5.25}, {"label":"5,16", "x":19, "y":5.25}] | ||
11 | }, | ||
12 | "LAYOUT_iso": { | ||
13 | "layout": [{"label":"0,0", "x":0, "y":0}, {"label":"0,1", "x":2, "y":0}, {"label":"0,2", "x":3, "y":0}, {"label":"0,3", "x":4, "y":0}, {"label":"0,4", "x":5, "y":0}, {"label":"0,5", "x":6, "y":0}, {"label":"0,6", "x":8.75, "y":0}, {"label":"0,7", "x":9.75, "y":0}, {"label":"0,8", "x":10.75, "y":0}, {"label":"0,9", "x":11.75, "y":0}, {"label":"0,10", "x":12.75, "y":0}, {"label":"0,11", "x":13.75, "y":0}, {"label":"0,12", "x":14.75, "y":0}, {"label":"0,14", "x":17, "y":0}, {"label":"0,15", "x":18, "y":0}, {"label":"0,16", "x":19, "y":0}, {"label":"1,0", "x":0, "y":1.25}, {"label":"1,1", "x":1, "y":1.25}, {"label":"1,2", "x":2, "y":1.25}, {"label":"1,3", "x":3, "y":1.25}, {"label":"1,4", "x":4, "y":1.25}, {"label":"1,5", "x":5, "y":1.25}, {"label":"1,6", "x":6, "y":1.25}, {"label":"1,7", "x":8.75, "y":1.25}, {"label":"1,8", "x":9.75, "y":1.25}, {"label":"1,9", "x":10.75, "y":1.25}, {"label":"1,10", "x":11.75, "y":1.25}, {"label":"1,11", "x":12.75, "y":1.25}, {"label":"1,12", "x":13.75, "y":1.25}, {"label":"1,13", "x":14.75, "y":1.25, "w":2}, {"label":"1,14", "x":17, "y":1.25}, {"label":"1,15", "x":18, "y":1.25}, {"label":"1,16", "x":19, "y":1.25}, {"label":"2,0", "x":0, "y":2.25, "w":1.5}, {"label":"2,1", "x":1.5, "y":2.25}, {"label":"2,2", "x":2.5, "y":2.25}, {"label":"2,3", "x":3.5, "y":2.25}, {"label":"2,4", "x":4.5, "y":2.25}, {"label":"2,5", "x":5.5, "y":2.25}, {"label":"2,6", "x":8.25, "y":2.25}, {"label":"2,7", "x":9.25, "y":2.25}, {"label":"2,8", "x":10.25, "y":2.25}, {"label":"2,9", "x":11.25, "y":2.25}, {"label":"2,10", "x":12.25, "y":2.25}, {"label":"2,11", "x":13.25, "y":2.25}, {"label":"2,12", "x":14.25, "y":2.25}, {"label":"3,13", "x":15.5, "y":2.25, "w":1.25, "h":2}, {"label":"2,14", "x":17, "y":2.25}, {"label":"2,15", "x":18, "y":2.25}, {"label":"2,16", "x":19, "y":2.25}, {"label":"3,0", "x":0, "y":3.25, "w":1.75}, {"label":"3,1", "x":1.75, "y":3.25}, {"label":"3,2", "x":2.75, "y":3.25}, {"label":"3,3", "x":3.75, "y":3.25}, {"label":"3,4", "x":4.75, "y":3.25}, {"label":"3,5", "x":5.75, "y":3.25}, {"label":"3,6", "x":8.5, "y":3.25}, {"label":"3,7", "x":9.5, "y":3.25}, {"label":"3,8", "x":10.5, "y":3.25}, {"label":"3,9", "x":11.5, "y":3.25}, {"label":"3,10", "x":12.5, "y":3.25}, {"label":"3,11", "x":13.5, "y":3.25}, {"label":"3,12", "x":14.5, "y":3.25}, {"label":"4,0", "x":0, "y":4.25, "w":1.25}, {"label":"4,1", "x":1.25, "y":4.25}, {"label":"4,2", "x":2.25, "y":4.25}, {"label":"4,3", "x":3.25, "y":4.25}, {"label":"4,4", "x":4.25, "y":4.25}, {"label":"4,5", "x":5.25, "y":4.25}, {"label":"4,6", "x":6.25, "y":4.25}, {"label":"5,7", "x":8, "y":4.25}, {"label":"4,7", "x":9, "y":4.25}, {"label":"4,8", "x":10, "y":4.25}, {"label":"4,9", "x":11, "y":4.25}, {"label":"4,10", "x":12, "y":4.25}, {"label":"4,11", "x":13, "y":4.25}, {"label":"4,12", "x":14, "y":4.25, "w":1.75}, {"label":"4,13", "x":15.75, "y":4.25}, {"label":"4,15", "x":18, "y":4.25}, {"label":"5,0", "x":0, "y":5.25, "w":1.25}, {"label":"5,1", "x":1.25, "y":5.25, "w":1.25}, {"label":"5,2", "x":2.5, "y":5.25, "w":1.25}, {"label":"5,2", "x":3.75, "y":5.25, "w":1.25}, {"label":"5,6", "x":5, "y":5.25, "w":1.25}, {"x":6.25, "y":5.25}, {"label":"5,10", "x":8, "y":5.25, "w":1.75}, {"x":9.75, "y":5.25}, {"label":"5,11", "x":10.75, "y":5.25, "w":1.25}, {"label":"5,12", "x":12, "y":5.25, "w":1.25}, {"label":"5,13", "x":13.25, "y":5.25, "w":1.25}, {"label":"5,13", "x":14.5, "y":5.25, "w":1.25}, {"label":"5,14", "x":17, "y":5.25}, {"label":"5,15", "x":18, "y":5.25}, {"label":"5,16", "x":19, "y":5.25}] } | ||
14 | } | ||
15 | ,"meta": "https://noroadsleft.github.io/kbf_qmk_converter/" | ||
16 | } | ||
diff --git a/keyboards/lz/erghost/keymaps/default/keymap.c b/keyboards/lz/erghost/keymaps/default/keymap.c new file mode 100644 index 000000000..d19e909ce --- /dev/null +++ b/keyboards/lz/erghost/keymaps/default/keymap.c | |||
@@ -0,0 +1,27 @@ | |||
1 | /* Copyright 2021 Mechlovin | ||
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 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
19 | [0] = LAYOUT_all( | ||
20 | KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, | ||
21 | KC_GRV, 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_BSPC, KC_DEL, KC_INS, KC_HOME, KC_PGUP, | ||
22 | 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_BSLS, KC_DEL, KC_END, KC_PGDN, | ||
23 | 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_HASH, KC_ENT, | ||
24 | KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, MO(1), KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_LSFT, KC_UP, | ||
25 | KC_LCTL, KC_LGUI, KC_LALT, KC_APP, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_LALT, KC_LGUI, MO(1), KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT | ||
26 | ), | ||
27 | }; | ||
diff --git a/keyboards/lz/erghost/keymaps/default/readme.md b/keyboards/lz/erghost/keymaps/default/readme.md new file mode 100644 index 000000000..be484dbb0 --- /dev/null +++ b/keyboards/lz/erghost/keymaps/default/readme.md | |||
@@ -0,0 +1 @@ | |||
# The default keymap for ERghost | |||
diff --git a/keyboards/lz/erghost/keymaps/via/keymap.c b/keyboards/lz/erghost/keymaps/via/keymap.c new file mode 100644 index 000000000..eb8bac8eb --- /dev/null +++ b/keyboards/lz/erghost/keymaps/via/keymap.c | |||
@@ -0,0 +1,51 @@ | |||
1 | /* Copyright 2021 Mechlovin | ||
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 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
19 | [0] = LAYOUT_all( | ||
20 | KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, | ||
21 | KC_GRV, 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_BSPC, KC_DEL, KC_INS, KC_HOME, KC_PGUP, | ||
22 | 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_BSLS, KC_DEL, KC_END, KC_PGDN, | ||
23 | 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_HASH, KC_ENT, | ||
24 | KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, MO(2), KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_LSFT, KC_UP, | ||
25 | KC_LCTL, KC_LGUI, KC_LALT, KC_APP, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_LALT, KC_LGUI, MO(1), KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT | ||
26 | ), | ||
27 | [1] = LAYOUT_all( | ||
28 | 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, | ||
29 | 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, KC_TRNS, KC_TRNS, | ||
30 | 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, KC_TRNS, | ||
31 | 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, | ||
32 | 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, | ||
33 | 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 | ||
34 | ), | ||
35 | [2] = LAYOUT_all( | ||
36 | 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, | ||
37 | 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, KC_TRNS, KC_TRNS, | ||
38 | 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, KC_TRNS, | ||
39 | 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, | ||
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 | ), | ||
43 | [3] = LAYOUT_all( | ||
44 | 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, | ||
45 | 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, KC_TRNS, KC_TRNS, | ||
46 | 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, KC_TRNS, | ||
47 | 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, | ||
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 | ), | ||
51 | }; | ||
diff --git a/keyboards/lz/erghost/keymaps/via/readme.md b/keyboards/lz/erghost/keymaps/via/readme.md new file mode 100644 index 000000000..abafa4946 --- /dev/null +++ b/keyboards/lz/erghost/keymaps/via/readme.md | |||
@@ -0,0 +1 @@ | |||
# The via keymap for erGhost | |||
diff --git a/keyboards/lz/erghost/keymaps/via/rules.mk b/keyboards/lz/erghost/keymaps/via/rules.mk new file mode 100644 index 000000000..36b7ba9cb --- /dev/null +++ b/keyboards/lz/erghost/keymaps/via/rules.mk | |||
@@ -0,0 +1,2 @@ | |||
1 | VIA_ENABLE = yes | ||
2 | LTO_ENABLE = yes | ||
diff --git a/keyboards/lz/erghost/matrix.c b/keyboards/lz/erghost/matrix.c new file mode 100644 index 000000000..6b7d091cb --- /dev/null +++ b/keyboards/lz/erghost/matrix.c | |||
@@ -0,0 +1,344 @@ | |||
1 | /* | ||
2 | Copyright 2012-2018 Jun Wako, Jack Humbert, Yiancar | ||
3 | Copyright 2019 Evy Dekkers | ||
4 | |||
5 | This program is free software: you can redistribute it and/or modify | ||
6 | it under the terms of the GNU General Public License as published by | ||
7 | the Free Software Foundation, either version 2 of the License, or | ||
8 | (at your option) any later version. | ||
9 | |||
10 | This program is distributed in the hope that it will be useful, | ||
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | GNU General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU General Public License | ||
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
17 | */ | ||
18 | |||
19 | #include "matrix.h" | ||
20 | #include "gpio.h" | ||
21 | |||
22 | static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; | ||
23 | |||
24 | /* Cols 0 - 16 | ||
25 | * These columns use two 74HC138 3 to 8 bit demultiplexer. B0, F1 is the enable pin, must be set high (1) to use it. | ||
26 | * | ||
27 | * col / pin: PB5 PB7 PF0 PB0 PF1 PE6 | ||
28 | * 0: 0 ── 0 ── 0 1 ── 0 0 | ||
29 | * ──────────────────────────────────────────── | ||
30 | * 1: 0 ── 0 ── 1 1 ── 0 0 | ||
31 | * ──────────────────────────────────────────── | ||
32 | * 2: 0 ── 1 ── 0 1 ── 0 0 | ||
33 | * ──────────────────────────────────────────── | ||
34 | * 3: 0 ── 1 ── 1 1 ── 0 0 | ||
35 | * ──────────────────────────────────────────── | ||
36 | * 4: 1 ── 0 ── 0 1 ── 0 0 | ||
37 | * ──────────────────────────────────────────── | ||
38 | * 5: 1 ── 0 ── 1 1 ── 0 0 | ||
39 | * ──────────────────────────────────────────── | ||
40 | * 6: 1 ── 1 ── 0 1 ── 0 0 | ||
41 | * ──────────────────────────────────────────── | ||
42 | * 7: 1 ── 1 ── 1 1 ── 0 0 | ||
43 | * ──────────────────────────────────────────── | ||
44 | * 8: 0 ── 0 ── 0 0 ── 1 0 | ||
45 | * ──────────────────────────────────────────── | ||
46 | * 9: 0 ── 0 ── 1 0 ── 1 0 | ||
47 | * ──────────────────────────────────────────── | ||
48 | *10: 0 ── 1 ── 0 0 ── 1 0 | ||
49 | * ──────────────────────────────────────────── | ||
50 | *11: 0 ── 1 ── 1 0 ── 1 0 | ||
51 | * ──────────────────────────────────────────── | ||
52 | *12: 1 ── 0 ── 0 0 ── 1 0 | ||
53 | * ──────────────────────────────────────────── | ||
54 | *13: 1 ── 0 ── 1 0 ── 1 0 | ||
55 | * ──────────────────────────────────────────── | ||
56 | *14: 1 ── 1 ── 1 0 ── 1 0 | ||
57 | * ──────────────────────────────────────────── | ||
58 | *15: 1 ── 1 ── 0 0 ── 1 0 | ||
59 | * ──────────────────────────────────────────── | ||
60 | *16: 0 ── 0 ── 0 0 ── 0 1 | ||
61 | * | ||
62 | */ | ||
63 | static void select_col(uint8_t col) { | ||
64 | switch (col) { | ||
65 | case 0: | ||
66 | writePinLow(B5); | ||
67 | writePinLow(B7); | ||
68 | writePinLow(F0); | ||
69 | writePinHigh(B0); | ||
70 | break; | ||
71 | case 1: | ||
72 | writePinLow(B5); | ||
73 | writePinLow(B7); | ||
74 | writePinHigh(F0); | ||
75 | writePinHigh(B0); | ||
76 | break; | ||
77 | case 2: | ||
78 | writePinLow(B5); | ||
79 | writePinHigh(B7); | ||
80 | writePinLow(F0); | ||
81 | writePinHigh(B0); | ||
82 | break; | ||
83 | case 3: | ||
84 | writePinLow(B5); | ||
85 | writePinHigh(B7); | ||
86 | writePinHigh(F0); | ||
87 | writePinHigh(B0); | ||
88 | break; | ||
89 | case 4: | ||
90 | writePinHigh(B5); | ||
91 | writePinLow(B7); | ||
92 | writePinLow(F0); | ||
93 | writePinHigh(B0); | ||
94 | break; | ||
95 | case 5: | ||
96 | writePinHigh(B5); | ||
97 | writePinLow(B7); | ||
98 | writePinHigh(F0); | ||
99 | writePinHigh(B0); | ||
100 | break; | ||
101 | case 6: | ||
102 | writePinHigh(B5); | ||
103 | writePinHigh(B7); | ||
104 | writePinLow(F0); | ||
105 | writePinHigh(B0); | ||
106 | break; | ||
107 | case 7: | ||
108 | writePinHigh(B5); | ||
109 | writePinHigh(B7); | ||
110 | writePinHigh(F0); | ||
111 | writePinHigh(B0); | ||
112 | break; | ||
113 | case 8: | ||
114 | writePinLow(B5); | ||
115 | writePinLow(B7); | ||
116 | writePinLow(F0); | ||
117 | writePinHigh(F1); | ||
118 | break; | ||
119 | case 9: | ||
120 | writePinLow(B5); | ||
121 | writePinLow(B7); | ||
122 | writePinHigh(F0); | ||
123 | writePinHigh(F1); | ||
124 | break; | ||
125 | case 10: | ||
126 | writePinLow(B5); | ||
127 | writePinHigh(B7); | ||
128 | writePinLow(F0); | ||
129 | writePinHigh(F1); | ||
130 | break; | ||
131 | case 11: | ||
132 | writePinLow(B5); | ||
133 | writePinHigh(B7); | ||
134 | writePinHigh(F0); | ||
135 | writePinHigh(F1); | ||
136 | break; | ||
137 | case 12: | ||
138 | writePinHigh(B5); | ||
139 | writePinLow(B7); | ||
140 | writePinLow(F0); | ||
141 | writePinHigh(F1); | ||
142 | break; | ||
143 | case 13: | ||
144 | writePinHigh(B5); | ||
145 | writePinLow(B7); | ||
146 | writePinHigh(F0); | ||
147 | writePinHigh(F1); | ||
148 | break; | ||
149 | case 14: | ||
150 | writePinHigh(B5); | ||
151 | writePinHigh(B7); | ||
152 | writePinHigh(F0); | ||
153 | writePinHigh(F1); | ||
154 | break; | ||
155 | case 15: | ||
156 | writePinHigh(B5); | ||
157 | writePinHigh(B7); | ||
158 | writePinLow(F0); | ||
159 | writePinHigh(F1); | ||
160 | break; | ||
161 | case 16: | ||
162 | writePinLow(E6); | ||
163 | break; | ||
164 | } | ||
165 | } | ||
166 | |||
167 | static void unselect_col(uint8_t col) { | ||
168 | switch (col) { | ||
169 | case 0: | ||
170 | writePinHigh(B5); | ||
171 | writePinHigh(B7); | ||
172 | writePinHigh(F0); | ||
173 | writePinLow(B0); | ||
174 | break; | ||
175 | case 1: | ||
176 | writePinHigh(B5); | ||
177 | writePinHigh(B7); | ||
178 | writePinLow(F0); | ||
179 | writePinLow(B0); | ||
180 | break; | ||
181 | case 2: | ||
182 | writePinHigh(B5); | ||
183 | writePinLow(B7); | ||
184 | writePinHigh(F0); | ||
185 | writePinLow(B0); | ||
186 | break; | ||
187 | case 3: | ||
188 | writePinHigh(B5); | ||
189 | writePinLow(B7); | ||
190 | writePinLow(F0); | ||
191 | writePinLow(B0); | ||
192 | break; | ||
193 | case 4: | ||
194 | writePinLow(B5); | ||
195 | writePinHigh(B7); | ||
196 | writePinHigh(F0); | ||
197 | writePinLow(B0); | ||
198 | break; | ||
199 | case 5: | ||
200 | writePinLow(B5); | ||
201 | writePinHigh(B7); | ||
202 | writePinLow(F0); | ||
203 | writePinLow(B0); | ||
204 | break; | ||
205 | case 6: | ||
206 | writePinLow(B5); | ||
207 | writePinLow(B7); | ||
208 | writePinHigh(F0); | ||
209 | writePinLow(B0); | ||
210 | break; | ||
211 | case 7: | ||
212 | writePinLow(B5); | ||
213 | writePinLow(B7); | ||
214 | writePinLow(F0); | ||
215 | writePinLow(B0); | ||
216 | break; | ||
217 | case 8: | ||
218 | writePinHigh(B5); | ||
219 | writePinHigh(B7); | ||
220 | writePinHigh(F0); | ||
221 | writePinLow(F1); | ||
222 | break; | ||
223 | case 9: | ||
224 | writePinHigh(B5); | ||
225 | writePinHigh(B7); | ||
226 | writePinLow(F0); | ||
227 | writePinLow(F1); | ||
228 | break; | ||
229 | case 10: | ||
230 | writePinHigh(B5); | ||
231 | writePinLow(B7); | ||
232 | writePinHigh(F0); | ||
233 | writePinLow(F1); | ||
234 | break; | ||
235 | case 11: | ||
236 | writePinHigh(B5); | ||
237 | writePinLow(B7); | ||
238 | writePinLow(F0); | ||
239 | writePinLow(F1); | ||
240 | break; | ||
241 | case 12: | ||
242 | writePinLow(B5); | ||
243 | writePinHigh(B7); | ||
244 | writePinHigh(F0); | ||
245 | writePinLow(F1); | ||
246 | break; | ||
247 | case 13: | ||
248 | writePinLow(B5); | ||
249 | writePinHigh(B7); | ||
250 | writePinLow(F0); | ||
251 | writePinLow(F1); | ||
252 | break; | ||
253 | case 14: | ||
254 | writePinLow(B5); | ||
255 | writePinLow(B7); | ||
256 | writePinLow(F0); | ||
257 | writePinLow(F1); | ||
258 | break; | ||
259 | case 15: | ||
260 | writePinLow(B5); | ||
261 | writePinLow(B7); | ||
262 | writePinHigh(F0); | ||
263 | writePinLow(F1); | ||
264 | break; | ||
265 | case 16: | ||
266 | writePinHigh(E6); | ||
267 | break; | ||
268 | } | ||
269 | } | ||
270 | |||
271 | static void unselect_cols(void) { | ||
272 | //Native | ||
273 | writePinHigh(E6); | ||
274 | |||
275 | //Demultiplexer | ||
276 | writePinLow(B0); | ||
277 | writePinLow(F1); | ||
278 | writePinHigh(B5); | ||
279 | writePinHigh(B7); | ||
280 | writePinHigh(F0); | ||
281 | } | ||
282 | |||
283 | static void init_pins(void) { | ||
284 | unselect_cols(); | ||
285 | for (uint8_t x = 0; x < MATRIX_ROWS; x++) { | ||
286 | setPinInputHigh(row_pins[x]); | ||
287 | } | ||
288 | setPinOutput(B5); | ||
289 | setPinOutput(B7); | ||
290 | setPinOutput(F0); | ||
291 | setPinOutput(B0); | ||
292 | setPinOutput(F1); | ||
293 | setPinOutput(E6); | ||
294 | } | ||
295 | |||
296 | static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) { | ||
297 | bool matrix_changed = false; | ||
298 | |||
299 | // Select col and wait for col selecton to stabilize | ||
300 | select_col(current_col); | ||
301 | matrix_io_delay(); | ||
302 | |||
303 | // For each row... | ||
304 | for (uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++) { | ||
305 | // Store last value of row prior to reading | ||
306 | matrix_row_t last_row_value = current_matrix[row_index]; | ||
307 | |||
308 | // Check row pin state | ||
309 | if (readPin(row_pins[row_index]) == 0) { | ||
310 | // Pin LO, set col bit | ||
311 | current_matrix[row_index] |= (MATRIX_ROW_SHIFTER << current_col); | ||
312 | } else { | ||
313 | // Pin HI, clear col bit | ||
314 | current_matrix[row_index] &= ~(MATRIX_ROW_SHIFTER << current_col); | ||
315 | } | ||
316 | |||
317 | // Determine if the matrix changed state | ||
318 | if ((last_row_value != current_matrix[row_index]) && !(matrix_changed)) { | ||
319 | matrix_changed = true; | ||
320 | } | ||
321 | } | ||
322 | |||
323 | // Unselect col | ||
324 | unselect_col(current_col); | ||
325 | |||
326 | return matrix_changed; | ||
327 | } | ||
328 | |||
329 | void matrix_init_custom(void) { | ||
330 | // initialize key pins | ||
331 | init_pins(); | ||
332 | } | ||
333 | |||
334 | bool matrix_scan_custom(matrix_row_t current_matrix[]) { | ||
335 | bool changed = false; | ||
336 | |||
337 | // Set col, read rows | ||
338 | for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { | ||
339 | changed |= read_rows_on_col(current_matrix, current_col); | ||
340 | } | ||
341 | |||
342 | return changed; | ||
343 | } | ||
344 | |||
diff --git a/keyboards/lz/erghost/readme.md b/keyboards/lz/erghost/readme.md new file mode 100644 index 000000000..8a48d912d --- /dev/null +++ b/keyboards/lz/erghost/readme.md | |||
@@ -0,0 +1,27 @@ | |||
1 | # erGhost | ||
2 | |||
3 |  | ||
4 | |||
5 | LZ erGhost PCB | ||
6 | |||
7 | * Keyboard Maintainer: [Mechlovin](https://github.com/mechlovin) | ||
8 | * Hardware Supported: erGhost PCB, Atmega32u4 | ||
9 | * Hardware Availability: [GB](https://geekhack.org/index.php?topic=115100.0) | ||
10 | |||
11 | Make example for this keyboard (after setting up your build environment): | ||
12 | |||
13 | make lz/erghost:default | ||
14 | |||
15 | Flashing example for this keyboard: | ||
16 | |||
17 | make lz/erghost:default:flash | ||
18 | |||
19 | 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). | ||
20 | |||
21 | ## Bootloader | ||
22 | |||
23 | Enter the bootloader in 3 ways: | ||
24 | |||
25 | * **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard | ||
26 | * **Keycode in layout**: Press the key mapped to `RESET` if it is available | ||
27 | * **Physical reset button**: Press the button on the back of the PCB \ No newline at end of file | ||
diff --git a/keyboards/lz/erghost/rules.mk b/keyboards/lz/erghost/rules.mk new file mode 100644 index 000000000..a10d80e25 --- /dev/null +++ b/keyboards/lz/erghost/rules.mk | |||
@@ -0,0 +1,21 @@ | |||
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 = no # Console for debug | ||
14 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
15 | NKRO_ENABLE = yes # Enable N-Key Rollover | ||
16 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality | ||
17 | RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow | ||
18 | AUDIO_ENABLE = no # Audio output | ||
19 | CUSTOM_MATRIX = lite | ||
20 | |||
21 | SRC += matrix.c | ||