aboutsummaryrefslogtreecommitdiffstats
path: root/keyboards/kb_elmo/elmopad
diff options
context:
space:
mode:
authorGravatar kb-elmo <lorwel@mailbox.org>2020-08-07 05:47:00 +0200
committerGravatar GitHub <noreply@github.com>2020-08-06 20:47:00 -0700
commit2d8703f6cc61918aaefd3ce04a064a82ab238140 (patch)
tree42d61cae87c2e5f40fbb30da5967c9326f55e8d2 /keyboards/kb_elmo/elmopad
parentc125d0a7a0daa539d425c6c01ace4175ebffa2f1 (diff)
downloadqmk_firmware-2d8703f6cc61918aaefd3ce04a064a82ab238140.tar.gz
[Keyboard] add kb-elmo boards (#9898)
* add kb-elmo boards * Apply suggestions from code review * Apply suggestions from code review * Apply suggestions from code review * fix wrong names * fix VID and UID
Diffstat (limited to 'keyboards/kb_elmo/elmopad')
-rw-r--r--keyboards/kb_elmo/elmopad/config.h44
-rw-r--r--keyboards/kb_elmo/elmopad/elmopad.c17
-rw-r--r--keyboards/kb_elmo/elmopad/elmopad.h43
-rw-r--r--keyboards/kb_elmo/elmopad/info.json34
-rw-r--r--keyboards/kb_elmo/elmopad/keymaps/default/keymap.c28
-rw-r--r--keyboards/kb_elmo/elmopad/readme.md15
-rw-r--r--keyboards/kb_elmo/elmopad/rules.mk27
7 files changed, 208 insertions, 0 deletions
diff --git a/keyboards/kb_elmo/elmopad/config.h b/keyboards/kb_elmo/elmopad/config.h
new file mode 100644
index 000000000..1dd6cff5b
--- /dev/null
+++ b/keyboards/kb_elmo/elmopad/config.h
@@ -0,0 +1,44 @@
+/*
+Copyright 2020 kb-elmo<mail@elmo.space>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xA68C
+#define PRODUCT_ID 0x8B35
+#define DEVICE_VER 0x0001
+#define MANUFACTURER kb-elmo
+#define PRODUCT ElmoPad
+
+/* key matrix size */
+#define MATRIX_ROWS 6
+#define MATRIX_COLS 4
+
+/*
+ * Keyboard Matrix Assignments
+ */
+#define MATRIX_ROW_PINS { C5, C4, B2, B1, D7, B0 }
+#define MATRIX_COL_PINS { C0, C1, C2, C3 }
+#define UNUSED_PINS
+
+/* COL2ROW, ROW2COL*/
+#define DIODE_DIRECTION COL2ROW
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 5
diff --git a/keyboards/kb_elmo/elmopad/elmopad.c b/keyboards/kb_elmo/elmopad/elmopad.c
new file mode 100644
index 000000000..bb905ed7e
--- /dev/null
+++ b/keyboards/kb_elmo/elmopad/elmopad.c
@@ -0,0 +1,17 @@
+/* Copyright 2020 kb-elmo<mail@elmo.space>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "elmopad.h"
diff --git a/keyboards/kb_elmo/elmopad/elmopad.h b/keyboards/kb_elmo/elmopad/elmopad.h
new file mode 100644
index 000000000..413910a9d
--- /dev/null
+++ b/keyboards/kb_elmo/elmopad/elmopad.h
@@ -0,0 +1,43 @@
+/* Copyright 2020 kb-elmo<mail@elmo.space>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include "quantum.h"
+
+/* This is a shortcut to help you visually see your layout.
+ *
+ * The first section contains all of the arguments representing the physical
+ * layout of the board and position of the keys.
+ *
+ * The second converts the arguments into a two-dimensional array which
+ * represents the switch matrix.
+ */
+#define LAYOUT_numpad_6x4( \
+ k00, k01, k02, k03, \
+ k04, k05, k06, k07, \
+ k08, k09, k10, \
+ k12, k13, k14, k15, \
+ k16, k17, k18, \
+ k20, k22, k23 \
+) { \
+ {k00, k01, k02, k03 }, \
+ {k04, k05, k06, k07 }, \
+ {k08, k09, k10, KC_NO }, \
+ {k12, k13, k14, k15 }, \
+ {k16, k17, k18, KC_NO }, \
+ {k20, KC_NO, k22, k23 } \
+}
diff --git a/keyboards/kb_elmo/elmopad/info.json b/keyboards/kb_elmo/elmopad/info.json
new file mode 100644
index 000000000..adc2eae24
--- /dev/null
+++ b/keyboards/kb_elmo/elmopad/info.json
@@ -0,0 +1,34 @@
+{
+ "keyboard_name": "elmopad",
+ "url": "https://github.com/kb-elmo/numpad",
+ "maintainer": "kb-elmo",
+ "width": 3,
+ "height": 2,
+ "layouts": {
+ "LAYOUT": {
+ "layout": [
+ {"x":0, "y":0},
+ {"x":1, "y":0},
+ {"x":2, "y":0},
+ {"x":3, "y":0},
+ {"x":0, "y":1},
+ {"x":1, "y":1},
+ {"x":2, "y":1},
+ {"x":3, "y":1},
+ {"x":0, "y":2},
+ {"x":1, "y":2},
+ {"x":2, "y":2},
+ {"x":0, "y":3},
+ {"x":1, "y":3},
+ {"x":2, "y":3},
+ {"x":3, "y":2, "h":2},
+ {"x":0, "y":4},
+ {"x":1, "y":4},
+ {"x":2, "y":4},
+ {"x":0, "y":5, "w":2},
+ {"x":2, "y":5},
+ {"x":3, "y":4, "h":2}
+ ]
+ }
+ }
+}
diff --git a/keyboards/kb_elmo/elmopad/keymaps/default/keymap.c b/keyboards/kb_elmo/elmopad/keymaps/default/keymap.c
new file mode 100644
index 000000000..9e672de69
--- /dev/null
+++ b/keyboards/kb_elmo/elmopad/keymaps/default/keymap.c
@@ -0,0 +1,28 @@
+/* Copyright 2020 kb-elmo<mail@elmo.space>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* Base */
+ [0] = LAYOUT_numpad_6x4(
+ KC_ESC, KC_TAB, KC_DEL, KC_BSPC,
+ KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
+ KC_P7, KC_P8, KC_P9,
+ KC_P4, KC_P5, KC_P6, KC_PPLS,
+ KC_P1, KC_P2, KC_P3,
+ KC_P0, KC_PDOT, KC_PENT
+ )
+};
diff --git a/keyboards/kb_elmo/elmopad/readme.md b/keyboards/kb_elmo/elmopad/readme.md
new file mode 100644
index 000000000..c5ecda2f6
--- /dev/null
+++ b/keyboards/kb_elmo/elmopad/readme.md
@@ -0,0 +1,15 @@
+# ElmoPad
+
+![elmopad](https://i.imgur.com/kWBxiVwl.jpg)
+
+THT numpad with USB-C
+
+* Keyboard Maintainer: [kb-elmo](https://github.com/kb-elmo)
+* Hardware Supported: ElmoPad
+* Hardware Availability: [Project is open source](https://github.com/kb-elmo/numpad)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make kb_elmo/elmopad:default
+
+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/kb_elmo/elmopad/rules.mk b/keyboards/kb_elmo/elmopad/rules.mk
new file mode 100644
index 000000000..6e2010833
--- /dev/null
+++ b/keyboards/kb_elmo/elmopad/rules.mk
@@ -0,0 +1,27 @@
+# MCU name
+MCU = atmega328p
+
+# Processor frequency
+F_CPU = 16000000
+
+# Bootloader selection
+BOOTLOADER = USBasp
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = no # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
+BLUETOOTH_ENABLE = no # Enable Bluetooth
+AUDIO_ENABLE = no # Audio output
+
+LAYOUTS = numpad_6x4