summaryrefslogtreecommitdiffstats
path: root/keyboards/plain60/config.h
diff options
context:
space:
mode:
authorMaarten Dekkers <maartenwut@gmail.com>2019-01-19 23:29:15 +0100
committerMechMerlin <30334081+mechmerlin@users.noreply.github.com>2019-01-19 23:29:15 +0100
commit09ee7da6deb50a3ff5f808cc47daebe94f5a3f3a (patch)
tree610462e4dabcd543bec661a028b5fd9de77fce11 /keyboards/plain60/config.h
parent9d2b10d07725580d89e9352c444756c1c2339459 (diff)
downloadqmk_firmware-09ee7da6deb50a3ff5f808cc47daebe94f5a3f3a.tar.gz
qmk_firmware-09ee7da6deb50a3ff5f808cc47daebe94f5a3f3a.tar.xz
Add Plain60 support (#4887)
* Add Plain60 support * Delete info.json * Remove definition of KC_TRNS in keymap * Add spaces for proper markdown to readme.md
Diffstat (limited to 'keyboards/plain60/config.h')
-rw-r--r--keyboards/plain60/config.h75
1 files changed, 75 insertions, 0 deletions
diff --git a/keyboards/plain60/config.h b/keyboards/plain60/config.h
new file mode 100644
index 000000000..9e838616b
--- /dev/null
+++ b/keyboards/plain60/config.h
@@ -0,0 +1,75 @@
+/*
+Copyright 2019 Maarten Dekkers <maartenwut@gmail.com>
+
+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 QMK_KEYBOARD_CONFIG_H
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x4705
+#define PRODUCT_ID 0x0160
+#define DEVICE_VER 0x0001
+#define MANUFACTURER Maartenwut
+#define PRODUCT Plain60
+#define DESCRIPTION A plain 60% PCB
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 15
+
+// ROWS: Top to bottom, COLS: Left to right
+
+#define MATRIX_ROW_PINS {B4,D7,D6,D4,E6}
+#define MATRIX_COL_PINS {D2,D1,D0,D3,D5,B5,F0,B6,C6,C7,F1,F4,F5,F6,F7}
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+/* define if matrix has ghost */
+//#define MATRIX_HAS_GHOST
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCING_DELAY 5
+
+/* key combination for command */
+#define IS_COMMAND() ( \
+ keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
+)
+
+#define QMK_ESC_OUTPUT D2 // usually COL
+#define QMK_ESC_INPUT B4 // usually ROW
+
+//VIA
+#define DYNAMIC_KEYMAP_LAYER_COUNT 4
+
+// EEPROM usage
+
+// TODO: refactor with new user EEPROM code (coming soon)
+#define EEPROM_MAGIC 0x451F
+#define EEPROM_MAGIC_ADDR 32
+// Bump this every time we change what we store
+// This will automatically reset the EEPROM with defaults
+// and avoid loading invalid data from the EEPROM
+#define EEPROM_VERSION 0x08
+#define EEPROM_VERSION_ADDR 34
+
+// Dynamic keymap starts after EEPROM version
+#define DYNAMIC_KEYMAP_EEPROM_ADDR 35
+// Dynamic macro starts after dynamic keymaps (35+(4*10*6*2)) = (35+480)
+#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 635
+#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 389 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR
+#define DYNAMIC_KEYMAP_MACRO_COUNT 16 \ No newline at end of file