summaryrefslogtreecommitdiff
path: root/keyboards/ymdk/sp64
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/ymdk/sp64')
-rw-r--r--keyboards/ymdk/sp64/config.h7
-rw-r--r--keyboards/ymdk/sp64/keymaps/via/keymap.c78
-rw-r--r--keyboards/ymdk/sp64/keymaps/via/rules.mk2
-rw-r--r--keyboards/ymdk/sp64/matrix.c9
-rw-r--r--keyboards/ymdk/sp64/rules.mk13
5 files changed, 91 insertions, 18 deletions
diff --git a/keyboards/ymdk/sp64/config.h b/keyboards/ymdk/sp64/config.h
index d3395c7841..f7b34575af 100644
--- a/keyboards/ymdk/sp64/config.h
+++ b/keyboards/ymdk/sp64/config.h
@@ -30,9 +30,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RIGHT_HALF
-/* disable these deprecated features by default */
-#define NO_ACTION_MACRO
-#define NO_ACTION_FUNCTION
+/* LED indicator lights */
+#define LED_CAPS_LOCK_PIN D1
+#define LED_NUM_LOCK_PIN D0
+#define LED_SCROLL_LOCK_PIN D6
/* RGB underglow */
#define RGBLED_NUM 12
diff --git a/keyboards/ymdk/sp64/keymaps/via/keymap.c b/keyboards/ymdk/sp64/keymaps/via/keymap.c
new file mode 100644
index 0000000000..14a0e5f1f8
--- /dev/null
+++ b/keyboards/ymdk/sp64/keymaps/via/keymap.c
@@ -0,0 +1,78 @@
+/* Copyright 2021 Adrian Fleiszer (@adrian-fleiszer)
+ *
+ * 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] = {
+/* Keymap 0: Basic layer
+ *
+ * ┌-----┬-----┬-----┬-----┬-----┬-----┬-----┐ ┌-----┬-----┬-----┬-----┬-----┬-----┬----------┐
+ * │ Esc │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ │ 7 │ 8 │ 9 │ 0 │ - │ = │ BkSp │
+ * ├-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┘ ┌--┴-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬-------┤
+ * │ Tab │ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │ [ │ ] │ \ │
+ * ├--------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴-------┤
+ * │ Caps │ A │ S │ D │ F │ G │ │ H │ J │ K │ L │ ; │ ' │ Enter │
+ * ├---------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬-----┬-----┤
+ * │ LShift │ Z │ X │ C │ V │ B │ │ N │ M │ < │ > │ ? │ Sft │ Up │ Del │
+ * ├------┬---┴-┬---┴--┬--┴-----┴----┬┴----┬┘ ┌┴-----┴-----┴--┬--┴----┬┴-----┼-----┼-----┼-----┤
+ * │ Ctrl │ Win │ Alt │ │ Fn │ │ │ Alt │ Win │ Lft │ Dwn │ Rgt │
+ * └------┴-----┴------┴-------------┴-----┘ └---------------┴-------┴------┴-----┴-----┴-----┘
+ */
+[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_MINUS, KC_EQUAL, KC_BSPACE,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRACKET, KC_RBRACKET, KC_BSLS,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOTE, KC_ENTER,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_DEL,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, MO(1), KC_SPACE, KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RIGHT
+ ),
+/* Function
+ *
+ * ┌-----┬-----┬-----┬-----┬-----┬-----┬-----┐ ┌-----┬-----┬-----┬-----┬-----┬-----┬----------┐
+ * │ ` │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ │
+ * ├-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┘ ┌--┴-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬-------┤
+ * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
+ * ├--------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴-------┤
+ * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
+ * ├---------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬-----┬-----┤
+ * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
+ * ├------┬---┴-┬---┴--┬--┴-----┴----┬┴----┬┘ ┌┴-----┴-----┴--┬--┴----┬┴-----┼-----┼-----┼-----┤
+ * │ │ │ │ │ │ │ │ │ │ │ │ │
+ * └------┴-----┴------┴-------------┴-----┘ └---------------┴-------┴------┴-----┴-----┴-----┘
+ */
+[1] = LAYOUT(
+ KC_GRAVE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+[2] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+[3] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+};
+
diff --git a/keyboards/ymdk/sp64/keymaps/via/rules.mk b/keyboards/ymdk/sp64/keymaps/via/rules.mk
new file mode 100644
index 0000000000..36b7ba9cbc
--- /dev/null
+++ b/keyboards/ymdk/sp64/keymaps/via/rules.mk
@@ -0,0 +1,2 @@
+VIA_ENABLE = yes
+LTO_ENABLE = yes
diff --git a/keyboards/ymdk/sp64/matrix.c b/keyboards/ymdk/sp64/matrix.c
index 9a6e37bcdc..69276c7b3c 100644
--- a/keyboards/ymdk/sp64/matrix.c
+++ b/keyboards/ymdk/sp64/matrix.c
@@ -154,15 +154,6 @@ void matrix_print(void)
}
}
-uint8_t matrix_key_count(void)
-{
- uint8_t count = 0;
- for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
- count += bitpop16(matrix[i]);
- }
- return count;
-}
-
static void matrix_select_row(uint8_t row)
{
#ifdef RIGHT_HALF
diff --git a/keyboards/ymdk/sp64/rules.mk b/keyboards/ymdk/sp64/rules.mk
index 77ec305d51..3dfe95cc0f 100644
--- a/keyboards/ymdk/sp64/rules.mk
+++ b/keyboards/ymdk/sp64/rules.mk
@@ -7,19 +7,20 @@ BOOTLOADER = bootloadhid
# Build Options
# change yes to no to disable
#
-BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite
+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
+CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = yes # Commands for debug and configuration
-# NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-#BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
-AUDIO_ENABLE = no # There is no speaker on this PCB
+NKRO_ENABLE = no # Enable N-Key Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+AUDIO_ENABLE = no # Audio output
+AUDIO_SUPPORTED = no
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
CUSTOM_MATRIX = yes
# Needed for underglow
WS2812_DRIVER = i2c
-SRC += matrix.c
+SRC += matrix.c
QUANTUM_LIB_SRC += i2c_master.c