diff options
-rw-r--r-- | keyboards/crbn/config.h | 54 | ||||
-rw-r--r-- | keyboards/crbn/crbn.c | 24 | ||||
-rw-r--r-- | keyboards/crbn/crbn.h | 42 | ||||
-rw-r--r-- | keyboards/crbn/info.json | 109 | ||||
-rw-r--r-- | keyboards/crbn/keymaps/default/keymap.c | 45 | ||||
-rw-r--r-- | keyboards/crbn/readme.md | 19 | ||||
-rw-r--r-- | keyboards/crbn/rules.mk | 23 |
7 files changed, 316 insertions, 0 deletions
diff --git a/keyboards/crbn/config.h b/keyboards/crbn/config.h new file mode 100644 index 000000000..887302226 --- /dev/null +++ b/keyboards/crbn/config.h | |||
@@ -0,0 +1,54 @@ | |||
1 | /* Copyright 2020 Harry Herring | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | #pragma once | ||
18 | |||
19 | #include "config_common.h" | ||
20 | |||
21 | /* USB Device descriptor parameter */ | ||
22 | #define VENDOR_ID 0x726F | ||
23 | #define PRODUCT_ID 0x0002 | ||
24 | #define DEVICE_VER 0x0001 | ||
25 | #define MANUFACTURER Polarity Works | ||
26 | #define PRODUCT CRBN | ||
27 | |||
28 | /* key matrix size */ | ||
29 | #define MATRIX_ROWS 4 | ||
30 | #define MATRIX_COLS 12 | ||
31 | |||
32 | /* key matrix pins */ | ||
33 | #define MATRIX_ROW_PINS { B3, B1, F7, F6 } | ||
34 | #define MATRIX_COL_PINS { D3, D2, D1, D0, D4, C6, D7, E6, B4, B5, B6, B2 } | ||
35 | #define UNUSED_PINS | ||
36 | |||
37 | /* COL2ROW or ROW2COL */ | ||
38 | #define DIODE_DIRECTION COL2ROW | ||
39 | |||
40 | /*Rotary Encoder Pins*/ | ||
41 | #define ENCODERS_PAD_A { F5 } | ||
42 | #define ENCODERS_PAD_B { F4 } | ||
43 | |||
44 | /*Sets the number of pulses per increment*/ | ||
45 | #define ENCODER_RESOLUTION 2 | ||
46 | |||
47 | /* Set 0 if debouncing isn't needed */ | ||
48 | #define DEBOUNCE 5 | ||
49 | |||
50 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
51 | #define LOCKING_SUPPORT_ENABLE | ||
52 | |||
53 | /* Locking resynchronize hack */ | ||
54 | #define LOCKING_RESYNC_ENABLE | ||
diff --git a/keyboards/crbn/crbn.c b/keyboards/crbn/crbn.c new file mode 100644 index 000000000..1da726b9c --- /dev/null +++ b/keyboards/crbn/crbn.c | |||
@@ -0,0 +1,24 @@ | |||
1 | /* Copyright 2020 Harry Herring | ||
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 "crbn.h" | ||
17 | /* Encoder setting. only one encoder despite 4 possible spots */ | ||
18 | __attribute__((weak)) void encoder_update_user(uint8_t index, bool clockwise) { | ||
19 | if (clockwise) { | ||
20 | tap_code(KC_VOLU); | ||
21 | } else { | ||
22 | tap_code(KC_VOLD); | ||
23 | } | ||
24 | } | ||
diff --git a/keyboards/crbn/crbn.h b/keyboards/crbn/crbn.h new file mode 100644 index 000000000..54ff00707 --- /dev/null +++ b/keyboards/crbn/crbn.h | |||
@@ -0,0 +1,42 @@ | |||
1 | /* Copyright 2020 Harry Herring | ||
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 | #define LAYOUT_crbn_1x2u( \ | ||
21 | K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \ | ||
22 | K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \ | ||
23 | K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \ | ||
24 | K300, K301, K302, K303, K304, K305, K307, K308, K309, K310, K311 \ | ||
25 | ) { \ | ||
26 | { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \ | ||
27 | { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111 }, \ | ||
28 | { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \ | ||
29 | { K300, K301, K302, K303, K304, K305, KC_NO, K307, K308, K309, K310, K311 } \ | ||
30 | } | ||
31 | |||
32 | #define LAYOUT_crbn_2x2u( \ | ||
33 | K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \ | ||
34 | K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \ | ||
35 | K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \ | ||
36 | K300, K301, K302, K303, K304, K307, K308, K309, K310, K311 \ | ||
37 | ) { \ | ||
38 | { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \ | ||
39 | { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111 }, \ | ||
40 | { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \ | ||
41 | { K300, K301, K302, K303, K304, KC_NO, KC_NO, K307, K308, K309, K310, K311 } \ | ||
42 | } | ||
diff --git a/keyboards/crbn/info.json b/keyboards/crbn/info.json new file mode 100644 index 000000000..7b6766807 --- /dev/null +++ b/keyboards/crbn/info.json | |||
@@ -0,0 +1,109 @@ | |||
1 | { | ||
2 | "keyboard_name": "CRBN", | ||
3 | "keyboard_folder": "crbn", | ||
4 | "url": "polarityworks.com", | ||
5 | "maintainer": "qmk", | ||
6 | "width": 12, | ||
7 | "height": 4, | ||
8 | "layouts": { | ||
9 | "LAYOUT_crbn_1x2u": { | ||
10 | "layout": [ | ||
11 | { "w": 1, "x": 0, "y": 0 }, | ||
12 | { "w": 1, "x": 1, "y": 0 }, | ||
13 | { "w": 1, "x": 2, "y": 0 }, | ||
14 | { "w": 1, "x": 3, "y": 0 }, | ||
15 | { "w": 1, "x": 4, "y": 0 }, | ||
16 | { "w": 1, "x": 5, "y": 0 }, | ||
17 | { "w": 1, "x": 6, "y": 0 }, | ||
18 | { "w": 1, "x": 7, "y": 0 }, | ||
19 | { "w": 1, "x": 8, "y": 0 }, | ||
20 | { "w": 1, "x": 9, "y": 0 }, | ||
21 | { "w": 1, "x": 10, "y": 0 }, | ||
22 | { "w": 1, "x": 11, "y": 0 }, | ||
23 | { "w": 1, "x": 0, "y": 1 }, | ||
24 | { "w": 1, "x": 1, "y": 1 }, | ||
25 | { "w": 1, "x": 2, "y": 1 }, | ||
26 | { "w": 1, "x": 3, "y": 1 }, | ||
27 | { "w": 1, "x": 4, "y": 1 }, | ||
28 | { "w": 1, "x": 5, "y": 1 }, | ||
29 | { "w": 1, "x": 6, "y": 1 }, | ||
30 | { "w": 1, "x": 7, "y": 1 }, | ||
31 | { "w": 1, "x": 8, "y": 1 }, | ||
32 | { "w": 1, "x": 9, "y": 1 }, | ||
33 | { "w": 1, "x": 10, "y": 1 }, | ||
34 | { "w": 1, "x": 11, "y": 1 }, | ||
35 | { "w": 1, "x": 0, "y": 2 }, | ||
36 | { "w": 1, "x": 1, "y": 2 }, | ||
37 | { "w": 1, "x": 2, "y": 2 }, | ||
38 | { "w": 1, "x": 3, "y": 2 }, | ||
39 | { "w": 1, "x": 4, "y": 2 }, | ||
40 | { "w": 1, "x": 5, "y": 2 }, | ||
41 | { "w": 1, "x": 6, "y": 2 }, | ||
42 | { "w": 1, "x": 7, "y": 2 }, | ||
43 | { "w": 1, "x": 8, "y": 2 }, | ||
44 | { "w": 1, "x": 9, "y": 2 }, | ||
45 | { "w": 1, "x": 10, "y": 2 }, | ||
46 | { "w": 1, "x": 11, "y": 2 }, | ||
47 | { "w": 1, "x": 0, "y": 3 }, | ||
48 | { "w": 1, "x": 1, "y": 3 }, | ||
49 | { "w": 1, "x": 2, "y": 3 }, | ||
50 | { "w": 1, "x": 3, "y": 3 }, | ||
51 | { "w": 1, "x": 4, "y": 3 }, | ||
52 | { "w": 2, "x": 5, "y": 3 }, | ||
53 | { "w": 1, "x": 7, "y": 3 }, | ||
54 | { "w": 1, "x": 8, "y": 3 }, | ||
55 | { "w": 1, "x": 9, "y": 3 }, | ||
56 | { "w": 1, "x": 10, "y": 3 }, | ||
57 | { "w": 1, "x": 11, "y": 3 } ] | ||
58 | }, | ||
59 | "LAYOUT_crbn_2x2u": { | ||
60 | "layout": [ | ||
61 | { "w": 1, "x": 0, "y": 0 }, | ||
62 | { "w": 1, "x": 1, "y": 0 }, | ||
63 | { "w": 1, "x": 2, "y": 0 }, | ||
64 | { "w": 1, "x": 3, "y": 0 }, | ||
65 | { "w": 1, "x": 4, "y": 0 }, | ||
66 | { "w": 1, "x": 5, "y": 0 }, | ||
67 | { "w": 1, "x": 6, "y": 0 }, | ||
68 | { "w": 1, "x": 7, "y": 0 }, | ||
69 | { "w": 1, "x": 8, "y": 0 }, | ||
70 | { "w": 1, "x": 9, "y": 0 }, | ||
71 | { "w": 1, "x": 10, "y": 0 }, | ||
72 | { "w": 1, "x": 11, "y": 0 }, | ||
73 | { "w": 1, "x": 0, "y": 1 }, | ||
74 | { "w": 1, "x": 1, "y": 1 }, | ||
75 | { "w": 1, "x": 2, "y": 1 }, | ||
76 | { "w": 1, "x": 3, "y": 1 }, | ||
77 | { "w": 1, "x": 4, "y": 1 }, | ||
78 | { "w": 1, "x": 5, "y": 1 }, | ||
79 | { "w": 1, "x": 6, "y": 1 }, | ||
80 | { "w": 1, "x": 7, "y": 1 }, | ||
81 | { "w": 1, "x": 8, "y": 1 }, | ||
82 | { "w": 1, "x": 9, "y": 1 }, | ||
83 | { "w": 1, "x": 10, "y": 1 }, | ||
84 | { "w": 1, "x": 11, "y": 1 }, | ||
85 | { "w": 1, "x": 0, "y": 2 }, | ||
86 | { "w": 1, "x": 1, "y": 2 }, | ||
87 | { "w": 1, "x": 2, "y": 2 }, | ||
88 | { "w": 1, "x": 3, "y": 2 }, | ||
89 | { "w": 1, "x": 4, "y": 2 }, | ||
90 | { "w": 1, "x": 5, "y": 2 }, | ||
91 | { "w": 1, "x": 6, "y": 2 }, | ||
92 | { "w": 1, "x": 7, "y": 2 }, | ||
93 | { "w": 1, "x": 8, "y": 2 }, | ||
94 | { "w": 1, "x": 9, "y": 2 }, | ||
95 | { "w": 1, "x": 10, "y": 2 }, | ||
96 | { "w": 1, "x": 11, "y": 2 }, | ||
97 | { "w": 1, "x": 0, "y": 3 }, | ||
98 | { "w": 1, "x": 1, "y": 3 }, | ||
99 | { "w": 1, "x": 2, "y": 3 }, | ||
100 | { "w": 1, "x": 3, "y": 3 }, | ||
101 | { "w": 2, "x": 4, "y": 3 }, | ||
102 | { "w": 2, "x": 6, "y": 3 }, | ||
103 | { "w": 1, "x": 8, "y": 3 }, | ||
104 | { "w": 1, "x": 9, "y": 3 }, | ||
105 | { "w": 1, "x": 10, "y": 3 }, | ||
106 | { "w": 1, "x": 11, "y": 3 } ] | ||
107 | } | ||
108 | } | ||
109 | } | ||
diff --git a/keyboards/crbn/keymaps/default/keymap.c b/keyboards/crbn/keymaps/default/keymap.c new file mode 100644 index 000000000..a86c5e3d6 --- /dev/null +++ b/keyboards/crbn/keymaps/default/keymap.c | |||
@@ -0,0 +1,45 @@ | |||
1 | /* Copyright 2020 Harry Herring | ||
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 | |||
21 | LAYOUT_crbn_1x2u( | ||
22 | KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, | ||
23 | KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, | ||
24 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, | ||
25 | MO(3), KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT), | ||
26 | |||
27 | LAYOUT_crbn_1x2u( | ||
28 | KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_TRNS, | ||
29 | KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, | ||
30 | KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, LSFT(KC_NUHS), LSFT(KC_NUBS), KC_HOME, KC_END, KC_TRNS, | ||
31 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY), | ||
32 | |||
33 | LAYOUT_crbn_1x2u( | ||
34 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, | ||
35 | KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, | ||
36 | KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, KC_TRNS, | ||
37 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY), | ||
38 | |||
39 | LAYOUT_crbn_1x2u( | ||
40 | RESET, 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, | ||
42 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
43 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | ||
44 | |||
45 | }; | ||
diff --git a/keyboards/crbn/readme.md b/keyboards/crbn/readme.md new file mode 100644 index 000000000..a8a1535c3 --- /dev/null +++ b/keyboards/crbn/readme.md | |||
@@ -0,0 +1,19 @@ | |||
1 | # CRBN | ||
2 | |||
3 | A compact 40% (12x4) ortholinear keyboard kit made by Polarity Works and sold by keygem | ||
4 | |||
5 | * Keyboard Maintainer: [ReFil](https://github.com/ReFil) | ||
6 | * Hardware Supported: CRBN kit with a pro micro | ||
7 | * Hardware Availability: [Keygem](https://keygem.store/collections/group-buys/products/group-buy-featherlight-40-kit) | ||
8 | |||
9 | Support for this keyboard is available in the Polarity Works [discord](https://discord.gg/NysAH3Gser) | ||
10 | |||
11 | Make example for this keyboard (after setting up your build environment): | ||
12 | |||
13 | make crbn:default | ||
14 | |||
15 | Flashing example for this keyboard: | ||
16 | |||
17 | make crbn: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). | ||
diff --git a/keyboards/crbn/rules.mk b/keyboards/crbn/rules.mk new file mode 100644 index 000000000..9e4750290 --- /dev/null +++ b/keyboards/crbn/rules.mk | |||
@@ -0,0 +1,23 @@ | |||
1 | # MCU name | ||
2 | MCU = atmega32u4 | ||
3 | |||
4 | # Bootloader selection | ||
5 | BOOTLOADER = caterina | ||
6 | |||
7 | # Build Options | ||
8 | # change yes to no to disable | ||
9 | # | ||
10 | BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration | ||
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 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
16 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
17 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
18 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
19 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
20 | RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | ||
21 | BLUETOOTH_ENABLE = no # Enable Bluetooth | ||
22 | AUDIO_ENABLE = no # Audio output | ||
23 | ENCODER_ENABLE = yes | ||