aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Yumagulov <yumagulovrn@gmail.com>2021-07-24 06:45:24 +0300
committerGitHub <noreply@github.com>2021-07-23 20:45:24 -0700
commite08203f16a5d9b69abea796583491d4b2de3aa6b (patch)
treec35edd5b772b468fbe970030113540326d070497
parent4a47ee937db397b32387b5d71851569cdfc8a8d2 (diff)
downloadqmk_firmware-e08203f16a5d9b69abea796583491d4b2de3aa6b.tar.gz
qmk_firmware-e08203f16a5d9b69abea796583491d4b2de3aa6b.zip
[Keyboard] Added Compound keyboard support (#12942)
* [Keyboard] Added Compound keyboard support * Small fixes for Compound keyboard * Fixed readme and header file for Compound keyboard * Update keyboards/compound/rules.mk Co-authored-by: Ryan <fauxpark@gmail.com> * Changed info.json and readme.md for Compound Keyboard info.json - removed key_count readme.md - changed PCB picture url to low-resolution Co-authored-by: Ryan <fauxpark@gmail.com> Co-authored-by: Ryan <fauxpark@gmail.com>
-rw-r--r--keyboards/compound/compound.c18
-rw-r--r--keyboards/compound/compound.h38
-rw-r--r--keyboards/compound/config.h48
-rw-r--r--keyboards/compound/info.json79
-rw-r--r--keyboards/compound/keymaps/default/keymap.c40
-rw-r--r--keyboards/compound/keymaps/via/keymap.c49
-rw-r--r--keyboards/compound/keymaps/via/rules.mk1
-rw-r--r--keyboards/compound/readme.md30
-rw-r--r--keyboards/compound/rules.mk22
9 files changed, 325 insertions, 0 deletions
diff --git a/keyboards/compound/compound.c b/keyboards/compound/compound.c
new file mode 100644
index 000000000..046eae950
--- /dev/null
+++ b/keyboards/compound/compound.c
@@ -0,0 +1,18 @@
1/*
2Copyright 2021 Rafael Yumagulov
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#include "compound.h"
diff --git a/keyboards/compound/compound.h b/keyboards/compound/compound.h
new file mode 100644
index 000000000..697ca3d0f
--- /dev/null
+++ b/keyboards/compound/compound.h
@@ -0,0 +1,38 @@
1/*
2Copyright 2021 Rafael Yumagulov
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#pragma once
19
20#include "quantum.h"
21
22// Improve readability
23#define XXX KC_NO
24
25#define LAYOUT( \
26 k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \
27 k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \
28 k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \
29 k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \
30 k40, k41, k42, k46, k4a, k4b, k4c \
31) \
32{ \
33 {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e}, \
34 {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, XXX}, \
35 {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, XXX, XXX}, \
36 {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, XXX, XXX}, \
37 {k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4a, k4b, k4c, XXX, XXX} \
38}
diff --git a/keyboards/compound/config.h b/keyboards/compound/config.h
new file mode 100644
index 000000000..43edc0066
--- /dev/null
+++ b/keyboards/compound/config.h
@@ -0,0 +1,48 @@
1/*
2Copyright 2021 Rafael Yumagulov
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along 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 0x420A
24#define PRODUCT_ID 0xB0BA
25#define DEVICE_VER 0x0001
26#define MANUFACTURER Sabomov
27#define PRODUCT Compound
28
29/* key matrix size */
30#define MATRIX_ROWS 5
31#define MATRIX_COLS 15
32
33// ROWS: Top to bottom, COLS: Left to right
34
35#define MATRIX_ROW_PINS {B0,B7,D0,D1,D2}
36#define MATRIX_COL_PINS {F0,D5,D4,D6,D7,B4,B5,B6,C6,C7,F7,F6,F5,F4,F1}
37
38/* COL2ROW or ROW2COL */
39#define DIODE_DIRECTION COL2ROW
40
41/* define if matrix has ghost */
42//#define MATRIX_HAS_GHOST
43
44/* Set 0 if debouncing isn't needed */
45#define DEBOUNCE 5
46
47#define QMK_ESC_OUTPUT B3 // usually COL
48#define QMK_ESC_INPUT F0 // usually ROW
diff --git a/keyboards/compound/info.json b/keyboards/compound/info.json
new file mode 100644
index 000000000..ad899d1a4
--- /dev/null
+++ b/keyboards/compound/info.json
@@ -0,0 +1,79 @@
1{
2 "keyboard_name": "Compound",
3 "url": "https://geekhack.org/index.php?topic=111187.0",
4 "maintainer": "yumagulovrn",
5 "width": 15,
6 "height": 5,
7 "layouts": {
8 "LAYOUT": {
9 "layout": [
10 {"x": 0, "y": 0},
11 {"x": 1, "y": 0},
12 {"x": 2, "y": 0},
13 {"x": 3, "y": 0},
14 {"x": 4, "y": 0},
15 {"x": 5, "y": 0},
16 {"x": 6, "y": 0},
17 {"x": 7, "y": 0},
18 {"x": 8, "y": 0},
19 {"x": 9, "y": 0},
20 {"x": 10, "y": 0},
21 {"x": 11, "y": 0},
22 {"x": 12, "y": 0},
23 {"x": 13, "y": 0},
24 {"x": 14, "y": 0},
25
26 {"x": 0, "y": 1, "w": 1.5},
27 {"x": 1.5, "y": 1},
28 {"x": 2.5, "y": 1},
29 {"x": 3.5, "y": 1},
30 {"x": 4.5, "y": 1},
31 {"x": 5.5, "y": 1},
32 {"x": 6.5, "y": 1},
33 {"x": 7.5, "y": 1},
34 {"x": 8.5, "y": 1},
35 {"x": 9.5, "y": 1},
36 {"x": 10.5, "y": 1},
37 {"x": 11.5, "y": 1},
38 {"x": 12.5, "y": 1},
39 {"x": 13.5, "y": 1, "w": 1.5},
40
41 {"x": 0, "y": 2, "w": 1.75},
42 {"x": 1.75, "y": 2},
43 {"x": 2.75, "y": 2},
44 {"x": 3.75, "y": 2},
45 {"x": 4.75, "y": 2},
46 {"x": 5.75, "y": 2},
47 {"x": 6.75, "y": 2},
48 {"x": 7.75, "y": 2},
49 {"x": 8.75, "y": 2},
50 {"x": 9.75, "y": 2},
51 {"x": 10.75, "y": 2},
52 {"x": 11.75, "y": 2},
53 {"x": 12.75, "y": 2, "w": 2.25},
54
55 {"x": 0, "y": 3, "w": 2.25},
56 {"x": 2.25, "y": 3},
57 {"x": 3.25, "y": 3},
58 {"x": 4.25, "y": 3},
59 {"x": 5.25, "y": 3},
60 {"x": 6.25, "y": 3},
61 {"x": 7.25, "y": 3},
62 {"x": 8.25, "y": 3},
63 {"x": 9.25, "y": 3},
64 {"x": 10.25, "y": 3},
65 {"x": 11.25, "y": 3},
66 {"x": 12.25, "y": 3, "w": 1.75},
67 {"x": 14, "y": 3},
68
69 {"x": 0, "y": 4, "w": 1.5},
70 {"x": 1.5, "y": 4},
71 {"x": 2.5, "y": 4, "w": 1.5},
72 {"x": 4, "y": 4, "w": 7},
73 {"x": 11, "y": 4, "w": 1.5},
74 {"x": 12.5, "y": 4},
75 {"x": 13.5, "y": 4, "w": 1.5}
76 ]
77 }
78 }
79}
diff --git a/keyboards/compound/keymaps/default/keymap.c b/keyboards/compound/keymaps/default/keymap.c
new file mode 100644
index 000000000..c5f4bd738
--- /dev/null
+++ b/keyboards/compound/keymaps/default/keymap.c
@@ -0,0 +1,40 @@
1/*
2Copyright 2021 Rafael Yumagulov
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#include QMK_KEYBOARD_H
19
20enum _layer {
21 _MA,
22 _FN
23};
24
25const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
26
27[_MA] = LAYOUT(
28 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_BSLS, KC_GRV,
29 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_BSPC,
30 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,
31 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(_FN),
32 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL),
33
34[_FN] = LAYOUT(
35 RESET, 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_INS, KC_DEL,
36 KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, _______,
37 _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_MPLY, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______,
38 _______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, _______,
39 _______, _______, _______, _______, _______, _______, _______)
40};
diff --git a/keyboards/compound/keymaps/via/keymap.c b/keyboards/compound/keymaps/via/keymap.c
new file mode 100644
index 000000000..797be4dc6
--- /dev/null
+++ b/keyboards/compound/keymaps/via/keymap.c
@@ -0,0 +1,49 @@
1/*
2Copyright 2021 Rafael Yumagulov
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#include QMK_KEYBOARD_H
19
20const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
21
22[0] = LAYOUT(
23 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_BSLS, KC_GRV,
24 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_BSPC,
25 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,
26 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),
27 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL),
28
29[1] = LAYOUT(
30 RESET, 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_INS, KC_DEL,
31 KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, _______,
32 _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_MPLY, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______,
33 _______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, _______,
34 _______, _______, _______, _______, _______, _______, _______),
35
36[2] = LAYOUT(
37 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
38 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
39 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
40 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
41 _______, _______, _______, _______, _______, _______, _______),
42
43[3] = LAYOUT(
44 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
45 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
46 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
47 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
48 _______, _______, _______, _______, _______, _______, _______),
49};
diff --git a/keyboards/compound/keymaps/via/rules.mk b/keyboards/compound/keymaps/via/rules.mk
new file mode 100644
index 000000000..1e5b99807
--- /dev/null
+++ b/keyboards/compound/keymaps/via/rules.mk
@@ -0,0 +1 @@
VIA_ENABLE = yes
diff --git a/keyboards/compound/readme.md b/keyboards/compound/readme.md
new file mode 100644
index 000000000..9422939ac
--- /dev/null
+++ b/keyboards/compound/readme.md
@@ -0,0 +1,30 @@
1# Compound
2
3![Compound](https://imgur.com/0DC9F9dh.jpg)
4
5A compact 60% Compound keyboard with fixed Tsangan style layout.
6
7* Keyboard Maintainer: [yumagulovrn](https://github.com/yumagulovrn)
8* Hardware Supported: Compound PCB
9* Hardware Availability: [GeekHack IC](https://geekhack.org/index.php?topic=111187.0)
10
11## Entering bootloader mode
12
13Keyboard doesn't have dedicated RESET button on the PCB, however, there are alternatives:
14
15### Bootmagic
16
17Hold down ESC while plugging the keyboard in.
18
19### Shorting RESET pin
20
21Short GND and RST pads on the bottom of the keyboard. Location of the pads can be seen [here](https://imgur.com/uw7Zz7Y.jpg).
22
23
24## Building keyboard firmware
25
26Make example for this keyboard (after setting up your build environment):
27
28 make compound:default
29
30See 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/compound/rules.mk b/keyboards/compound/rules.mk
new file mode 100644
index 000000000..a90eef1fc
--- /dev/null
+++ b/keyboards/compound/rules.mk
@@ -0,0 +1,22 @@
1# MCU name
2MCU = atmega32u4
3
4# Bootloader selection
5BOOTLOADER = atmel-dfu
6
7# Build Options
8# change yes to no to disable
9#
10BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
11MOUSEKEY_ENABLE = no # Mouse keys
12EXTRAKEY_ENABLE = yes # Audio control and System control
13CONSOLE_ENABLE = no # Console for debug
14COMMAND_ENABLE = no # Commands for debug and configuration
15# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
16SLEEP_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
18NKRO_ENABLE = no # USB Nkey Rollover
19BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
20RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
21BLUETOOTH_ENABLE = no # Enable Bluetooth
22AUDIO_ENABLE = no # Audio output