summaryrefslogtreecommitdiff
path: root/keyboards/ymd75/rev2
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/ymd75/rev2')
-rw-r--r--keyboards/ymd75/rev2/config.h8
-rw-r--r--keyboards/ymd75/rev2/rev2.c34
-rw-r--r--keyboards/ymd75/rev2/rev2.h18
-rw-r--r--keyboards/ymd75/rev2/rules.mk15
4 files changed, 75 insertions, 0 deletions
diff --git a/keyboards/ymd75/rev2/config.h b/keyboards/ymd75/rev2/config.h
new file mode 100644
index 0000000000..9718b19dd1
--- /dev/null
+++ b/keyboards/ymd75/rev2/config.h
@@ -0,0 +1,8 @@
+#pragma once
+
+/* matrix size */
+#define MATRIX_ROWS 6
+#define MATRIX_COLS 15
+#define MATRIX_ROW_PINS { B7, B6, B5, B4, B3, B0 }
+#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 }
+#define DIODE_DIRECTION COL2ROW
diff --git a/keyboards/ymd75/rev2/rev2.c b/keyboards/ymd75/rev2/rev2.c
new file mode 100644
index 0000000000..0870a6cc02
--- /dev/null
+++ b/keyboards/ymd75/rev2/rev2.c
@@ -0,0 +1,34 @@
+/*
+Copyright 2017 Luiz Ribeiro <luizribeiro@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/>.
+*/
+
+#include "ymd75.h"
+
+void keyboard_pre_init_kb(void) {
+ led_init_ports();
+ keyboard_pre_init_user();
+}
+
+void led_init_ports(void) {
+ setPinOutput(D1);
+}
+
+bool led_update_kb(led_t led_state) {
+ if (led_update_user(led_state)) {
+ writePin(D1, led_state.caps_lock);
+ }
+ return true;
+}
diff --git a/keyboards/ymd75/rev2/rev2.h b/keyboards/ymd75/rev2/rev2.h
new file mode 100644
index 0000000000..b2dd7b8e1c
--- /dev/null
+++ b/keyboards/ymd75/rev2/rev2.h
@@ -0,0 +1,18 @@
+#pragma once
+#include "quantum.h"
+
+#define LAYOUT( \
+ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K514, \
+ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K513, \
+ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, \
+ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \
+ K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, \
+ K500, K501, K502, K505, K506, K507, K508, K509, K510, K511 \
+) { \
+ { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \
+ { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114 }, \
+ { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \
+ { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \
+ { K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414 }, \
+ { K500, K501, K502, KC_NO, KC_NO, K505, K506, K507, K508, K509, K510, K511, KC_NO, K513, K514 } \
+}
diff --git a/keyboards/ymd75/rev2/rules.mk b/keyboards/ymd75/rev2/rules.mk
new file mode 100644
index 0000000000..66ffbb499d
--- /dev/null
+++ b/keyboards/ymd75/rev2/rules.mk
@@ -0,0 +1,15 @@
+# build options
+BOOTMAGIC_ENABLE = yes
+MOUSEKEY_ENABLE = no
+EXTRAKEY_ENABLE = yes
+CONSOLE_ENABLE = no
+COMMAND_ENABLE = yes
+BACKLIGHT_ENABLE = yes
+RGBLIGHT_ENABLE = yes
+WS2812_DRIVER = i2c
+NKRO_ENABLE = no
+# Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+
+KEY_LOCK_ENABLE = yes
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend