summaryrefslogtreecommitdiff
path: root/keyboards/kb_elmo/m0110a_usb
diff options
context:
space:
mode:
authorkb-elmo <lorwel@mailbox.org>2020-08-07 05:47:00 +0200
committerGitHub <noreply@github.com>2020-08-06 20:47:00 -0700
commit2d8703f6cc61918aaefd3ce04a064a82ab238140 (patch)
tree42d61cae87c2e5f40fbb30da5967c9326f55e8d2 /keyboards/kb_elmo/m0110a_usb
parentc125d0a7a0daa539d425c6c01ace4175ebffa2f1 (diff)
[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/m0110a_usb')
-rw-r--r--keyboards/kb_elmo/m0110a_usb/config.h49
-rw-r--r--keyboards/kb_elmo/m0110a_usb/info.json91
-rw-r--r--keyboards/kb_elmo/m0110a_usb/keymaps/default/keymap.c34
-rw-r--r--keyboards/kb_elmo/m0110a_usb/m0110a_usb.c17
-rw-r--r--keyboards/kb_elmo/m0110a_usb/m0110a_usb.h41
-rw-r--r--keyboards/kb_elmo/m0110a_usb/readme.md15
-rw-r--r--keyboards/kb_elmo/m0110a_usb/rules.mk25
7 files changed, 272 insertions, 0 deletions
diff --git a/keyboards/kb_elmo/m0110a_usb/config.h b/keyboards/kb_elmo/m0110a_usb/config.h
new file mode 100644
index 0000000000..0010f0d27e
--- /dev/null
+++ b/keyboards/kb_elmo/m0110a_usb/config.h
@@ -0,0 +1,49 @@
+/*
+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 0xDB4B
+#define DEVICE_VER 0x0001
+#define MANUFACTURER kb-elmo
+#define PRODUCT M0110A USB
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 17
+
+/*
+ * Keyboard Matrix Assignments
+ */
+#define MATRIX_ROW_PINS { B0, B1, B2, B3, D5 }
+#define MATRIX_COL_PINS { D7, C0, C1, C2, C3, D1, B4, C6, C7, A7, A6, A5, A4, A3, A2, A1, A0 }
+#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
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
diff --git a/keyboards/kb_elmo/m0110a_usb/info.json b/keyboards/kb_elmo/m0110a_usb/info.json
new file mode 100644
index 0000000000..9d8fb2871a
--- /dev/null
+++ b/keyboards/kb_elmo/m0110a_usb/info.json
@@ -0,0 +1,91 @@
+{
+ "keyboard_name": "m0110a usb",
+ "url": "https://github.com/kb-elmo/m0110a_usb",
+ "maintainer": "kb-elmo",
+ "width": 19.25,
+ "height": 5,
+ "layouts": {
+ "LAYOUT": {
+ "layout": [
+ {"x":0, "y":0},
+ {"x":1, "y":0},
+ {"x":2, "y":0},
+ {"x":3, "y":0},
+ {"x":4, "y":0},
+ {"x":5, "y":0},
+ {"x":6, "y":0},
+ {"x":7, "y":0},
+ {"x":8, "y":0},
+ {"x":9, "y":0},
+ {"x":10, "y":0},
+ {"x":11, "y":0},
+ {"x":12, "y":0},
+ {"x":13, "y":0, "w":1.5},
+ {"x":15.25, "y":0},
+ {"x":16.25, "y":0},
+ {"x":17.25, "y":0},
+ {"x":18.25, "y":0},
+ {"x":0, "y":1, "w":1.5},
+ {"x":1.5, "y":1},
+ {"x":2.5, "y":1},
+ {"x":3.5, "y":1},
+ {"x":4.5, "y":1},
+ {"x":5.5, "y":1},
+ {"x":6.5, "y":1},
+ {"x":7.5, "y":1},
+ {"x":8.5, "y":1},
+ {"x":9.5, "y":1},
+ {"x":10.5, "y":1},
+ {"x":11.5, "y":1},
+ {"x":12.5, "y":1},
+ {"x":15.25, "y":1},
+ {"x":16.25, "y":1},
+ {"x":17.25, "y":1},
+ {"x":18.25, "y":1},
+ {"x":0, "y":2, "w":1.75},
+ {"x":1.75, "y":2},
+ {"x":2.75, "y":2},
+ {"x":3.75, "y":2},
+ {"x":4.75, "y":2},
+ {"x":5.75, "y":2},
+ {"x":6.75, "y":2},
+ {"x":7.75, "y":2},
+ {"x":8.75, "y":2},
+ {"x":9.75, "y":2},
+ {"x":10.75, "y":2},
+ {"x":11.75, "y":2},
+ {"x":13.5, "y":1, "h":2},
+ {"x":15.25, "y":2},
+ {"x":16.25, "y":2},
+ {"x":17.25, "y":2},
+ {"x":18.25, "y":2},
+ {"x":0, "y":3, "w":2.25},
+ {"x":2.25, "y":3},
+ {"x":3.25, "y":3},
+ {"x":4.25, "y":3},
+ {"x":5.25, "y":3},
+ {"x":6.25, "y":3},
+ {"x":7.25, "y":3},
+ {"x":8.25, "y":3},
+ {"x":9.25, "y":3},
+ {"x":10.25, "y":3},
+ {"x":11.25, "y":3},
+ {"x":12.25, "y":3, "w":1.25},
+ {"x":13.5, "y":3},
+ {"x":15.25, "y":3},
+ {"x":16.25, "y":3},
+ {"x":17.25, "y":3},
+ {"x":18.25, "y":3, "h":2},
+ {"x":0, "y":4, "w":1.5},
+ {"x":1.5, "y":4, "w":2},
+ {"x":3.5, "y":4, "w":7},
+ {"x":10.5, "y":4},
+ {"x":11.5, "y":4},
+ {"x":12.5, "y":4},
+ {"x":13.5, "y":4},
+ {"x":15.25, "y":4, "w":2},
+ {"x":17.25, "y":4}
+ ]
+ }
+ }
+}
diff --git a/keyboards/kb_elmo/m0110a_usb/keymaps/default/keymap.c b/keyboards/kb_elmo/m0110a_usb/keymaps/default/keymap.c
new file mode 100644
index 0000000000..cb1378b134
--- /dev/null
+++ b/keyboards/kb_elmo/m0110a_usb/keymaps/default/keymap.c
@@ -0,0 +1,34 @@
+/* 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(
+ 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_BSPC, KC_DEL, KC_EQL, KC_PSLS, KC_PAST,
+ 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_P7, KC_P8, KC_P9, KC_PMNS,
+ KC_LCAP, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(1), KC_UP, KC_P1, KC_P2, KC_P3,
+ KC_LCTL, KC_LGUI, KC_SPC, KC_BSLS, KC_LEFT, KC_RGHT, KC_DOWN, KC_P0, KC_PDOT, KC_PENT
+ ),
+ [1] = LAYOUT(
+ KC_GRV, 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_TRNS, KC_INS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_UP, KC_PGUP, KC_TRNS,
+ KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_TRNS, KC_RGHT, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_DOWN, KC_PGDN,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+ )
+};
diff --git a/keyboards/kb_elmo/m0110a_usb/m0110a_usb.c b/keyboards/kb_elmo/m0110a_usb/m0110a_usb.c
new file mode 100644
index 0000000000..9711eca53e
--- /dev/null
+++ b/keyboards/kb_elmo/m0110a_usb/m0110a_usb.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 "m0110a_usb.h"
diff --git a/keyboards/kb_elmo/m0110a_usb/m0110a_usb.h b/keyboards/kb_elmo/m0110a_usb/m0110a_usb.h
new file mode 100644
index 0000000000..a33c70a6d1
--- /dev/null
+++ b/keyboards/kb_elmo/m0110a_usb/m0110a_usb.h
@@ -0,0 +1,41 @@
+/* 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( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k76, k13, k14, k15, k16, \
+ k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k30, k31, k32, k33, \
+ k34, k35, k36, k37, k38, k39, k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k50, \
+ k51, k52, k53, k54, k55, k56, k57, k58, k59, k60, k61, k62, k63, k64, k65, k66, \
+ k68, k69, k72, k77, k78, k79, k80, k81, k83, k84 \
+) { \
+ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14, k15, k16, }, \
+ { k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k30, k31, k32, k33, }, \
+ { k34, k35, k36, k37, k38, k39, k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k50, }, \
+ { k51, k52, k53, k54, k55, k56, k57, k58, k59, k60, k61, k62, k63, k64, k65, k66, KC_NO, }, \
+ { k68, k69, KC_NO, KC_NO, k72, KC_NO, KC_NO, KC_NO, k76, k77, k78, k79, k80, k81, KC_NO, k83, k84 } \
+}
diff --git a/keyboards/kb_elmo/m0110a_usb/readme.md b/keyboards/kb_elmo/m0110a_usb/readme.md
new file mode 100644
index 0000000000..19a354c622
--- /dev/null
+++ b/keyboards/kb_elmo/m0110a_usb/readme.md
@@ -0,0 +1,15 @@
+# M0110a USB
+
+![m0110a_usb](https://i.imgur.com/h8nN8Onl.jpg)
+
+Drop in replacement PCB for the Apple M0110a
+
+* Keyboard Maintainer: [kb-elmo](https://github.com/kb-elmo)
+* Hardware Supported: M0110a USB
+* Hardware Availability: [Project is open source](https://github.com/kb-elmo/m0110a_usb)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make kb_elmo/m0110a_usb: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/m0110a_usb/rules.mk b/keyboards/kb_elmo/m0110a_usb/rules.mk
new file mode 100644
index 0000000000..e5b427e5a5
--- /dev/null
+++ b/keyboards/kb_elmo/m0110a_usb/rules.mk
@@ -0,0 +1,25 @@
+# MCU name
+MCU = atmega32a
+
+# 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