diff options
author | kakunpc <15257475+kakunpc@users.noreply.github.com> | 2019-07-16 02:13:07 +0900 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2019-07-15 10:13:07 -0700 |
commit | cbcf888dc0e74a00e30dc9c3f577f0fafb13f1c2 (patch) | |
tree | 762209f4c2ad32701afa01ae57d5cb248a70c120 | |
parent | d8253b83e81086514a72fe0dfde7e75c047cccc2 (diff) | |
download | qmk_firmware-cbcf888dc0e74a00e30dc9c3f577f0fafb13f1c2.tar.gz qmk_firmware-cbcf888dc0e74a00e30dc9c3f577f0fafb13f1c2.zip |
[Keyboard] new keyboard "angel64" (#6313)
* set template
* set Duplex Matrix
* fix layout
* set default keymap
* fix indent
* remove muhen
* Update keyboards/angel64/rules.mk
Co-Authored-By: fauxpark <fauxpark@gmail.com>
-rw-r--r-- | keyboards/angel64/angel64.c | 51 | ||||
-rw-r--r-- | keyboards/angel64/angel64.h | 48 | ||||
-rw-r--r-- | keyboards/angel64/config.h | 242 | ||||
-rw-r--r-- | keyboards/angel64/info.json | 12 | ||||
-rw-r--r-- | keyboards/angel64/keymaps/default/config.h | 19 | ||||
-rw-r--r-- | keyboards/angel64/keymaps/default/keymap.c | 58 | ||||
-rw-r--r-- | keyboards/angel64/keymaps/default/readme.md | 1 | ||||
-rw-r--r-- | keyboards/angel64/matrix.c | 287 | ||||
-rw-r--r-- | keyboards/angel64/readme.md | 15 | ||||
-rw-r--r-- | keyboards/angel64/rules.mk | 83 |
10 files changed, 816 insertions, 0 deletions
diff --git a/keyboards/angel64/angel64.c b/keyboards/angel64/angel64.c new file mode 100644 index 000000000..d26c3608b --- /dev/null +++ b/keyboards/angel64/angel64.c | |||
@@ -0,0 +1,51 @@ | |||
1 | /* Copyright 2019 kakunpc | ||
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 "angel64.h" | ||
17 | |||
18 | // Optional override functions below. | ||
19 | // You can leave any or all of these undefined. | ||
20 | // These are only required if you want to perform custom actions. | ||
21 | |||
22 | /* | ||
23 | |||
24 | void matrix_init_kb(void) { | ||
25 | // put your keyboard start-up code here | ||
26 | // runs once when the firmware starts up | ||
27 | |||
28 | matrix_init_user(); | ||
29 | } | ||
30 | |||
31 | void matrix_scan_kb(void) { | ||
32 | // put your looping keyboard code here | ||
33 | // runs every cycle (a lot) | ||
34 | |||
35 | matrix_scan_user(); | ||
36 | } | ||
37 | |||
38 | bool process_record_kb(uint16_t keycode, keyrecord_t *record) { | ||
39 | // put your per-action keyboard code here | ||
40 | // runs for every action, just before processing by the firmware | ||
41 | |||
42 | return process_record_user(keycode, record); | ||
43 | } | ||
44 | |||
45 | void led_set_kb(uint8_t usb_led) { | ||
46 | // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here | ||
47 | |||
48 | led_set_user(usb_led); | ||
49 | } | ||
50 | |||
51 | */ | ||
diff --git a/keyboards/angel64/angel64.h b/keyboards/angel64/angel64.h new file mode 100644 index 000000000..6c0898a56 --- /dev/null +++ b/keyboards/angel64/angel64.h | |||
@@ -0,0 +1,48 @@ | |||
1 | /* Copyright 2019 kakunpc | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | #pragma once | ||
17 | |||
18 | #include "quantum.h" | ||
19 | |||
20 | /* This a shortcut to help you visually see your layout. | ||
21 | * | ||
22 | * The first section contains all of the arguments representing the physical | ||
23 | * layout of the board and position of the keys. | ||
24 | * | ||
25 | * The second converts the arguments into a two-dimensional array which | ||
26 | * represents the switch matrix. | ||
27 | */ | ||
28 | #define LAYOUT( \ | ||
29 | k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14, \ | ||
30 | k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, \ | ||
31 | k28, k29, k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k40, \ | ||
32 | k41, k42, k43, k44, k45, k46, k47, k48, k49, k50, k51, k52, k53, \ | ||
33 | k54, k55, k56, k57, k58, k59, k60, k61, k62, k63, k64\ | ||
34 | ) \ | ||
35 | { \ | ||
36 | { k01, k13, k25, k37, k49, k61 }, \ | ||
37 | { k02, k14, k26, k38, k50, k62 }, \ | ||
38 | { k03, k15, k27, k39, k51, k63 }, \ | ||
39 | { k04, k16, k28, k40, k52, k64 }, \ | ||
40 | { k05, k17, k29, k41, k53, KC_NO }, \ | ||
41 | { k06, k18, k30, k42, k54, KC_NO }, \ | ||
42 | { k07, k19, k31, k43, k55, KC_NO }, \ | ||
43 | { k08, k20, k32, k44, k56, KC_NO }, \ | ||
44 | { k09, k21, k33, k45, k57, KC_NO }, \ | ||
45 | { k10, k22, k34, k46, k58, KC_NO }, \ | ||
46 | { k11, k23, k35, k47, k59, KC_NO }, \ | ||
47 | { k12, k24, k36, k48, k60, KC_NO } \ | ||
48 | } | ||
diff --git a/keyboards/angel64/config.h b/keyboards/angel64/config.h new file mode 100644 index 000000000..2289d6667 --- /dev/null +++ b/keyboards/angel64/config.h | |||
@@ -0,0 +1,242 @@ | |||
1 | /* | ||
2 | Copyright 2019 kakunpc | ||
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 0x0000 | ||
25 | #define DEVICE_VER 0x0001 | ||
26 | #define MANUFACTURER kakunpc | ||
27 | #define PRODUCT angel64 | ||
28 | #define DESCRIPTION A custom keyboard | ||
29 | |||
30 | /* key matrix size */ | ||
31 | #define MATRIX_ROWS 12 | ||
32 | #define MATRIX_COLS 6 | ||
33 | |||
34 | /* | ||
35 | * Keyboard Matrix Assignments | ||
36 | * | ||
37 | */ | ||
38 | #define MATRIX_ROW_PINS { D4, C6, D7, E6, B4, B5 } | ||
39 | #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } | ||
40 | #define UNUSED_PINS | ||
41 | |||
42 | /* | ||
43 | * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. | ||
44 | */ | ||
45 | #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 | ||
46 | |||
47 | // #define BACKLIGHT_PIN B7 | ||
48 | // #define BACKLIGHT_BREATHING | ||
49 | // #define BACKLIGHT_LEVELS 3 | ||
50 | |||
51 | // #define RGB_DI_PIN E2 | ||
52 | // #ifdef RGB_DI_PIN | ||
53 | // #define RGBLED_NUM 64 | ||
54 | // #define RGBLIGHT_HUE_STEP 8 | ||
55 | // #define RGBLIGHT_SAT_STEP 8 | ||
56 | // #define RGBLIGHT_VAL_STEP 8 | ||
57 | // #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ | ||
58 | // #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ | ||
59 | // /*== all animations enable ==*/ | ||
60 | // #define RGBLIGHT_ANIMATIONS | ||
61 | // /*== or choose animations ==*/ | ||
62 | // #define RGBLIGHT_EFFECT_BREATHING | ||
63 | // #define RGBLIGHT_EFFECT_RAINBOW_MOOD | ||
64 | // #define RGBLIGHT_EFFECT_RAINBOW_SWIRL | ||
65 | // #define RGBLIGHT_EFFECT_SNAKE | ||
66 | // #define RGBLIGHT_EFFECT_KNIGHT | ||
67 | // #define RGBLIGHT_EFFECT_CHRISTMAS | ||
68 | // #define RGBLIGHT_EFFECT_STATIC_GRADIENT | ||
69 | // #define RGBLIGHT_EFFECT_RGB_TEST | ||
70 | // #define RGBLIGHT_EFFECT_ALTERNATING | ||
71 | // /*== customize breathing effect ==*/ | ||
72 | // /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ | ||
73 | // #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 | ||
74 | // /*==== use exp() and sin() ====*/ | ||
75 | // #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 | ||
76 | // #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 | ||
77 | // #endif | ||
78 | |||
79 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
80 | #define DEBOUNCE 5 | ||
81 | |||
82 | /* define if matrix has ghost (lacks anti-ghosting diodes) */ | ||
83 | //#define MATRIX_HAS_GHOST | ||
84 | |||
85 | /* number of backlight levels */ | ||
86 | |||
87 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
88 | #define LOCKING_SUPPORT_ENABLE | ||
89 | /* Locking resynchronize hack */ | ||
90 | #define LOCKING_RESYNC_ENABLE | ||
91 | |||
92 | /* If defined, GRAVE_ESC will always act as ESC when CTRL is held. | ||
93 | * This is userful for the Windows task manager shortcut (ctrl+shift+esc). | ||
94 | */ | ||
95 | // #define GRAVE_ESC_CTRL_OVERRIDE | ||
96 | |||
97 | /* | ||
98 | * Force NKRO | ||
99 | * | ||
100 | * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved | ||
101 | * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the | ||
102 | * makefile for this to work.) | ||
103 | * | ||
104 | * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) | ||
105 | * until the next keyboard reset. | ||
106 | * | ||
107 | * NKRO may prevent your keystrokes from being detected in the BIOS, but it is | ||
108 | * fully operational during normal computer usage. | ||
109 | * | ||
110 | * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) | ||
111 | * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by | ||
112 | * bootmagic, NKRO mode will always be enabled until it is toggled again during a | ||
113 | * power-up. | ||
114 | * | ||
115 | */ | ||
116 | //#define FORCE_NKRO | ||
117 | |||
118 | /* | ||
119 | * Magic Key Options | ||
120 | * | ||
121 | * Magic keys are hotkey commands that allow control over firmware functions of | ||
122 | * the keyboard. They are best used in combination with the HID Listen program, | ||
123 | * found here: https://www.pjrc.com/teensy/hid_listen.html | ||
124 | * | ||
125 | * The options below allow the magic key functionality to be changed. This is | ||
126 | * useful if your keyboard/keypad is missing keys and you want magic key support. | ||
127 | * | ||
128 | */ | ||
129 | |||
130 | /* key combination for magic key command */ | ||
131 | /* defined by default; to change, uncomment and set to the combination you want */ | ||
132 | // #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) | ||
133 | |||
134 | /* control how magic key switches layers */ | ||
135 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true | ||
136 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true | ||
137 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false | ||
138 | |||
139 | /* override magic key keymap */ | ||
140 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS | ||
141 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS | ||
142 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM | ||
143 | //#define MAGIC_KEY_HELP H | ||
144 | //#define MAGIC_KEY_HELP_ALT SLASH | ||
145 | //#define MAGIC_KEY_DEBUG D | ||
146 | //#define MAGIC_KEY_DEBUG_MATRIX X | ||
147 | //#define MAGIC_KEY_DEBUG_KBD K | ||
148 | //#define MAGIC_KEY_DEBUG_MOUSE M | ||
149 | //#define MAGIC_KEY_VERSION V | ||
150 | //#define MAGIC_KEY_STATUS S | ||
151 | //#define MAGIC_KEY_CONSOLE C | ||
152 | //#define MAGIC_KEY_LAYER0 0 | ||
153 | //#define MAGIC_KEY_LAYER0_ALT GRAVE | ||
154 | //#define MAGIC_KEY_LAYER1 1 | ||
155 | //#define MAGIC_KEY_LAYER2 2 | ||
156 | //#define MAGIC_KEY_LAYER3 3 | ||
157 | //#define MAGIC_KEY_LAYER4 4 | ||
158 | //#define MAGIC_KEY_LAYER5 5 | ||
159 | //#define MAGIC_KEY_LAYER6 6 | ||
160 | //#define MAGIC_KEY_LAYER7 7 | ||
161 | //#define MAGIC_KEY_LAYER8 8 | ||
162 | //#define MAGIC_KEY_LAYER9 9 | ||
163 | //#define MAGIC_KEY_BOOTLOADER B | ||
164 | //#define MAGIC_KEY_BOOTLOADER_ALT ESC | ||
165 | //#define MAGIC_KEY_LOCK CAPS | ||
166 | //#define MAGIC_KEY_EEPROM E | ||
167 | //#define MAGIC_KEY_EEPROM_CLEAR BSPACE | ||
168 | //#define MAGIC_KEY_NKRO N | ||
169 | //#define MAGIC_KEY_SLEEP_LED Z | ||
170 | |||
171 | /* | ||
172 | * Feature disable options | ||
173 | * These options are also useful to firmware size reduction. | ||
174 | */ | ||
175 | |||
176 | /* disable debug print */ | ||
177 | //#define NO_DEBUG | ||
178 | |||
179 | /* disable print */ | ||
180 | //#define NO_PRINT | ||
181 | |||
182 | /* disable action features */ | ||
183 | //#define NO_ACTION_LAYER | ||
184 | //#define NO_ACTION_TAPPING | ||
185 | //#define NO_ACTION_ONESHOT | ||
186 | //#define NO_ACTION_MACRO | ||
187 | //#define NO_ACTION_FUNCTION | ||
188 | |||
189 | /* | ||
190 | * MIDI options | ||
191 | */ | ||
192 | |||
193 | /* Prevent use of disabled MIDI features in the keymap */ | ||
194 | //#define MIDI_ENABLE_STRICT 1 | ||
195 | |||
196 | /* enable basic MIDI features: | ||
197 | - MIDI notes can be sent when in Music mode is on | ||
198 | */ | ||
199 | //#define MIDI_BASIC | ||
200 | |||
201 | /* enable advanced MIDI features: | ||
202 | - MIDI notes can be added to the keymap | ||
203 | - Octave shift and transpose | ||
204 | - Virtual sustain, portamento, and modulation wheel | ||
205 | - etc. | ||
206 | */ | ||
207 | //#define MIDI_ADVANCED | ||
208 | |||
209 | /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ | ||
210 | //#define MIDI_TONE_KEYCODE_OCTAVES 1 | ||
211 | |||
212 | /* | ||
213 | * HD44780 LCD Display Configuration | ||
214 | */ | ||
215 | /* | ||
216 | #define LCD_LINES 2 //< number of visible lines of the display | ||
217 | #define LCD_DISP_LENGTH 16 //< visibles characters per line of the display | ||
218 | |||
219 | #define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode | ||
220 | |||
221 | #if LCD_IO_MODE | ||
222 | #define LCD_PORT PORTB //< port for the LCD lines | ||
223 | #define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 | ||
224 | #define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 | ||
225 | #define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 | ||
226 | #define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 | ||
227 | #define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 | ||
228 | #define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 | ||
229 | #define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 | ||
230 | #define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 | ||
231 | #define LCD_RS_PORT LCD_PORT //< port for RS line | ||
232 | #define LCD_RS_PIN 3 //< pin for RS line | ||
233 | #define LCD_RW_PORT LCD_PORT //< port for RW line | ||
234 | #define LCD_RW_PIN 2 //< pin for RW line | ||
235 | #define LCD_E_PORT LCD_PORT //< port for Enable line | ||
236 | #define LCD_E_PIN 1 //< pin for Enable line | ||
237 | #endif | ||
238 | */ | ||
239 | |||
240 | /* Bootmagic Lite key configuration */ | ||
241 | // #define BOOTMAGIC_LITE_ROW 0 | ||
242 | // #define BOOTMAGIC_LITE_COLUMN 0 | ||
diff --git a/keyboards/angel64/info.json b/keyboards/angel64/info.json new file mode 100644 index 000000000..2bcd0c9ea --- /dev/null +++ b/keyboards/angel64/info.json | |||
@@ -0,0 +1,12 @@ | |||
1 | { | ||
2 | "keyboard_name": "angel64", | ||
3 | "url": "https://kakunpc.booth.pm/", | ||
4 | "maintainer": "kakunpc", | ||
5 | "width": 14, | ||
6 | "height": 5, | ||
7 | "layouts": { | ||
8 | "LAYOUT": { | ||
9 | "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"back", "x":13, "y":0}, {"label":"Q", "x":0, "y":1, "w":1.5}, {"label":"W", "x":1.5, "y":1}, {"label":"E", "x":2.5, "y":1}, {"label":"R", "x":3.5, "y":1}, {"label":"T", "x":4.5, "y":1}, {"label":"Y", "x":5.5, "y":1}, {"label":"U", "x":6.5, "y":1}, {"label":"I", "x":7.5, "y":1}, {"label":"O", "x":8.5, "y":1}, {"label":"P", "x":9.5, "y":1}, {"label":"[", "x":10.5, "y":1}, {"label":"]", "x":11.5, "y":1}, {"label":"|", "x":12.5, "y":1, "w":1.5}, {"label":"Ctrl", "x":0, "y":2}, {"label":"A", "x":1, "y":2}, {"label":"S", "x":2, "y":2}, {"label":"D", "x":3, "y":2}, {"label":"F", "x":4, "y":2}, {"label":"G", "x":5, "y":2}, {"label":"H", "x":6, "y":2}, {"label":"J", "x":7, "y":2}, {"label":"K", "x":8, "y":2}, {"label":"L", "x":9, "y":2}, {"label":";:", "x":10, "y":2}, {"label":"`", "x":11, "y":2}, {"label":"Enter", "x":12, "y":2, "w":2}, {"label":"Shift", "x":0, "y":3, "w":1.5}, {"label":"Z", "x":1.5, "y":3}, {"label":"X", "x":2.5, "y":3}, {"label":"C", "x":3.5, "y":3}, {"label":"V", "x":4.5, "y":3}, {"label":"B", "x":5.5, "y":3}, {"label":"N", "x":6.5, "y":3}, {"label":"M", "x":7.5, "y":3}, {"label":"<", "x":8.5, "y":3}, {"label":">", "x":9.5, "y":3}, {"label":"?", "x":10.5, "y":3}, {"label":"\u2191", "x":11.5, "y":3}, {"label":"Fn", "x":12.5, "y":3, "w":1.5}, {"label":"Caps", "x":0, "y":4}, {"label":"Alt", "x":1, "y":4}, {"label":"Start", "x":2, "y":4, "w":1.5}, {"label":"Ctrl", "x":3.5, "y":4, "w":1.5}, {"label":"Space", "x":5, "y":4, "w":2}, {"label":"Ctrl", "x":7, "y":4, "w":1.5}, {"label":"Alt", "x":8.5, "y":4, "w":1.5}, {"label":"\u2190", "x":10, "y":4}, {"label":"\u2193", "x":11, "y":4}, {"label":"\u2192", "x":12, "y":4}, {"label":"Alt", "x":13, "y":4}] | ||
10 | } | ||
11 | } | ||
12 | } | ||
diff --git a/keyboards/angel64/keymaps/default/config.h b/keyboards/angel64/keymaps/default/config.h new file mode 100644 index 000000000..bf1149ebc --- /dev/null +++ b/keyboards/angel64/keymaps/default/config.h | |||
@@ -0,0 +1,19 @@ | |||
1 | /* Copyright 2019 kakunpc | ||
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 | // place overrides here | ||
diff --git a/keyboards/angel64/keymaps/default/keymap.c b/keyboards/angel64/keymaps/default/keymap.c new file mode 100644 index 000000000..50ca64fde --- /dev/null +++ b/keyboards/angel64/keymaps/default/keymap.c | |||
@@ -0,0 +1,58 @@ | |||
1 | /* Copyright 2019 kakunpc | ||
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 | enum layers{ | ||
19 | BASE = 0, | ||
20 | COMMAND | ||
21 | }; | ||
22 | |||
23 | #define KC_COMMAND LT(COMMAND,KC_SPC) | ||
24 | |||
25 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
26 | [BASE] = LAYOUT( | ||
27 | 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 , | ||
28 | 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, | ||
29 | KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, | ||
30 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_RSFT, | ||
31 | KC_LCTL, KC_LALT, KC_LGUI, KC_COMMAND, KC_SPC, KC_COMMAND, KC_CAPS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_DEL | ||
32 | ), | ||
33 | [COMMAND] = LAYOUT( | ||
34 | 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_BSPC , | ||
35 | KC_NO, KC_UP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, | ||
36 | KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, | ||
37 | KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, | ||
38 | KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO | ||
39 | ) | ||
40 | }; | ||
41 | |||
42 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
43 | return true; | ||
44 | } | ||
45 | |||
46 | void matrix_init_user(void) { | ||
47 | } | ||
48 | |||
49 | void matrix_scan_user(void) { | ||
50 | |||
51 | } | ||
52 | |||
53 | void led_set_user(uint8_t usb_led) { | ||
54 | |||
55 | } | ||
56 | |||
57 | void keyboard_post_init_user(void) { | ||
58 | } | ||
diff --git a/keyboards/angel64/keymaps/default/readme.md b/keyboards/angel64/keymaps/default/readme.md new file mode 100644 index 000000000..f4cd48f2e --- /dev/null +++ b/keyboards/angel64/keymaps/default/readme.md | |||
@@ -0,0 +1 @@ | |||
# The default keymap for angel64 \ No newline at end of file | |||
diff --git a/keyboards/angel64/matrix.c b/keyboards/angel64/matrix.c new file mode 100644 index 000000000..e06fc15dc --- /dev/null +++ b/keyboards/angel64/matrix.c | |||
@@ -0,0 +1,287 @@ | |||
1 | /* | ||
2 | Copyright 2012-2018 Jun Wako, Jack Humbert, Yiancar | ||
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 | #include <stdint.h> | ||
18 | #include <stdbool.h> | ||
19 | #include "wait.h" | ||
20 | #include "print.h" | ||
21 | #include "debug.h" | ||
22 | #include "util.h" | ||
23 | #include "matrix.h" | ||
24 | #include "debounce.h" | ||
25 | #include "quantum.h" | ||
26 | |||
27 | #if (MATRIX_COLS <= 8) | ||
28 | # define print_matrix_header() print("\nr/c 01234567\n") | ||
29 | # define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) | ||
30 | # define matrix_bitpop(i) bitpop(matrix[i]) | ||
31 | # define ROW_SHIFTER ((uint8_t)1) | ||
32 | #elif (MATRIX_COLS <= 16) | ||
33 | # define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") | ||
34 | # define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) | ||
35 | # define matrix_bitpop(i) bitpop16(matrix[i]) | ||
36 | # define ROW_SHIFTER ((uint16_t)1) | ||
37 | #elif (MATRIX_COLS <= 32) | ||
38 | # define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") | ||
39 | # define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) | ||
40 | # define matrix_bitpop(i) bitpop32(matrix[i]) | ||
41 | # define ROW_SHIFTER ((uint32_t)1) | ||
42 | #endif | ||
43 | |||
44 | #ifdef MATRIX_MASKED | ||
45 | extern const matrix_row_t matrix_mask[]; | ||
46 | #endif | ||
47 | |||
48 | static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; | ||
49 | static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; | ||
50 | |||
51 | /* matrix state(1:on, 0:off) */ | ||
52 | static matrix_row_t raw_matrix[MATRIX_ROWS]; //raw values | ||
53 | static matrix_row_t matrix[MATRIX_ROWS]; //debounced values | ||
54 | |||
55 | __attribute__ ((weak)) | ||
56 | void matrix_init_quantum(void) { | ||
57 | matrix_init_kb(); | ||
58 | } | ||
59 | |||
60 | __attribute__ ((weak)) | ||
61 | void matrix_scan_quantum(void) { | ||
62 | matrix_scan_kb(); | ||
63 | } | ||
64 | |||
65 | __attribute__ ((weak)) | ||
66 | void matrix_init_kb(void) { | ||
67 | matrix_init_user(); | ||
68 | } | ||
69 | |||
70 | __attribute__ ((weak)) | ||
71 | void matrix_scan_kb(void) { | ||
72 | matrix_scan_user(); | ||
73 | } | ||
74 | |||
75 | __attribute__ ((weak)) | ||
76 | void matrix_init_user(void) { | ||
77 | } | ||
78 | |||
79 | __attribute__ ((weak)) | ||
80 | void matrix_scan_user(void) { | ||
81 | } | ||
82 | |||
83 | inline | ||
84 | uint8_t matrix_rows(void) { | ||
85 | return MATRIX_ROWS; | ||
86 | } | ||
87 | |||
88 | inline | ||
89 | uint8_t matrix_cols(void) { | ||
90 | return MATRIX_COLS; | ||
91 | } | ||
92 | |||
93 | //Deprecated. | ||
94 | bool matrix_is_modified(void) | ||
95 | { | ||
96 | if (debounce_active()) return false; | ||
97 | return true; | ||
98 | } | ||
99 | |||
100 | inline | ||
101 | bool matrix_is_on(uint8_t row, uint8_t col) | ||
102 | { | ||
103 | return (matrix[row] & ((matrix_row_t)1<<col)); | ||
104 | } | ||
105 | |||
106 | inline | ||
107 | matrix_row_t matrix_get_row(uint8_t row) | ||
108 | { | ||
109 | // Matrix mask lets you disable switches in the returned matrix data. For example, if you have a | ||
110 | // switch blocker installed and the switch is always pressed. | ||
111 | #ifdef MATRIX_MASKED | ||
112 | return matrix[row] & matrix_mask[row]; | ||
113 | #else | ||
114 | return matrix[row]; | ||
115 | #endif | ||
116 | } | ||
117 | |||
118 | void matrix_print(void) | ||
119 | { | ||
120 | print_matrix_header(); | ||
121 | |||
122 | for (uint8_t row = 0; row < MATRIX_ROWS; row++) { | ||
123 | phex(row); print(": "); | ||
124 | print_matrix_row(row); | ||
125 | print("\n"); | ||
126 | } | ||
127 | } | ||
128 | |||
129 | uint8_t matrix_key_count(void) | ||
130 | { | ||
131 | uint8_t count = 0; | ||
132 | for (uint8_t i = 0; i < MATRIX_ROWS; i++) { | ||
133 | count += matrix_bitpop(i); | ||
134 | } | ||
135 | return count; | ||
136 | } | ||
137 | |||
138 | static void select_row(uint8_t row) | ||
139 | { | ||
140 | setPinOutput(row_pins[row]); | ||
141 | writePinLow(row_pins[row]); | ||
142 | } | ||
143 | |||
144 | static void unselect_row(uint8_t row) | ||
145 | { | ||
146 | setPinInputHigh(row_pins[row]); | ||
147 | } | ||
148 | |||
149 | static void unselect_rows(void) | ||
150 | { | ||
151 | for(uint8_t x = 0; x < MATRIX_ROWS; x++) { | ||
152 | setPinInputHigh(row_pins[x]); | ||
153 | } | ||
154 | } | ||
155 | |||
156 | static void select_col(uint8_t col) | ||
157 | { | ||
158 | setPinOutput(col_pins[col]); | ||
159 | writePinLow(col_pins[col]); | ||
160 | } | ||
161 | |||
162 | static void unselect_col(uint8_t col) | ||
163 | { | ||
164 | setPinInputHigh(col_pins[col]); | ||
165 | } | ||
166 | |||
167 | static void unselect_cols(void) | ||
168 | { | ||
169 | for(uint8_t x = 0; x < MATRIX_COLS; x++) { | ||
170 | setPinInputHigh(col_pins[x]); | ||
171 | } | ||
172 | } | ||
173 | |||
174 | static void init_pins(void) { | ||
175 | unselect_rows(); | ||
176 | unselect_cols(); | ||
177 | for (uint8_t x = 0; x < MATRIX_COLS; x++) { | ||
178 | setPinInputHigh(col_pins[x]); | ||
179 | } | ||
180 | for (uint8_t x = 0; x < MATRIX_ROWS; x++) { | ||
181 | setPinInputHigh(row_pins[x]); | ||
182 | } | ||
183 | } | ||
184 | |||
185 | static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) | ||
186 | { | ||
187 | // Store last value of row prior to reading | ||
188 | matrix_row_t last_row_value = current_matrix[current_row]; | ||
189 | |||
190 | // Clear data in matrix row | ||
191 | current_matrix[current_row] = 0; | ||
192 | |||
193 | // Select row and wait for row selecton to stabilize | ||
194 | select_row(current_row); | ||
195 | wait_us(30); | ||
196 | |||
197 | // For each col... | ||
198 | for(uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { | ||
199 | |||
200 | // Select the col pin to read (active low) | ||
201 | uint8_t pin_state = readPin(col_pins[col_index]); | ||
202 | |||
203 | // Populate the matrix row with the state of the col pin | ||
204 | current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index); | ||
205 | } | ||
206 | |||
207 | // Unselect row | ||
208 | unselect_row(current_row); | ||
209 | |||
210 | return (last_row_value != current_matrix[current_row]); | ||
211 | } | ||
212 | |||
213 | static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) | ||
214 | { | ||
215 | bool matrix_changed = false; | ||
216 | |||
217 | // Select col and wait for col selecton to stabilize | ||
218 | select_col(current_col); | ||
219 | wait_us(30); | ||
220 | |||
221 | // For each row... | ||
222 | for(uint8_t row_index = 0; row_index < MATRIX_ROWS/2; row_index++) | ||
223 | { | ||
224 | uint8_t tmp = row_index + MATRIX_ROWS/2; | ||
225 | // Store last value of row prior to reading | ||
226 | matrix_row_t last_row_value = current_matrix[tmp]; | ||
227 | |||
228 | // Check row pin state | ||
229 | if (readPin(row_pins[row_index]) == 0) | ||
230 | { | ||
231 | // Pin LO, set col bit | ||
232 | current_matrix[tmp] |= (ROW_SHIFTER << current_col); | ||
233 | } | ||
234 | else | ||
235 | { | ||
236 | // Pin HI, clear col bit | ||
237 | current_matrix[tmp] &= ~(ROW_SHIFTER << current_col); | ||
238 | } | ||
239 | |||
240 | // Determine if the matrix changed state | ||
241 | if ((last_row_value != current_matrix[tmp]) && !(matrix_changed)) | ||
242 | { | ||
243 | matrix_changed = true; | ||
244 | } | ||
245 | } | ||
246 | |||
247 | // Unselect col | ||
248 | unselect_col(current_col); | ||
249 | |||
250 | return matrix_changed; | ||
251 | } | ||
252 | |||
253 | void matrix_init(void) { | ||
254 | |||
255 | // initialize key pins | ||
256 | init_pins(); | ||
257 | |||
258 | // initialize matrix state: all keys off | ||
259 | for (uint8_t i=0; i < MATRIX_ROWS; i++) { | ||
260 | raw_matrix[i] = 0; | ||
261 | matrix[i] = 0; | ||
262 | } | ||
263 | |||
264 | debounce_init(MATRIX_ROWS); | ||
265 | |||
266 | matrix_init_quantum(); | ||
267 | } | ||
268 | |||
269 | uint8_t matrix_scan(void) | ||
270 | { | ||
271 | bool changed = false; | ||
272 | |||
273 | // Set row, read cols | ||
274 | for (uint8_t current_row = 0; current_row < MATRIX_ROWS / 2; current_row++) { | ||
275 | changed |= read_cols_on_row(raw_matrix, current_row); | ||
276 | } | ||
277 | //else | ||
278 | // Set col, read rows | ||
279 | for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { | ||
280 | changed |= read_rows_on_col(raw_matrix, current_col); | ||
281 | } | ||
282 | |||
283 | debounce(raw_matrix, matrix, MATRIX_ROWS, changed); | ||
284 | |||
285 | matrix_scan_quantum(); | ||
286 | return (uint8_t)changed; | ||
287 | } | ||
diff --git a/keyboards/angel64/readme.md b/keyboards/angel64/readme.md new file mode 100644 index 000000000..b56592cbb --- /dev/null +++ b/keyboards/angel64/readme.md | |||
@@ -0,0 +1,15 @@ | |||
1 | # angel64 | ||
2 | |||
3 |  | ||
4 | |||
5 | Keyboard for tablets. | ||
6 | |||
7 | Keyboard Maintainer: [kakunpc](https://github.com/kakunpc) | ||
8 | Hardware Supported: angel64_alpha, promicro | ||
9 | Hardware Availability: booth([@kakunpc](https://kakunpc.booth.pm/)) | ||
10 | |||
11 | Make example for this keyboard (after setting up your build environment): | ||
12 | |||
13 | make angel64:default | ||
14 | |||
15 | See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). | ||
diff --git a/keyboards/angel64/rules.mk b/keyboards/angel64/rules.mk new file mode 100644 index 000000000..b1ef9b765 --- /dev/null +++ b/keyboards/angel64/rules.mk | |||
@@ -0,0 +1,83 @@ | |||
1 | # MCU name | ||
2 | MCU = atmega32u4 | ||
3 | |||
4 | # Processor frequency. | ||
5 | # This will define a symbol, F_CPU, in all source code files equal to the | ||
6 | # processor frequency in Hz. You can then use this symbol in your source code to | ||
7 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | ||
8 | # automatically to create a 32-bit value in your source code. | ||
9 | # | ||
10 | # This will be an integer division of F_USB below, as it is sourced by | ||
11 | # F_USB after it has run through any CPU prescalers. Note that this value | ||
12 | # does not *change* the processor frequency - it should merely be updated to | ||
13 | # reflect the processor speed set externally so that the code can use accurate | ||
14 | # software delays. | ||
15 | F_CPU = 16000000 | ||
16 | |||
17 | |||
18 | # | ||
19 | # LUFA specific | ||
20 | # | ||
21 | # Target architecture (see library "Board Types" documentation). | ||
22 | ARCH = AVR8 | ||
23 | |||
24 | # Input clock frequency. | ||
25 | # This will define a symbol, F_USB, in all source code files equal to the | ||
26 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
27 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
28 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
29 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
30 | # at the end, this will be done automatically to create a 32-bit value in your | ||
31 | # source code. | ||
32 | # | ||
33 | # If no clock division is performed on the input clock inside the AVR (via the | ||
34 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
35 | F_USB = $(F_CPU) | ||
36 | |||
37 | # Interrupt driven control endpoint task(+60) | ||
38 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
39 | |||
40 | |||
41 | # Bootloader selection | ||
42 | # Teensy halfkay | ||
43 | # Pro Micro caterina | ||
44 | # Atmel DFU atmel-dfu | ||
45 | # LUFA DFU lufa-dfu | ||
46 | # QMK DFU qmk-dfu | ||
47 | # atmega32a bootloadHID | ||
48 | BOOTLOADER = atmel-dfu | ||
49 | |||
50 | |||
51 | # If you don't know the bootloader type, then you can specify the | ||
52 | # Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line | ||
53 | # Teensy halfKay 512 | ||
54 | # Teensy++ halfKay 1024 | ||
55 | # Atmel DFU loader 4096 | ||
56 | # LUFA bootloader 4096 | ||
57 | # USBaspLoader 2048 | ||
58 | # OPT_DEFS += -DBOOTLOADER_SIZE=4096 | ||
59 | |||
60 | |||
61 | # Build Options | ||
62 | # change yes to no to disable | ||
63 | # | ||
64 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | ||
65 | MOUSEKEY_ENABLE = yes # Mouse keys(+4700) | ||
66 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||
67 | CONSOLE_ENABLE = yes # Console for debug(+400) | ||
68 | COMMAND_ENABLE = yes # Commands for debug and configuration | ||
69 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
70 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
71 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
72 | NKRO_ENABLE = no # USB Nkey Rollover | ||
73 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default | ||
74 | RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | ||
75 | MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) | ||
76 | UNICODE_ENABLE = no # Unicode | ||
77 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
78 | AUDIO_ENABLE = no # Audio output on port C6 | ||
79 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | ||
80 | HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) | ||
81 | CUSTOM_MATRIX = yes | ||
82 | |||
83 | SRC += matrix.c | ||