diff options
Diffstat (limited to 'keyboards/al1')
-rw-r--r-- | keyboards/al1/al1.c | 17 | ||||
-rw-r--r-- | keyboards/al1/al1.h | 51 | ||||
-rw-r--r-- | keyboards/al1/config.h | 94 | ||||
-rw-r--r-- | keyboards/al1/info.json | 210 | ||||
-rw-r--r-- | keyboards/al1/keymaps/default/keymap.c | 35 | ||||
-rw-r--r-- | keyboards/al1/keymaps/splitbs/keymap.c | 35 | ||||
-rw-r--r-- | keyboards/al1/matrix.c | 92 | ||||
-rw-r--r-- | keyboards/al1/readme.md | 13 | ||||
-rw-r--r-- | keyboards/al1/rules.mk | 21 |
9 files changed, 568 insertions, 0 deletions
diff --git a/keyboards/al1/al1.c b/keyboards/al1/al1.c new file mode 100644 index 000000000..a7d3980ec --- /dev/null +++ b/keyboards/al1/al1.c | |||
@@ -0,0 +1,17 @@ | |||
1 | /* Copyright 2018 MechMerlin | ||
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 "al1.h" | ||
diff --git a/keyboards/al1/al1.h b/keyboards/al1/al1.h new file mode 100644 index 000000000..6b585cc18 --- /dev/null +++ b/keyboards/al1/al1.h | |||
@@ -0,0 +1,51 @@ | |||
1 | /* Copyright 2018 MechMerlin | ||
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 XXX KC_NO | ||
22 | |||
23 | #define LAYOUT( \ | ||
24 | k50, k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k4F, k4E, \ | ||
25 | k51, k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k2F, k4D, \ | ||
26 | k52, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, \ | ||
27 | k53, k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F, k4C, \ | ||
28 | k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B \ | ||
29 | ) { \ | ||
30 | { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ | ||
31 | { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ | ||
32 | { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F }, \ | ||
33 | { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F }, \ | ||
34 | { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F }, \ | ||
35 | { k50, k51, k52, k53, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX } \ | ||
36 | } | ||
37 | |||
38 | #define LAYOUT_split_bs( \ | ||
39 | k50, k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k5C, k0C, k0D, k0E, k0F, k4F, k4E, \ | ||
40 | k51, k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k2F, k4D, \ | ||
41 | k52, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, \ | ||
42 | k53, k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F, k4C, \ | ||
43 | k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B \ | ||
44 | ) { \ | ||
45 | { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ | ||
46 | { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ | ||
47 | { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F }, \ | ||
48 | { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F }, \ | ||
49 | { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F }, \ | ||
50 | { k50, k51, k52, k53, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, k5C, XXX, XXX, XXX } \ | ||
51 | } | ||
diff --git a/keyboards/al1/config.h b/keyboards/al1/config.h new file mode 100644 index 000000000..b003a9cd6 --- /dev/null +++ b/keyboards/al1/config.h | |||
@@ -0,0 +1,94 @@ | |||
1 | /* | ||
2 | Copyright 2018 MechMerlin | ||
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 0xFEED | ||
24 | #define PRODUCT_ID 0x6050 | ||
25 | #define DEVICE_VER 0x0104 | ||
26 | #define MANUFACTURER Alsoran | ||
27 | #define PRODUCT AL1 | ||
28 | |||
29 | /* key matrix size */ | ||
30 | #define MATRIX_ROWS 7 | ||
31 | #define MATRIX_COLS 20 | ||
32 | |||
33 | #define LED_NUM_LOCK_PIN D0 | ||
34 | #define LED_CAPS_LOCK_PIN B7 | ||
35 | #define LED_SCROLL_LOCK_PIN D1 | ||
36 | #define LED_PIN_ON_STATE 0 | ||
37 | |||
38 | #define BACKLIGHT_PIN B6 | ||
39 | #define BACKLIGHT_LEVELS 3 | ||
40 | #define BACKLIGHT_BREATHING | ||
41 | |||
42 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
43 | #define DEBOUNCE 5 | ||
44 | |||
45 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
46 | #define LOCKING_SUPPORT_ENABLE | ||
47 | /* Locking resynchronize hack */ | ||
48 | #define LOCKING_RESYNC_ENABLE | ||
49 | |||
50 | /* If defined, GRAVE_ESC will always act as ESC when CTRL is held. | ||
51 | * This is useful for the Windows task manager shortcut (ctrl+shift+esc). | ||
52 | */ | ||
53 | //#define GRAVE_ESC_CTRL_OVERRIDE | ||
54 | |||
55 | /* | ||
56 | * Force NKRO | ||
57 | * | ||
58 | * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved | ||
59 | * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the | ||
60 | * makefile for this to work.) | ||
61 | * | ||
62 | * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) | ||
63 | * until the next keyboard reset. | ||
64 | * | ||
65 | * NKRO may prevent your keystrokes from being detected in the BIOS, but it is | ||
66 | * fully operational during normal computer usage. | ||
67 | * | ||
68 | * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) | ||
69 | * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by | ||
70 | * bootmagic, NKRO mode will always be enabled until it is toggled again during a | ||
71 | * power-up. | ||
72 | * | ||
73 | */ | ||
74 | //#define FORCE_NKRO | ||
75 | |||
76 | /* | ||
77 | * Feature disable options | ||
78 | * These options are also useful to firmware size reduction. | ||
79 | */ | ||
80 | |||
81 | /* disable debug print */ | ||
82 | //#define NO_DEBUG | ||
83 | |||
84 | /* disable print */ | ||
85 | //#define NO_PRINT | ||
86 | |||
87 | /* disable action features */ | ||
88 | //#define NO_ACTION_LAYER | ||
89 | //#define NO_ACTION_TAPPING | ||
90 | //#define NO_ACTION_ONESHOT | ||
91 | |||
92 | /* disable these deprecated features by default */ | ||
93 | #define NO_ACTION_MACRO | ||
94 | #define NO_ACTION_FUNCTION | ||
diff --git a/keyboards/al1/info.json b/keyboards/al1/info.json new file mode 100644 index 000000000..4014687fe --- /dev/null +++ b/keyboards/al1/info.json | |||
@@ -0,0 +1,210 @@ | |||
1 | { | ||
2 | "keyboard_name": "AL1", | ||
3 | "url": "", | ||
4 | "maintainer": "qmk", | ||
5 | "layouts": { | ||
6 | "LAYOUT": { | ||
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, "w": 2}, | ||
22 | |||
23 | {"x": 15.25, "y": 0}, | ||
24 | |||
25 | {"x": 16.5, "y": 0}, | ||
26 | {"x": 17.5, "y": 0}, | ||
27 | {"x": 18.5, "y": 0}, | ||
28 | {"x": 19.5, "y": 0}, | ||
29 | |||
30 | {"x": 0, "y": 1, "w": 1.5}, | ||
31 | {"x": 1.5, "y": 1}, | ||
32 | {"x": 2.5, "y": 1}, | ||
33 | {"x": 3.5, "y": 1}, | ||
34 | {"x": 4.5, "y": 1}, | ||
35 | {"x": 5.5, "y": 1}, | ||
36 | {"x": 6.5, "y": 1}, | ||
37 | {"x": 7.5, "y": 1}, | ||
38 | {"x": 8.5, "y": 1}, | ||
39 | {"x": 9.5, "y": 1}, | ||
40 | {"x": 10.5, "y": 1}, | ||
41 | {"x": 11.5, "y": 1}, | ||
42 | {"x": 12.5, "y": 1}, | ||
43 | {"x": 13.5, "y": 1, "w": 1.5}, | ||
44 | |||
45 | {"x": 15.25, "y": 1}, | ||
46 | |||
47 | {"x": 16.5, "y": 1}, | ||
48 | {"x": 17.5, "y": 1}, | ||
49 | {"x": 18.5, "y": 1}, | ||
50 | {"x": 19.5, "y": 1, "h": 2}, | ||
51 | |||
52 | {"x": 0, "y": 2, "w": 1.75}, | ||
53 | {"x": 1.75, "y": 2}, | ||
54 | {"x": 2.75, "y": 2}, | ||
55 | {"x": 3.75, "y": 2}, | ||
56 | {"x": 4.75, "y": 2}, | ||
57 | {"x": 5.75, "y": 2}, | ||
58 | {"x": 6.75, "y": 2}, | ||
59 | {"x": 7.75, "y": 2}, | ||
60 | {"x": 8.75, "y": 2}, | ||
61 | {"x": 9.75, "y": 2}, | ||
62 | {"x": 10.75, "y": 2}, | ||
63 | {"x": 11.75, "y": 2}, | ||
64 | {"x": 12.75, "y": 2, "w": 2.25}, | ||
65 | |||
66 | {"x": 16.5, "y": 2}, | ||
67 | {"x": 17.5, "y": 2}, | ||
68 | {"x": 18.5, "y": 2}, | ||
69 | |||
70 | {"x": 0, "y": 3, "w": 2.25}, | ||
71 | {"x": 2.25, "y": 3}, | ||
72 | {"x": 3.25, "y": 3}, | ||
73 | {"x": 4.25, "y": 3}, | ||
74 | {"x": 5.25, "y": 3}, | ||
75 | {"x": 6.25, "y": 3}, | ||
76 | {"x": 7.25, "y": 3}, | ||
77 | {"x": 8.25, "y": 3}, | ||
78 | {"x": 9.25, "y": 3}, | ||
79 | {"x": 10.25, "y": 3}, | ||
80 | {"x": 11.25, "y": 3}, | ||
81 | {"x": 12.25, "y": 3, "w": 1.75}, | ||
82 | {"x": 14, "y": 3}, | ||
83 | |||
84 | {"x": 15.25, "y": 3.25}, | ||
85 | |||
86 | {"x": 16.5, "y": 3}, | ||
87 | {"x": 17.5, "y": 3}, | ||
88 | {"x": 18.5, "y": 3}, | ||
89 | {"x": 19.5, "y": 3, "h": 2}, | ||
90 | |||
91 | {"x": 0, "y": 4, "w": 1.25}, | ||
92 | {"x": 1.25, "y": 4}, | ||
93 | {"x": 2.25, "y": 4, "w": 1.25}, | ||
94 | {"x": 3.5, "y": 4, "w": 7}, | ||
95 | {"x": 10.5, "y": 4, "w": 1.25}, | ||
96 | {"x": 11.75, "y": 4}, | ||
97 | {"x": 12.75, "y": 4, "w": 1.25}, | ||
98 | |||
99 | {"x": 14.25, "y": 4.25}, | ||
100 | {"x": 15.25, "y": 4.25}, | ||
101 | {"x": 16.25, "y": 4.25}, | ||
102 | |||
103 | {"x": 17.5, "y": 4}, | ||
104 | {"x": 18.5, "y": 4} | ||
105 | ] | ||
106 | }, | ||
107 | "LAYOUT_split_bs": { | ||
108 | "layout": [ | ||
109 | {"x": 0, "y": 0}, | ||
110 | {"x": 1, "y": 0}, | ||
111 | {"x": 2, "y": 0}, | ||
112 | {"x": 3, "y": 0}, | ||
113 | {"x": 4, "y": 0}, | ||
114 | {"x": 5, "y": 0}, | ||
115 | {"x": 6, "y": 0}, | ||
116 | {"x": 7, "y": 0}, | ||
117 | {"x": 8, "y": 0}, | ||
118 | {"x": 9, "y": 0}, | ||
119 | {"x": 10, "y": 0}, | ||
120 | {"x": 11, "y": 0}, | ||
121 | {"x": 12, "y": 0}, | ||
122 | {"x": 13, "y": 0}, | ||
123 | {"x": 14, "y": 0}, | ||
124 | |||
125 | {"x": 15.25, "y": 0}, | ||
126 | |||
127 | {"x": 16.5, "y": 0}, | ||
128 | {"x": 17.5, "y": 0}, | ||
129 | {"x": 18.5, "y": 0}, | ||
130 | {"x": 19.5, "y": 0}, | ||
131 | |||
132 | {"x": 0, "y": 1, "w": 1.5}, | ||
133 | {"x": 1.5, "y": 1}, | ||
134 | {"x": 2.5, "y": 1}, | ||
135 | {"x": 3.5, "y": 1}, | ||
136 | {"x": 4.5, "y": 1}, | ||
137 | {"x": 5.5, "y": 1}, | ||
138 | {"x": 6.5, "y": 1}, | ||
139 | {"x": 7.5, "y": 1}, | ||
140 | {"x": 8.5, "y": 1}, | ||
141 | {"x": 9.5, "y": 1}, | ||
142 | {"x": 10.5, "y": 1}, | ||
143 | {"x": 11.5, "y": 1}, | ||
144 | {"x": 12.5, "y": 1}, | ||
145 | {"x": 13.5, "y": 1, "w": 1.5}, | ||
146 | |||
147 | {"x": 15.25, "y": 1}, | ||
148 | |||
149 | {"x": 16.5, "y": 1}, | ||
150 | {"x": 17.5, "y": 1}, | ||
151 | {"x": 18.5, "y": 1}, | ||
152 | {"x": 19.5, "y": 1, "h": 2}, | ||
153 | |||
154 | {"x": 0, "y": 2, "w": 1.75}, | ||
155 | {"x": 1.75, "y": 2}, | ||
156 | {"x": 2.75, "y": 2}, | ||
157 | {"x": 3.75, "y": 2}, | ||
158 | {"x": 4.75, "y": 2}, | ||
159 | {"x": 5.75, "y": 2}, | ||
160 | {"x": 6.75, "y": 2}, | ||
161 | {"x": 7.75, "y": 2}, | ||
162 | {"x": 8.75, "y": 2}, | ||
163 | {"x": 9.75, "y": 2}, | ||
164 | {"x": 10.75, "y": 2}, | ||
165 | {"x": 11.75, "y": 2}, | ||
166 | {"x": 12.75, "y": 2, "w": 2.25}, | ||
167 | |||
168 | {"x": 16.5, "y": 2}, | ||
169 | {"x": 17.5, "y": 2}, | ||
170 | {"x": 18.5, "y": 2}, | ||
171 | |||
172 | {"x": 0, "y": 3, "w": 2.25}, | ||
173 | {"x": 2.25, "y": 3}, | ||
174 | {"x": 3.25, "y": 3}, | ||
175 | {"x": 4.25, "y": 3}, | ||
176 | {"x": 5.25, "y": 3}, | ||
177 | {"x": 6.25, "y": 3}, | ||
178 | {"x": 7.25, "y": 3}, | ||
179 | {"x": 8.25, "y": 3}, | ||
180 | {"x": 9.25, "y": 3}, | ||
181 | {"x": 10.25, "y": 3}, | ||
182 | {"x": 11.25, "y": 3}, | ||
183 | {"x": 12.25, "y": 3, "w": 1.75}, | ||
184 | {"x": 14, "y": 3}, | ||
185 | |||
186 | {"x": 15.25, "y": 3.25}, | ||
187 | |||
188 | {"x": 16.5, "y": 3}, | ||
189 | {"x": 17.5, "y": 3}, | ||
190 | {"x": 18.5, "y": 3}, | ||
191 | {"x": 19.5, "y": 3, "h": 2}, | ||
192 | |||
193 | {"x": 0, "y": 4, "w": 1.25}, | ||
194 | {"x": 1.25, "y": 4}, | ||
195 | {"x": 2.25, "y": 4, "w": 1.25}, | ||
196 | {"x": 3.5, "y": 4, "w": 7}, | ||
197 | {"x": 10.5, "y": 4, "w": 1.25}, | ||
198 | {"x": 11.75, "y": 4}, | ||
199 | {"x": 12.75, "y": 4, "w": 1.25}, | ||
200 | |||
201 | {"x": 14.25, "y": 4.25}, | ||
202 | {"x": 15.25, "y": 4.25}, | ||
203 | {"x": 16.25, "y": 4.25}, | ||
204 | |||
205 | {"x": 17.5, "y": 4}, | ||
206 | {"x": 18.5, "y": 4} | ||
207 | ] | ||
208 | } | ||
209 | } | ||
210 | } | ||
diff --git a/keyboards/al1/keymaps/default/keymap.c b/keyboards/al1/keymaps/default/keymap.c new file mode 100644 index 000000000..a3a9d63d3 --- /dev/null +++ b/keyboards/al1/keymaps/default/keymap.c | |||
@@ -0,0 +1,35 @@ | |||
1 | /* Copyright 2018 MechMerlin | ||
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 QMK_KEYBOARD_H | ||
18 | |||
19 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
20 | LAYOUT( | ||
21 | 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_BSPC, KC_INS, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, | ||
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_P7, KC_P8, KC_P9, KC_PPLS, | ||
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_ENT, KC_P4, KC_P5, KC_P6, | ||
24 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, | ||
25 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT | ||
26 | ), | ||
27 | |||
28 | LAYOUT( | ||
29 | _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, | ||
30 | _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
31 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
32 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
33 | _______, _______, _______, _______, _______, _______, _______, BL_TOGG, BL_DEC, BL_INC, _______, _______ | ||
34 | ) | ||
35 | }; | ||
diff --git a/keyboards/al1/keymaps/splitbs/keymap.c b/keyboards/al1/keymaps/splitbs/keymap.c new file mode 100644 index 000000000..d896b10db --- /dev/null +++ b/keyboards/al1/keymaps/splitbs/keymap.c | |||
@@ -0,0 +1,35 @@ | |||
1 | /* Copyright 2018 MechMerlin | ||
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 QMK_KEYBOARD_H | ||
18 | |||
19 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
20 | LAYOUT_split_bs( | ||
21 | 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_GRV, KC_BSPC, KC_INS, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, | ||
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_P7, KC_P8, KC_P9, KC_PPLS, | ||
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_ENT, KC_P4, KC_P5, KC_P6, | ||
24 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, | ||
25 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT | ||
26 | ), | ||
27 | |||
28 | LAYOUT_split_bs( | ||
29 | _______, 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_DEL, _______, _______, _______, _______, _______, | ||
30 | _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
31 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
32 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
33 | _______, _______, _______, _______, _______, _______, _______, BL_TOGG, BL_DEC, BL_INC, _______, _______ | ||
34 | ) | ||
35 | }; | ||
diff --git a/keyboards/al1/matrix.c b/keyboards/al1/matrix.c new file mode 100644 index 000000000..1407cbc08 --- /dev/null +++ b/keyboards/al1/matrix.c | |||
@@ -0,0 +1,92 @@ | |||
1 | #include "matrix.h" | ||
2 | |||
3 | #include "gpio.h" | ||
4 | |||
5 | static uint8_t read_rows(void) { | ||
6 | return (readPin(C7) ? 0 : 1) | | ||
7 | (readPin(B1) ? 0 : 2) | | ||
8 | (readPin(B2) ? 0 : 4) | | ||
9 | (readPin(C6) ? 0 : 8) | | ||
10 | (readPin(B4) ? 0 : 16) | | ||
11 | (readPin(B5) ? 0 : 32); | ||
12 | } | ||
13 | |||
14 | static void select_col(uint8_t col) { | ||
15 | writePinLow(D3); | ||
16 | |||
17 | writePin(D4, (col & 1)); | ||
18 | writePin(D5, (col & 2)); | ||
19 | writePin(D6, (col & 4)); | ||
20 | writePin(D7, (col & 8)); | ||
21 | } | ||
22 | |||
23 | static void unselect_cols(void) { | ||
24 | writePinHigh(D3); | ||
25 | } | ||
26 | |||
27 | void matrix_init_custom(void) { | ||
28 | /* 74HC154 col pin configuration | ||
29 | * pin: D3 D7 D6 D5 D4 | ||
30 | * row: off 0 x x x x | ||
31 | * 0 1 0 0 0 0 | ||
32 | * 1 1 0 0 0 1 | ||
33 | * 2 1 0 0 1 0 | ||
34 | * 3 1 0 0 1 1 | ||
35 | * 4 1 0 1 0 0 | ||
36 | * 5 1 0 1 0 1 | ||
37 | * 6 1 0 1 1 0 | ||
38 | * 7 1 0 1 1 1 | ||
39 | * 8 1 1 0 0 0 | ||
40 | * 9 1 1 0 0 1 | ||
41 | * 10 1 1 0 1 0 | ||
42 | * 11 1 1 0 1 1 | ||
43 | * 12 1 1 1 0 0 | ||
44 | * 13 1 1 1 0 1 | ||
45 | * 14 1 1 1 1 0 | ||
46 | * 15 1 1 1 1 1 | ||
47 | */ | ||
48 | setPinOutput(D3); | ||
49 | writePinHigh(D3); | ||
50 | |||
51 | setPinOutput(D4); | ||
52 | setPinOutput(D5); | ||
53 | setPinOutput(D6); | ||
54 | setPinOutput(D7); | ||
55 | |||
56 | |||
57 | /* Row pin configuration | ||
58 | * | ||
59 | * row: 0 1 2 3 4 5 | ||
60 | * pin: C7 B1 B2 C6 B4 B5 | ||
61 | * | ||
62 | */ | ||
63 | setPinInputHigh(C7); | ||
64 | setPinInputHigh(B1); | ||
65 | setPinInputHigh(B2); | ||
66 | setPinInputHigh(C6); | ||
67 | setPinInputHigh(B4); | ||
68 | setPinInputHigh(B5); | ||
69 | } | ||
70 | |||
71 | bool matrix_scan_custom(matrix_row_t current_matrix[]) { | ||
72 | bool changed = false; | ||
73 | |||
74 | for (uint8_t col = 0; col < MATRIX_COLS; col++) { | ||
75 | select_col(col); | ||
76 | matrix_io_delay(); | ||
77 | uint8_t rows = read_rows(); | ||
78 | |||
79 | for (uint8_t row = 0; row < MATRIX_ROWS; row++) { | ||
80 | bool prev_bit = current_matrix[row] & ((matrix_row_t)1 << col); | ||
81 | bool curr_bit = rows & (1 << row); | ||
82 | |||
83 | if (prev_bit != curr_bit) { | ||
84 | current_matrix[row] ^= ((matrix_row_t)1 << col); | ||
85 | changed = true; | ||
86 | } | ||
87 | } | ||
88 | unselect_cols(); | ||
89 | } | ||
90 | |||
91 | return changed; | ||
92 | } | ||
diff --git a/keyboards/al1/readme.md b/keyboards/al1/readme.md new file mode 100644 index 000000000..3531e2fdc --- /dev/null +++ b/keyboards/al1/readme.md | |||
@@ -0,0 +1,13 @@ | |||
1 | # TriangleLabs AL1 | ||
2 | |||
3 |  | ||
4 | |||
5 | * Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin), [Olivia](https://github.com/olivia) | ||
6 | * Hardware Supported: AL1 PCB | ||
7 | * Hardware Availability: [GroupBuy](https://geekhack.org/index.php?topic=93258.0) | ||
8 | |||
9 | Make example for this keyboard (after setting up your build environment): | ||
10 | |||
11 | make al1:default | ||
12 | |||
13 | 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/al1/rules.mk b/keyboards/al1/rules.mk new file mode 100644 index 000000000..670712f66 --- /dev/null +++ b/keyboards/al1/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 = no # 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 = yes # Commands for debug and configuration | ||
15 | NKRO_ENABLE = no # Enable N-Key Rollover | ||
16 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality | ||
17 | RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | ||
18 | AUDIO_ENABLE = no # Audio output | ||
19 | |||
20 | CUSTOM_MATRIX = lite | ||
21 | SRC += matrix.c | ||