aboutsummaryrefslogtreecommitdiff
path: root/keyboards/kb_elmo
diff options
context:
space:
mode:
authorkb-elmo <lorwel@mailbox.org>2021-03-25 12:48:59 +0100
committerGitHub <noreply@github.com>2021-03-25 22:48:59 +1100
commitdd0a35273c9445357e1bd5c28ef81ab93306e108 (patch)
tree244af4a9a88808a16e23b79948d3294a33204c08 /keyboards/kb_elmo
parentcf7404630e8b1682dae3dfb10f5358fb0331d6c7 (diff)
downloadqmk_firmware-dd0a35273c9445357e1bd5c28ef81ab93306e108.tar.gz
qmk_firmware-dd0a35273c9445357e1bd5c28ef81ab93306e108.zip
added twelvekey (#12281)
* added twelvekey * rename layout
Diffstat (limited to 'keyboards/kb_elmo')
-rw-r--r--keyboards/kb_elmo/twelvekey/config.h46
-rw-r--r--keyboards/kb_elmo/twelvekey/info.json24
-rw-r--r--keyboards/kb_elmo/twelvekey/keymaps/default/keymap.c24
-rw-r--r--keyboards/kb_elmo/twelvekey/keymaps/via/keymap.c39
-rw-r--r--keyboards/kb_elmo/twelvekey/keymaps/via/rules.mk1
-rw-r--r--keyboards/kb_elmo/twelvekey/readme.md19
-rw-r--r--keyboards/kb_elmo/twelvekey/rules.mk25
-rw-r--r--keyboards/kb_elmo/twelvekey/twelvekey.c17
-rw-r--r--keyboards/kb_elmo/twelvekey/twelvekey.h37
9 files changed, 232 insertions, 0 deletions
diff --git a/keyboards/kb_elmo/twelvekey/config.h b/keyboards/kb_elmo/twelvekey/config.h
new file mode 100644
index 000000000..4be5f4f31
--- /dev/null
+++ b/keyboards/kb_elmo/twelvekey/config.h
@@ -0,0 +1,46 @@
1/*
2Copyright 2021 kb-elmo<mail@elmo.space>
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 0xA68C
24#define PRODUCT_ID 0x9879
25#define DEVICE_VER 0x0001
26#define MANUFACTURER kb-elmo
27#define PRODUCT Twelvekey
28
29/* key matrix size */
30#define MATRIX_ROWS 3
31#define MATRIX_COLS 4
32
33/* Keyboard Matrix Assignments */
34#define MATRIX_ROW_PINS { D1, C4, D7 }
35#define MATRIX_COL_PINS { C5, D0, B0, D6 }
36
37/* COL2ROW, ROW2COL */
38#define DIODE_DIRECTION COL2ROW
39
40/* Backlight */
41#define BACKLIGHT_PIN B1
42#define BACKLIGHT_LEVELS 8
43#define BACKLIGHT_ON_STATE 0
44
45/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
46#define DEBOUNCE 5
diff --git a/keyboards/kb_elmo/twelvekey/info.json b/keyboards/kb_elmo/twelvekey/info.json
new file mode 100644
index 000000000..814123147
--- /dev/null
+++ b/keyboards/kb_elmo/twelvekey/info.json
@@ -0,0 +1,24 @@
1{
2 "keyboard_name": "twelvekey",
3 "url": "https://github.com/kb-elmo/twelvekey",
4 "maintainer": "kb-elmo",
5 "width": 4,
6 "height": 3,
7 "layouts": {
8 "LAYOUT_ortho_3x4": {
9 "layout": [{"x":0, "y":0},
10 {"x":1, "y":0},
11 {"x":2, "y":0},
12 {"x":3, "y":0},
13 {"x":0, "y":1},
14 {"x":1, "y":1},
15 {"x":2, "y":1},
16 {"x":3, "y":1},
17 {"x":0, "y":2},
18 {"x":1, "y":2},
19 {"x":2, "y":2},
20 {"x":3, "y":2}
21 ]
22 }
23 }
24}
diff --git a/keyboards/kb_elmo/twelvekey/keymaps/default/keymap.c b/keyboards/kb_elmo/twelvekey/keymaps/default/keymap.c
new file mode 100644
index 000000000..db60b3afc
--- /dev/null
+++ b/keyboards/kb_elmo/twelvekey/keymaps/default/keymap.c
@@ -0,0 +1,24 @@
1/* Copyright 2021 kb-elmo<mail@elmo.space>
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
18const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
19 [0] = LAYOUT_ortho_3x4(
20 KC_1, KC_2, KC_3, KC_4,
21 KC_5, KC_6, KC_7, KC_8,
22 KC_9, KC_0, KC_A, KC_B
23 )
24};
diff --git a/keyboards/kb_elmo/twelvekey/keymaps/via/keymap.c b/keyboards/kb_elmo/twelvekey/keymaps/via/keymap.c
new file mode 100644
index 000000000..025e2026d
--- /dev/null
+++ b/keyboards/kb_elmo/twelvekey/keymaps/via/keymap.c
@@ -0,0 +1,39 @@
1/* Copyright 2021 kb-elmo<mail@elmo.space>
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
18const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
19 [0] = LAYOUT_ortho_3x4(
20 KC_1, KC_2, KC_3, KC_4,
21 KC_5, KC_6, KC_7, KC_8,
22 KC_9, KC_0, KC_A, KC_B
23 ),
24 [1] = LAYOUT_ortho_3x4(
25 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
26 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
27 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
28 ),
29 [2] = LAYOUT_ortho_3x4(
30 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
31 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
32 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
33 ),
34 [3] = LAYOUT_ortho_3x4(
35 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
36 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
37 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
38 )
39};
diff --git a/keyboards/kb_elmo/twelvekey/keymaps/via/rules.mk b/keyboards/kb_elmo/twelvekey/keymaps/via/rules.mk
new file mode 100644
index 000000000..1e5b99807
--- /dev/null
+++ b/keyboards/kb_elmo/twelvekey/keymaps/via/rules.mk
@@ -0,0 +1 @@
VIA_ENABLE = yes
diff --git a/keyboards/kb_elmo/twelvekey/readme.md b/keyboards/kb_elmo/twelvekey/readme.md
new file mode 100644
index 000000000..db2406378
--- /dev/null
+++ b/keyboards/kb_elmo/twelvekey/readme.md
@@ -0,0 +1,19 @@
1# Twelvekey
2
3![twelvekey](https://i.imgur.com/xBQIvpml.png)
4
5Simple 12-key macropad
6
7* Keyboard Maintainer: [kb-elmo](https://github.com/kb-elmo)
8* Hardware Supported: Twelvekey PCB with backlight
9* Hardware Availability: [Open source project](https://github.com/kb-elmo/twelvekey)
10
11Make example for this keyboard (after setting up your build environment):
12
13 make kb_elmo/twelvekey:default
14
15Flashing example for this keyboard:
16
17 make kb_elmo/twelvekey:default:flash
18
19See 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/kb_elmo/twelvekey/rules.mk b/keyboards/kb_elmo/twelvekey/rules.mk
new file mode 100644
index 000000000..d099a1068
--- /dev/null
+++ b/keyboards/kb_elmo/twelvekey/rules.mk
@@ -0,0 +1,25 @@
1# MCU name
2MCU = atmega328p
3
4# Processor frequency
5F_CPU = 16000000
6
7# Bootloader selection
8BOOTLOADER = USBasp
9
10# Build Options
11# change yes to no to disable
12#
13BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
14MOUSEKEY_ENABLE = no # Mouse keys
15EXTRAKEY_ENABLE = yes # Audio control and System control
16CONSOLE_ENABLE = no # Console for debug
17COMMAND_ENABLE = no # Commands for debug and configuration
18# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
19SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
20# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
21NKRO_ENABLE = no # USB Nkey Rollover
22BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
23RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
24BLUETOOTH_ENABLE = no # Enable Bluetooth
25AUDIO_ENABLE = no # Audio output
diff --git a/keyboards/kb_elmo/twelvekey/twelvekey.c b/keyboards/kb_elmo/twelvekey/twelvekey.c
new file mode 100644
index 000000000..2a33acd92
--- /dev/null
+++ b/keyboards/kb_elmo/twelvekey/twelvekey.c
@@ -0,0 +1,17 @@
1/* Copyright 2021 kb-elmo<mail@elmo.space>
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 "twelvekey.h"
diff --git a/keyboards/kb_elmo/twelvekey/twelvekey.h b/keyboards/kb_elmo/twelvekey/twelvekey.h
new file mode 100644
index 000000000..3c4d88426
--- /dev/null
+++ b/keyboards/kb_elmo/twelvekey/twelvekey.h
@@ -0,0 +1,37 @@
1/* Copyright 2021 kb-elmo<mail@elmo.space>
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/* This is a shortcut to help you visually see your layout.
22 *
23 * The first section contains all of the arguments representing the physical
24 * layout of the board and position of the keys.
25 *
26 * The second converts the arguments into a two-dimensional array which
27 * represents the switch matrix.
28 */
29#define LAYOUT_ortho_3x4( \
30 k00, k01, k02, k03, \
31 k10, k11, k12, k13, \
32 k20, k21, k22, k23 \
33) { \
34 { k00, k01, k02, k03 }, \
35 { k10, k11, k12, k13 }, \
36 { k20, k21, k22, k23 } \
37}