diff options
author | Yan-Fa Li <yanfali@gmail.com> | 2018-08-06 08:40:00 -0700 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2018-08-06 08:40:00 -0700 |
commit | 16d6fd6e8ec8e6423b600459298797c2f14f9647 (patch) | |
tree | 2f179b69ba19bef1a829eb8ceaa712ebfabbe029 | |
parent | 2b0f5d3beaecf67848d4326add039190d99bba26 (diff) | |
download | qmk_firmware-16d6fd6e8ec8e6423b600459298797c2f14f9647.tar.gz qmk_firmware-16d6fd6e8ec8e6423b600459298797c2f14f9647.zip |
Keyboard: Add Catch 22 Hotswap Macropad to QMK (#3576)
* Initial Commit of catch22 macropad by rockydbull
* Add configurator info.json
* Use macros
* Use pragma once
* Use CA22 as product id
* Clean up readme
* Use the layer define value
* Feedback from @drashna
-rw-r--r-- | keyboards/catch22/README.md | 17 | ||||
-rw-r--r-- | keyboards/catch22/catch22.c | 18 | ||||
-rw-r--r-- | keyboards/catch22/catch22.h | 33 | ||||
-rw-r--r-- | keyboards/catch22/config.h | 56 | ||||
-rw-r--r-- | keyboards/catch22/info.json | 10 | ||||
-rw-r--r-- | keyboards/catch22/keymaps/default/keymap.c | 31 | ||||
-rw-r--r-- | keyboards/catch22/rules.mk | 60 |
7 files changed, 225 insertions, 0 deletions
diff --git a/keyboards/catch22/README.md b/keyboards/catch22/README.md new file mode 100644 index 000000000..8d4a22398 --- /dev/null +++ b/keyboards/catch22/README.md | |||
@@ -0,0 +1,17 @@ | |||
1 | # Catch 22 Budget Hotswap Macropad | ||
2 | |||
3 | GB by /u/rockydbull run in July 2018, PCB designed with help from /u/Kilgarah. | ||
4 | |||
5 | Designed to be a budget project board to enjoy hotswapping/switch testing/macro making fun. The board is controlled by a pro micro clone made famous by other projects like the lets split, iris, and nyquist and allows for full QMK implementation. Each Catch22 kit will contain: | ||
6 | |||
7 | * 2 pcbs (one to solder to and one to be a base)(green color) | ||
8 | * 1 pcb material switch plate( green color) with cut out for pcb mount cherry stabilizers | ||
9 | * 40 throughhole diodes (22 for the pcb and the remaining as extras in case you lose one and to use to make the pro micro removeable without desoldering) | ||
10 | * 22 Kailh hotswap sockets | ||
11 | * 1 smd reset button | ||
12 | * 1 dip socket to mount between the pcb and pro micro if you choose to make it removeable without desoldering | ||
13 | * 5 (12mm) m2 standoffs | ||
14 | * 10 m2 screws | ||
15 | * Genuine Cherry pcb mount 2u stabilizer | ||
16 | * 4 rubber bumpons | ||
17 | * Pro Micro is included in kit | ||
diff --git a/keyboards/catch22/catch22.c b/keyboards/catch22/catch22.c new file mode 100644 index 000000000..11a983936 --- /dev/null +++ b/keyboards/catch22/catch22.c | |||
@@ -0,0 +1,18 @@ | |||
1 | /* | ||
2 | Copyright 2018 QMK Community | ||
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 | #include "catch22.h" | ||
diff --git a/keyboards/catch22/catch22.h b/keyboards/catch22/catch22.h new file mode 100644 index 000000000..6eefb9cd5 --- /dev/null +++ b/keyboards/catch22/catch22.h | |||
@@ -0,0 +1,33 @@ | |||
1 | /* | ||
2 | Copyright 2018 QMK Community | ||
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 | #pragma once | ||
18 | |||
19 | #include "quantum.h" | ||
20 | |||
21 | #define LAYOUT( \ | ||
22 | K01, K02, K03, K04, \ | ||
23 | K11, K12, K13, K14, \ | ||
24 | K20, K21, K22, K23, K24, \ | ||
25 | K30, K31, K32, K33, K34, \ | ||
26 | K41, K42, K43, K44 \ | ||
27 | ) { \ | ||
28 | { KC_NO, K01, K02, K03, K04 }, \ | ||
29 | { KC_NO, K11, K12, K13, K14 }, \ | ||
30 | { K20, K21, K22, K23, K24 }, \ | ||
31 | { K30, K31, K32, K33, K34 }, \ | ||
32 | { KC_NO, K41, K42, K43, K44 }, \ | ||
33 | } | ||
diff --git a/keyboards/catch22/config.h b/keyboards/catch22/config.h new file mode 100644 index 000000000..cb7ca7d84 --- /dev/null +++ b/keyboards/catch22/config.h | |||
@@ -0,0 +1,56 @@ | |||
1 | /* | ||
2 | Copyright 2018 QMK Contributors | ||
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 | #pragma once | ||
18 | |||
19 | #include "config_common.h" | ||
20 | |||
21 | /* USB Device descriptor parameter */ | ||
22 | #define VENDOR_ID 0xFEED | ||
23 | #define PRODUCT_ID 0xCA22 | ||
24 | #define DEVICE_VER 0x0001 | ||
25 | #define MANUFACTURER rockydbull | ||
26 | #define PRODUCT Catch22 Hotswap Macropad | ||
27 | #define DESCRIPTION Budget 22 Key Hotswap Macropad | ||
28 | |||
29 | /* key matrix size */ | ||
30 | #define MATRIX_ROWS 5 | ||
31 | #define MATRIX_COLS 5 | ||
32 | |||
33 | /* key matrix pins */ | ||
34 | #define MATRIX_ROW_PINS { B6, B2, B3, B1, F7 } | ||
35 | #define MATRIX_COL_PINS { B5, B4, E6, D7, C6 } | ||
36 | #define UNUSED_PINS { } | ||
37 | |||
38 | /* COL2ROW or ROW2COL */ | ||
39 | #define DIODE_DIRECTION COL2ROW | ||
40 | |||
41 | /* Set 0 if debouncing isn't needed */ | ||
42 | #define DEBOUNCING_DELAY 50 | ||
43 | |||
44 | /* key combination for command */ | ||
45 | #define IS_COMMAND() ( \ | ||
46 | false \ | ||
47 | ) | ||
48 | |||
49 | /* prevent stuck modifiers */ | ||
50 | #define PREVENT_STUCK_MODIFIERS | ||
51 | |||
52 | #ifdef RGBLIGHT_ENABLE | ||
53 | #define RGB_DI_PIN F6 | ||
54 | #define RGBLIGHT_ANIMATIONS | ||
55 | #define RGBLED_NUM 6 | ||
56 | #endif | ||
diff --git a/keyboards/catch22/info.json b/keyboards/catch22/info.json new file mode 100644 index 000000000..eb95b8561 --- /dev/null +++ b/keyboards/catch22/info.json | |||
@@ -0,0 +1,10 @@ | |||
1 | { | ||
2 | "keyboard_name": "catch22", | ||
3 | "width": 5, | ||
4 | "height": 5, | ||
5 | "layouts": { | ||
6 | "LAYOUT": { | ||
7 | "layout": [{"label":"A", "x":1, "y":0}, {"label":"B", "x":2, "y":0}, {"label":"C", "x":3, "y":0}, {"label":"D", "x":4, "y":0}, {"label":"E", "x":1, "y":1}, {"label":"F", "x":2, "y":1}, {"label":"G", "x":3, "y":1}, {"label":"H", "x":4, "y":1}, {"label":"I", "x":0, "y":2}, {"label":"J", "x":1, "y":2}, {"label":"K", "x":2, "y":2}, {"label":"L", "x":3, "y":2}, {"label":"M", "x":4, "y":2}, {"label":"1", "x":0, "y":3, "h":2}, {"label":"N", "x":1, "y":3}, {"label":"O", "x":2, "y":3}, {"label":"P", "x":3, "y":3}, {"label":"Q", "x":4, "y":3}, {"label":"R", "x":1, "y":4}, {"label":"S", "x":2, "y":4}, {"label":"T", "x":3, "y":4}, {"label":"U", "x":4, "y":4}] | ||
8 | } | ||
9 | } | ||
10 | } | ||
diff --git a/keyboards/catch22/keymaps/default/keymap.c b/keyboards/catch22/keymaps/default/keymap.c new file mode 100644 index 000000000..f0300d27f --- /dev/null +++ b/keyboards/catch22/keymaps/default/keymap.c | |||
@@ -0,0 +1,31 @@ | |||
1 | #include QMK_KEYBOARD_H | ||
2 | |||
3 | #define _BASE 0 | ||
4 | #define _FN 1 | ||
5 | |||
6 | #define _______ KC_TRNS | ||
7 | |||
8 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
9 | [_BASE] = LAYOUT( /* Base */ | ||
10 | KC_A, KC_B, KC_C, KC_D, \ | ||
11 | KC_E, KC_F, KC_G, KC_H, \ | ||
12 | MO(_FN), KC_I, KC_J, KC_K, KC_L, \ | ||
13 | KC_1, KC_M, KC_N, KC_O, KC_P, \ | ||
14 | KC_Q, KC_R, KC_S, KC_T \ | ||
15 | ), | ||
16 | [_FN] = LAYOUT( | ||
17 | RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUI, \ | ||
18 | _______, _______, _______, _______, \ | ||
19 | _______, _______, _______, _______, _______, \ | ||
20 | KC_2, _______, _______, _______, _______, \ | ||
21 | _______, _______, _______, _______ \ | ||
22 | ), | ||
23 | }; | ||
24 | |||
25 | const uint16_t PROGMEM fn_actions[] = { | ||
26 | }; | ||
27 | |||
28 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) // MACRODOWN only works in this function | ||
29 | { | ||
30 | return MACRO_NONE; | ||
31 | }; | ||
diff --git a/keyboards/catch22/rules.mk b/keyboards/catch22/rules.mk new file mode 100644 index 000000000..2b76e465c --- /dev/null +++ b/keyboards/catch22/rules.mk | |||
@@ -0,0 +1,60 @@ | |||
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 | # LUFA specific | ||
19 | # | ||
20 | # Target architecture (see library "Board Types" documentation). | ||
21 | ARCH = AVR8 | ||
22 | |||
23 | # Input clock frequency. | ||
24 | # This will define a symbol, F_USB, in all source code files equal to the | ||
25 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
26 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
27 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
28 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
29 | # at the end, this will be done automatically to create a 32-bit value in your | ||
30 | # source code. | ||
31 | # | ||
32 | # If no clock division is performed on the input clock inside the AVR (via the | ||
33 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
34 | F_USB = $(F_CPU) | ||
35 | |||
36 | # Bootloader | ||
37 | BOOTLOADER = caterina | ||
38 | |||
39 | # Interrupt driven control endpoint task(+60) | ||
40 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
41 | |||
42 | |||
43 | # Boot Section Size in *bytes* | ||
44 | #OPT_DEFS += -DBOOTLOADER_SIZE=4096 | ||
45 | |||
46 | |||
47 | # Build Options | ||
48 | # comment out to disable the options. | ||
49 | # | ||
50 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | ||
51 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | ||
52 | EXTRAKEY_ENABLE = no # Audio control and System control(+450) | ||
53 | CONSOLE_ENABLE = yes # Console for debug(+400) | ||
54 | COMMAND_ENABLE = yes # Commands for debug and configuration | ||
55 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
56 | NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
57 | BACKLIGHT_ENABLE = no # Custom backlighting code is used, so this should not be enabled | ||
58 | AUDIO_ENABLE = no # This can be enabled if a speaker is connected to the expansion port. Not compatible with RGBLIGHT below | ||
59 | RGBLIGHT_ENABLE = yes # This can be enabled if a ws2812 strip is connected to the expansion port. | ||
60 | |||