summaryrefslogtreecommitdiff
path: root/keyboards/mt/mt40
diff options
context:
space:
mode:
authorpeepeetee <43021794+peepeetee@users.noreply.github.com>2022-04-19 18:06:35 +0800
committerGitHub <noreply@github.com>2022-04-19 20:06:35 +1000
commitcff489bfdb2752956292c1e9adf1b4223814c267 (patch)
tree63d822173219b5088185b10be8d62baca81ead3e /keyboards/mt/mt40
parente13aefe41d235af9e59efdefa46e2934e36eec7a (diff)
downloadqmk_firmware-cff489bfdb2752956292c1e9adf1b4223814c267.tar.gz
qmk_firmware-cff489bfdb2752956292c1e9adf1b4223814c267.zip
move 麦田 boards into /mt (#16095)
Co-authored-by: Nick Brassel <nick@tzarc.org>
Diffstat (limited to 'keyboards/mt/mt40')
-rw-r--r--keyboards/mt/mt40/config.h116
-rw-r--r--keyboards/mt/mt40/info.json10
-rw-r--r--keyboards/mt/mt40/keymaps/default/config.h10
-rw-r--r--keyboards/mt/mt40/keymaps/default/keymap.c76
-rw-r--r--keyboards/mt/mt40/keymaps/default/readme.md17
-rw-r--r--keyboards/mt/mt40/mt40.c17
-rw-r--r--keyboards/mt/mt40/mt40.h42
-rw-r--r--keyboards/mt/mt40/readme.md19
-rw-r--r--keyboards/mt/mt40/rules.mk22
9 files changed, 329 insertions, 0 deletions
diff --git a/keyboards/mt/mt40/config.h b/keyboards/mt/mt40/config.h
new file mode 100644
index 0000000000..6626b24f3a
--- /dev/null
+++ b/keyboards/mt/mt40/config.h
@@ -0,0 +1,116 @@
+/*
+Copyright 2017 REPLACE_WITH_YOUR_NAME
+
+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 0x20A0
+#define PRODUCT_ID 0x422D
+
+#define DEVICE_VER 0x0001
+
+#define MANUFACTURER ThomasDehaeze
+#define PRODUCT MT40
+
+/* key matrix size */
+#define MATRIX_ROWS 7
+#define MATRIX_COLS 15
+
+#define RGB_DI_PIN C0
+#define RGBLED_NUM 12
+#define RGBLIGHT_ANIMATIONS
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+*/
+/* #define CC6 0x63 // C3 */
+/* #define CB6 0x37 // B7 */
+/* #define CC7 0x62 // C2 */
+
+#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B6, B7 }
+#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 }
+/* #define UNUSED_PINS */
+
+/* COL2ROW, ROW2COL*/
+#define DIODE_DIRECTION COL2ROW
+
+#define BACKLIGHT_PIN D2
+
+/* number of backlight levels */
+#define BACKLIGHT_LEVELS 3
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+/* #define DEBOUNCE 5 */
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
+//#define MATRIX_HAS_GHOST
+
+/* 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 */
+
+/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
+ * This is userful for the Windows task manager shortcut (ctrl+shift+esc).
+ */
+// #define GRAVE_ESC_CTRL_OVERRIDE
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+//#define FORCE_NKRO
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
diff --git a/keyboards/mt/mt40/info.json b/keyboards/mt/mt40/info.json
new file mode 100644
index 0000000000..48a2b9233b
--- /dev/null
+++ b/keyboards/mt/mt40/info.json
@@ -0,0 +1,10 @@
+{
+ "keyboard_name": "MT40",
+ "url": "",
+ "maintainer": "qmk",
+ "layouts": {
+ "LAYOUT_planck_mit": {
+ "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":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3, "w":2}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}]
+ }
+ }
+}
diff --git a/keyboards/mt/mt40/keymaps/default/config.h b/keyboards/mt/mt40/keymaps/default/config.h
new file mode 100644
index 0000000000..6c3e30ef7b
--- /dev/null
+++ b/keyboards/mt/mt40/keymaps/default/config.h
@@ -0,0 +1,10 @@
+#pragma once
+
+// place overrides here
+
+#define TAPPING_TERM 200
+
+
+#define RGBLIGHT_HUE_STEP 12
+#define RGBLIGHT_SAT_STEP 15
+#define RGBLIGHT_VAL_STEP 18
diff --git a/keyboards/mt/mt40/keymaps/default/keymap.c b/keyboards/mt/mt40/keymaps/default/keymap.c
new file mode 100644
index 0000000000..0feadbfb74
--- /dev/null
+++ b/keyboards/mt/mt40/keymaps/default/keymap.c
@@ -0,0 +1,76 @@
+/* Copyright 2017 REPLACE_WITH_YOUR_NAME
+ *
+ * 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
+
+#define OOOOOOO KC_TRNS
+
+#define C_LCTL MT(MOD_LCTL, KC_QUOT)
+#define C_RCTL MT(MOD_RCTL, KC_GRV)
+
+#define C_LGUI MT(MOD_LGUI, KC_LBRC)
+#define C_RGUI MT(MOD_RGUI, KC_RBRC)
+
+#define C_ESC MT(MOD_LCTL, KC_ESC)
+#define C_ENT MT(MOD_RCTL, KC_ENT)
+
+
+/*
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Brite| Ctrl | Alt | GUI |Lower | SPC |Raise | Left | Down | Up |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT_planck_mit(
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ C_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, C_ENT,
+ KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC,
+ C_LCTL, C_LGUI, MOD_LALT, MO(3), MO(1), KC_SPC, MO(2), MO(4), MOD_RALT, C_RGUI, C_RCTL),
+
+ [1] = LAYOUT_planck_mit(
+ _______, KC_F9, KC_F10, KC_F11, KC_F12, RGB_TOG, RGB_MOD, KC_P7, KC_P8, KC_P9, KC_PSLS, _______,
+ _______, KC_F5, KC_F6, KC_F7, KC_F8, RGB_VAD, RGB_VAI, KC_P4, KC_P5, KC_P6, KC_PAST, _______,
+ _______, KC_F1, KC_F2, KC_F3, KC_F4, BL_TOGG, BL_INC, KC_P1, KC_P2, KC_P3, KC_PMNS, KC_PGUP,
+ _______, _______, _______, _______, OOOOOOO, _______, KC_P0, KC_PDOT, KC_PENT, KC_PPLS, KC_PGDN),
+
+ [2] = LAYOUT_planck_mit(
+ _______, _______, _______, _______, _______, _______, _______, KC_QUOT, KC_EQL, KC_LBRC, KC_RBRC, KC_NUBS,
+ KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, OOOOOOO, KC_HOME, KC_PGDOWN, KC_PGUP, KC_END),
+
+ [3] = LAYOUT_planck_mit(
+ _______, _______, _______, _______, _______, _______, KC_COPY, KC_PGUP, _______, _______, KC_PASTE, KC_DEL,
+ _______, _______, _______, KC_PGDN, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______,
+ _______, _______, KC_CUT, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, OOOOOOO, _______, _______, _______, _______, _______, _______, _______),
+
+ [4] = LAYOUT_planck_mit(
+ _______, _______, _______, _______, _______, _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______,
+ KC_PSCR, KC_INS, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______,
+ KC_CAPS, _______, KC_MPLY, KC_MRWD, KC_MFFD, _______, _______, _______, KC_BTN1, KC_BTN2, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, OOOOOOO, _______, _______, _______),
+
+
+};
+
+
+
diff --git a/keyboards/mt/mt40/keymaps/default/readme.md b/keyboards/mt/mt40/keymaps/default/readme.md
new file mode 100644
index 0000000000..033b75fa29
--- /dev/null
+++ b/keyboards/mt/mt40/keymaps/default/readme.md
@@ -0,0 +1,17 @@
+# Default Layout on a Planck Clone Keyboard
+
+## Base Layer
+[Imgur](https://i.imgur.com/XivfDS0.png)
+
+## FN1 Layer - Numpad and Function keys
+[Imgur](https://i.imgur.com/sXTYfAn.png)
+
+## FN2 Layer - Numbers and Symbols
+[Imgur](https://i.imgur.com/Z4Nqp7g.png)
+
+## FN3 Layer - Vim
+[Imgur](https://i.imgur.com/5whRGOx.png)
+
+## FN3 Layer - Multimedia
+[Imgur](https://i.imgur.com/K0jfHIO.png)
+
diff --git a/keyboards/mt/mt40/mt40.c b/keyboards/mt/mt40/mt40.c
new file mode 100644
index 0000000000..dd079e7d81
--- /dev/null
+++ b/keyboards/mt/mt40/mt40.c
@@ -0,0 +1,17 @@
+/* Copyright 2017 REPLACE_WITH_YOUR_NAME
+ *
+ * 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 "mt40.h"
diff --git a/keyboards/mt/mt40/mt40.h b/keyboards/mt/mt40/mt40.h
new file mode 100644
index 0000000000..dc0de22b28
--- /dev/null
+++ b/keyboards/mt/mt40/mt40.h
@@ -0,0 +1,42 @@
+/* Copyright 2017 REPLACE_WITH_YOUR_NAME
+ *
+ * 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"
+
+#define XXX KC_NO
+
+// This a shortcut to help you visually see your layout.
+// The following is an example using the Planck MIT layout
+// The first section contains all of the arguments
+// The second converts the arguments into a two-dimensional array
+#define LAYOUT_planck_mit( \
+ k40, k31, k32, k33, k34, k35, k52, k5C, k6C, k62, k3A, k4E, \
+ k30, k21, k22, k23, k24, k25, k53, k5D, k6D, k63, k2A, k2B, \
+ k10, k11, k12, k13, k14, k15, k54, k5E, k6E, k64, k1A, k66, \
+ k20, k00, k01, k02, k04, k05, k0B, k56, k58, k57, k59 \
+) { \
+ { k00, k01, k02, XXX, k04, k05, XXX, XXX, XXX, XXX, XXX, k0B, XXX, XXX, XXX }, \
+ { k10, k11, k12, k13, k14, k15, XXX, XXX, XXX, XXX, k1A, XXX, XXX, XXX, XXX }, \
+ { k20, k21, k22, k23, k24, k25, XXX, XXX, XXX, XXX, k2A, k2B, XXX, XXX, XXX }, \
+ { k30, k31, k32, k33, k34, k35, XXX, XXX, XXX, XXX, k3A, XXX, XXX, XXX, XXX }, \
+ { k40, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, k4E }, \
+ { XXX, XXX, k52, k53, k54, k05, k56, k57, k58, k59, XXX, XXX, k5C, k5D, k5E }, \
+ { XXX, XXX, k62, k63, k64, XXX, k66, XXX, XXX, XXX, XXX, XXX, k6C, k6D, k6E } \
+}
+
+#define LAYOUT LAYOUT_planck_mit
diff --git a/keyboards/mt/mt40/readme.md b/keyboards/mt/mt40/readme.md
new file mode 100644
index 0000000000..632cefdb73
--- /dev/null
+++ b/keyboards/mt/mt40/readme.md
@@ -0,0 +1,19 @@
+# MT40
+
+[MT40](https://i.imgur.com/0opsDkt.jpg)
+
+A 40% Ortholinear Keyboard
+
+* Keyboard Maintainer: QMK Community
+* Hardware Supported: MT40
+* Hardware Availability: <https://world.taobao.com/item/548335974877.htm?fromSite=main&spm=a312a.7700824.w4002-6810221593.51.670e68a08mRh69>
+
+Make example for this keyboard (after setting up your build environment):
+
+ make mt/mt40:default
+
+Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid))
+
+ make mt/mt40:default:flash
+
+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/mt/mt40/rules.mk b/keyboards/mt/mt40/rules.mk
new file mode 100644
index 0000000000..3024f40149
--- /dev/null
+++ b/keyboards/mt/mt40/rules.mk
@@ -0,0 +1,22 @@
+# MCU name
+MCU = atmega32a
+
+# Bootloader selection
+BOOTLOADER = bootloadhid
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
+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
+NKRO_ENABLE = no # Enable N-Key Rollover
+BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
+AUDIO_ENABLE = no # Audio output
+RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
+WS2812_DRIVER = i2c
+
+LAYOUTS = planck_mit
+LAYOUTS_HAS_RGB = no