From 37539d34b91003d673cc2ee6459e8bdf261b173c Mon Sep 17 00:00:00 2001
From: jonylee1986 <108282809+jonylee1986@users.noreply.github.com>
Date: Mon, 8 Aug 2022 11:50:28 +0800
Subject: [PATCH 01/79] Create hfdkb
---
keyboards/hfdkb | 1 +
1 file changed, 1 insertion(+)
create mode 100644 keyboards/hfdkb
diff --git a/keyboards/hfdkb b/keyboards/hfdkb
new file mode 100644
index 000000000000..8b137891791f
--- /dev/null
+++ b/keyboards/hfdkb
@@ -0,0 +1 @@
+
From f63622178311ada2ea59c909db0d785e719e8839 Mon Sep 17 00:00:00 2001
From: jonylee1986 <108282809+jonylee1986@users.noreply.github.com>
Date: Mon, 8 Aug 2022 11:52:03 +0800
Subject: [PATCH 02/79] Delete hfdkb
---
keyboards/hfdkb | 1 -
1 file changed, 1 deletion(-)
delete mode 100644 keyboards/hfdkb
diff --git a/keyboards/hfdkb b/keyboards/hfdkb
deleted file mode 100644
index 8b137891791f..000000000000
--- a/keyboards/hfdkb
+++ /dev/null
@@ -1 +0,0 @@
-
From 14711c8f1fe0e0cccd60ceac1e8502a7fc23316a Mon Sep 17 00:00:00 2001
From: jonylee1986 <108282809+jonylee1986@users.noreply.github.com>
Date: Mon, 8 Aug 2022 11:53:00 +0800
Subject: [PATCH 03/79] Create k61
---
keyboards/hfdkb/k61 | 1 +
1 file changed, 1 insertion(+)
create mode 100644 keyboards/hfdkb/k61
diff --git a/keyboards/hfdkb/k61 b/keyboards/hfdkb/k61
new file mode 100644
index 000000000000..8b137891791f
--- /dev/null
+++ b/keyboards/hfdkb/k61
@@ -0,0 +1 @@
+
From 9cf25546feef0a58ebb08ae011179f61bd2aa522 Mon Sep 17 00:00:00 2001
From: jonylee1986 <108282809+jonylee1986@users.noreply.github.com>
Date: Mon, 8 Aug 2022 11:58:26 +0800
Subject: [PATCH 04/79] Delete k61
---
keyboards/hfdkb/k61 | 1 -
1 file changed, 1 deletion(-)
delete mode 100644 keyboards/hfdkb/k61
diff --git a/keyboards/hfdkb/k61 b/keyboards/hfdkb/k61
deleted file mode 100644
index 8b137891791f..000000000000
--- a/keyboards/hfdkb/k61
+++ /dev/null
@@ -1 +0,0 @@
-
From 9d33df3ccb59b8a0fa3a3ba431ad67b50191f1bb Mon Sep 17 00:00:00 2001
From: jonylee1986 <108282809+jonylee1986@users.noreply.github.com>
Date: Mon, 8 Aug 2022 12:03:52 +0800
Subject: [PATCH 05/79] Create kb
---
keyboards/hfdkb/kb | 1 +
1 file changed, 1 insertion(+)
create mode 100644 keyboards/hfdkb/kb
diff --git a/keyboards/hfdkb/kb b/keyboards/hfdkb/kb
new file mode 100644
index 000000000000..8b137891791f
--- /dev/null
+++ b/keyboards/hfdkb/kb
@@ -0,0 +1 @@
+
From 1e2cb184a132b583774cf9fb0e7b7780250c3fb2 Mon Sep 17 00:00:00 2001
From: jonylee1986 <108282809+jonylee1986@users.noreply.github.com>
Date: Mon, 8 Aug 2022 12:04:21 +0800
Subject: [PATCH 06/79] Add files via upload
---
keyboards/hfdkb/k61/Makefile | 3 +
keyboards/hfdkb/k61/config.h | 116 +++++++++++++++++
keyboards/hfdkb/k61/k61.c | 104 +++++++++++++++
keyboards/hfdkb/k61/k61.h | 20 +++
keyboards/hfdkb/k61/k61.json | 127 +++++++++++++++++++
keyboards/hfdkb/k61/keymaps/default/keymap.c | 78 ++++++++++++
keyboards/hfdkb/k61/keymaps/via/keymap.c | 63 +++++++++
keyboards/hfdkb/k61/keymaps/via/rules.mk | 1 +
keyboards/hfdkb/k61/rules.mk | 60 +++++++++
9 files changed, 572 insertions(+)
create mode 100644 keyboards/hfdkb/k61/Makefile
create mode 100644 keyboards/hfdkb/k61/config.h
create mode 100644 keyboards/hfdkb/k61/k61.c
create mode 100644 keyboards/hfdkb/k61/k61.h
create mode 100644 keyboards/hfdkb/k61/k61.json
create mode 100644 keyboards/hfdkb/k61/keymaps/default/keymap.c
create mode 100644 keyboards/hfdkb/k61/keymaps/via/keymap.c
create mode 100644 keyboards/hfdkb/k61/keymaps/via/rules.mk
create mode 100644 keyboards/hfdkb/k61/rules.mk
diff --git a/keyboards/hfdkb/k61/Makefile b/keyboards/hfdkb/k61/Makefile
new file mode 100644
index 000000000000..57b2ef62e5f3
--- /dev/null
+++ b/keyboards/hfdkb/k61/Makefile
@@ -0,0 +1,3 @@
+ifndef MAKEFILE_INCLUDED
+ include ../../Makefile
+endif
diff --git a/keyboards/hfdkb/k61/config.h b/keyboards/hfdkb/k61/config.h
new file mode 100644
index 000000000000..fd4ceefbd873
--- /dev/null
+++ b/keyboards/hfdkb/k61/config.h
@@ -0,0 +1,116 @@
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x0c45
+#define PRODUCT_ID 0x8006
+#define DEVICE_VER 0x0100
+#define MANUFACTURER qmkbuilder
+#define PRODUCT keyboard
+#define DESCRIPTION Keyboard
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 14
+
+/* key matrix pins */
+#define MATRIX_ROW_PINS { C6, C7, C8, F9, A8 }
+#define MATRIX_COL_PINS { C1, C2, C3, A0, A1, A2, A3, A4, A5, A6, A7, B0, B1, B2 }
+#define UNUSED_PINS
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION ROW2COL
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCING_DELAY 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
+
+/* key combination for command */
+#define IS_COMMAND() ( \
+ keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
+)
+
+/* prevent stuck modifiers */
+#define PREVENT_STUCK_MODIFIERS
+
+// This is a 7-bit address, that gets left-shifted and bit 0
+// set to 0 for write, 1 for read (as per I2C protocol)
+// The address will vary depending on your wiring:
+// 00 <-> GND
+// 01 <-> SCL
+// 10 <-> SDA
+// 11 <-> VCC
+// ADDR1 represents A1:A0 of the 7-bit address.
+// ADDR2 represents A3:A2 of the 7-bit address.
+// The result is: 0b101(ADDR2)(ADDR1)
+#define DRIVER_ADDR_1 0b1110100
+
+#define DRIVER_COUNT 1
+#define DRIVER_1_LED_TOTAL 61
+#define DRIVER_2_LED_TOTAL 0
+#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
+
+/* Allow VIA to edit lighting */
+#ifdef VIA_ENABLE
+#define VIA_QMK_RGBLIGHT_ENABLE
+#endif
+
+#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
+
+// RGB Matrix Animation modes. Explicitly enabled
+// For full list of effects, see:
+// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
+// #define ENABLE_RGB_MATRIX_ALPHAS_MODS
+// #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
+// #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
+#define ENABLE_RGB_MATRIX_BREATHING
+// #define ENABLE_RGB_MATRIX_BAND_SAT
+// #define ENABLE_RGB_MATRIX_BAND_VAL
+// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
+// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
+// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
+// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
+#define ENABLE_RGB_MATRIX_CYCLE_ALL
+#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
+#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
+#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
+#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
+#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
+#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
+#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
+#define ENABLE_RGB_MATRIX_DUAL_BEACON
+#define ENABLE_RGB_MATRIX_RAINBOW_BEACON
+// #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
+#define ENABLE_RGB_MATRIX_RAINDROPS
+// #define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
+// #define ENABLE_RGB_MATRIX_HUE_BREATHING
+// #define ENABLE_RGB_MATRIX_HUE_PENDULUM
+// #define ENABLE_RGB_MATRIX_HUE_WAVE
+// #define ENABLE_RGB_MATRIX_PIXEL_RAIN
+// #define ENABLE_RGB_MATRIX_PIXEL_FLOW
+// #define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
+// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined
+#define ENABLE_RGB_MATRIX_TYPING_HEATMAP
+#define ENABLE_RGB_MATRIX_DIGITAL_RAIN
+// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined
+#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
+#define ENABLE_RGB_MATRIX_SOLID_REACTIVE
+#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
+#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
+#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
+#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
+#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
+#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
+#define ENABLE_RGB_MATRIX_SPLASH
+#define ENABLE_RGB_MATRIX_MULTISPLASH
+#define ENABLE_RGB_MATRIX_SOLID_SPLASH
+#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
+
+#endif
diff --git a/keyboards/hfdkb/k61/k61.c b/keyboards/hfdkb/k61/k61.c
new file mode 100644
index 000000000000..f3448851ae84
--- /dev/null
+++ b/keyboards/hfdkb/k61/k61.c
@@ -0,0 +1,104 @@
+#include "k61.h"
+
+#ifdef RGB_MATRIX_ENABLE
+const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = {
+/* Refer to IS31 manual for these locations
+ * driver
+ * | R location
+ * | | G location
+ * | | | B location
+ * | | | | */
+ {0, A_1, B_1, C_1},
+ {0, A_2, B_2, C_2},
+ {0, A_3, B_3, C_3},
+ {0, A_4, B_4, C_4},
+ {0, A_5, B_5, C_5},
+ {0, A_6, B_6, C_6},
+ {0, A_7, B_7, C_7},
+ {0, A_8, B_8, C_8},
+ {0, A_9, B_9, C_9},
+ {0, A_10, B_10, C_10},
+ {0, A_11, B_11, C_11},
+ {0, A_12, B_12, C_12},
+ {0, A_13, B_13, C_13},
+ {0, A_14, B_14, C_14},
+// {0, A_15, B_15, C_15},
+ // {0, A_16, B_16, C_16},
+
+ {0, D_1, E_1, F_1},
+ {0, D_2, E_2, F_2},
+ {0, D_3, E_3, F_3},
+ {0, D_4, E_4, F_4},
+ {0, D_5, E_5, F_5},
+ {0, D_6, E_6, F_6},
+ {0, D_7, E_7, F_7},
+ {0, D_8, E_8, F_8},
+ {0, D_9, E_9, F_9},
+ {0, D_10, E_10, F_10},
+ {0, D_11, E_11, F_11},
+ {0, D_12, E_12, F_12},
+ {0, D_13, E_13, F_13},
+ {0, D_14, E_14, F_14},
+ {0, D_15, E_15, F_15},
+ // {0, D_16, E_16, F_16},
+
+ {0, G_1, H_1, I_1},
+ {0, G_2, H_2, I_2},
+ {0, G_3, H_3, I_3},
+ {0, G_4, H_4, I_4},
+ {0, G_5, H_5, I_5},
+ {0, G_6, H_6, I_6},
+ {0, G_7, H_7, I_7},
+ {0, G_8, H_8, I_8},
+ {0, G_9, H_9, I_9},
+ {0, G_10, H_10, I_10},
+ {0, G_11, H_11, I_11},
+ {0, G_12, H_12, I_12},
+ {0, G_13, H_13, I_13},
+ {0, G_14, H_14, I_14},
+ {0, G_15, H_15, I_15},
+ {0, G_16, H_16, I_16},
+
+ {0, J_1, K_1, L_1},
+ {0, J_2, K_2, L_2},
+ {0, J_3, K_3, L_3},
+ {0, J_4, K_4, L_4},
+ {0, J_5, K_5, L_5},
+ {0, J_6, K_6, L_6},
+ {0, J_7, K_7, L_7},
+ {0, J_8, K_8, L_8},
+ {0, J_9, K_9, L_9},
+ {0, J_10, K_10, L_10},
+ {0, J_11, K_11, L_11},
+ {0, J_12, K_12, L_12},
+ {0, J_13, K_13, L_13},
+ {0, J_14, K_14, L_14},
+ {0, J_15, K_15, L_15},
+ {0, J_16, K_16, L_16},
+};
+
+led_config_t g_led_config = {
+ {
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, },
+ { 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, },
+ { 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, NO_LED, 41, },
+ { 45, NO_LED, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, NO_LED, 56, },
+ { 57, 58, 59, NO_LED, NO_LED, NO_LED, 60, NO_LED, NO_LED, NO_LED, 42, 43, 44, 28, }
+ },
+ {
+ { 0, 0}, { 17, 0}, { 34, 0}, { 51, 0}, { 68, 0}, {86, 0}, {103, 0}, {120, 0}, {137, 0}, {155, 0}, {172, 0}, {189, 0}, {206, 0}, {224, 0},
+ { 0, 16},{ 17, 16},{ 34, 16},{ 51, 16},{ 68, 16},{ 86, 16},{103, 16},{120, 16},{137, 16},{155, 16},{172, 16},{189, 16},{ 206, 16},{ 224, 16},
+ { 0, 32},{ 17, 32},{ 34, 32},{ 51, 32},{ 68, 32},{ 86, 32},{103, 32},{120, 32},{137, 32},{155, 32},{172, 32},{189, 32}, { 224, 32},
+ { 0, 48}, { 34, 48},{ 51, 48},{ 68, 48},{ 86, 48},{103, 48},{120, 48},{137, 48},{155, 48},{172, 48},{189, 48}, { 224, 48},
+ { 0, 64},{ 17, 64},{ 34, 64}, {103, 64}, {172, 64},{189, 64},{206, 64}, { 224, 64},
+ },
+ {
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4
+ }
+};
+
+#endif
diff --git a/keyboards/hfdkb/k61/k61.h b/keyboards/hfdkb/k61/k61.h
new file mode 100644
index 000000000000..560c89afe8e3
--- /dev/null
+++ b/keyboards/hfdkb/k61/k61.h
@@ -0,0 +1,20 @@
+#ifndef K61_H
+#define K61_H
+
+#include "quantum.h"
+
+#define LAYOUT( \
+ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \
+ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \
+ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, \
+ K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \
+ K400, K401, K402, K406, K410, K411, K412, K413 \
+) { \
+ { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \
+ { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113 }, \
+ { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, KC_NO, K213 }, \
+ { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313 }, \
+ { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413 } \
+}
+
+#endif
\ No newline at end of file
diff --git a/keyboards/hfdkb/k61/k61.json b/keyboards/hfdkb/k61/k61.json
new file mode 100644
index 000000000000..ebc8949047ab
--- /dev/null
+++ b/keyboards/hfdkb/k61/k61.json
@@ -0,0 +1,127 @@
+{
+ "name": "hfdk61",
+ "vendorId": "0x0c45",
+ "productId": "0x8006",
+ "lighting": "none",
+ "matrix": { "rows": 5, "cols": 14 },
+ "layouts": {
+ "keymap": [
+ [
+ "0,0",
+ "0,1",
+ "0,2",
+ "0,3",
+ "0,4",
+ "0,5",
+ "0,6",
+ "0,7",
+ "0,8",
+ "0,9",
+ "0,10",
+ "0,11",
+ "0,12",
+ {
+ "w": 2
+ },
+ "0,13"
+ ],
+ [
+ {
+ "w": 1.5
+ },
+ "1,0",
+ "1,1",
+ "1,2",
+ "1,3",
+ "1,4",
+ "1,5",
+ "1,6",
+ "1,7",
+ "1,8",
+ "1,9",
+ "1,10",
+ "1,11",
+ "1,12",
+ {
+ "w": 1.5
+ },
+ "1,13"
+ ],
+ [
+ {
+ "w": 1.75
+ },
+ "2,0",
+ "2,1",
+ "2,2",
+ "2,3",
+ "2,4",
+ "2,5",
+ "2,6",
+ "2,7",
+ "2,8",
+ "2,9",
+ "2,10",
+ "2,11",
+ {
+ "w": 2.25
+ },
+ "2,13"
+ ],
+ [
+ {
+ "w": 2.25
+ },
+ "3,0",
+ "3,2",
+ "3,3",
+ "3,4",
+ "3,5",
+ "3,6",
+ "3,7",
+ "3,8",
+ "3,9",
+ "3,10",
+ "3,11",
+ {
+ "w": 2.75
+ },
+ "3,13"
+ ],
+ [
+ {
+ "w": 1.25
+ },
+ "4,0",
+ {
+ "w": 1.25
+ },
+ "4,1",
+ {
+ "w": 1.25
+ },
+ "4,2",
+ {
+ "w": 6.25
+ },
+ "4,6",
+ {
+ "w": 1.25
+ },
+ "4,10",
+ {
+ "w": 1.25
+ },
+ "4,11",
+ {
+ "w": 1.25
+ },
+ "4,12",
+ {
+ "w": 1.25
+ },
+ "4,13"
+ ]
+ ]
+ }
+ }
diff --git a/keyboards/hfdkb/k61/keymaps/default/keymap.c b/keyboards/hfdkb/k61/keymaps/default/keymap.c
new file mode 100644
index 000000000000..6afbdd685fc9
--- /dev/null
+++ b/keyboards/hfdkb/k61/keymaps/default/keymap.c
@@ -0,0 +1,78 @@
+#include "k61.h"
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ 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_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_BSLS,
+ KC_CAPS, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, KC_APP, KC_RCTL, MO(1)),
+
+ LAYOUT(
+ KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, RGB_MODE_FORWARD, RGB_MODE_REVERSE, KC_BSPC,
+ 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_TRNS,
+ KC_CAPS, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
+ KC_LCTL, MAGIC_TOGGLE_GUI, KC_LALT, KC_SPC, KC_RALT, KC_APP, KC_RCTL, KC_TRNS)
+
+};
+
+void matrix_init_user(void) {
+}
+
+void matrix_scan_user(void) {
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ return true;
+}
+
+void led_set_user(uint8_t usb_led) {
+
+ if (usb_led & (1 << USB_LED_NUM_LOCK)) {
+
+ } else {
+
+ }
+
+ if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
+
+ } else {
+
+ }
+
+ if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
+
+ } else {
+
+ }
+
+ if (usb_led & (1 << USB_LED_COMPOSE)) {
+
+ } else {
+
+ }
+
+ if (usb_led & (1 << USB_LED_KANA)) {
+
+ } else {
+
+ }
+
+}
+
+#ifdef RGB_MATRIX_ENABLE
+void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
+ // caps lock cyan
+ if (host_keyboard_led_state().caps_lock) {
+ RGB_MATRIX_INDICATOR_SET_COLOR(29, 255, 255, 255);
+ }
+
+ if(keymap_config.no_gui)
+ {
+ RGB_MATRIX_INDICATOR_SET_COLOR(58, 255, 255, 255);
+ }
+
+}
+#endif
diff --git a/keyboards/hfdkb/k61/keymaps/via/keymap.c b/keyboards/hfdkb/k61/keymaps/via/keymap.c
new file mode 100644
index 000000000000..fd31715f36b2
--- /dev/null
+++ b/keyboards/hfdkb/k61/keymaps/via/keymap.c
@@ -0,0 +1,63 @@
+#include "k61.h"
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ 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_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_BSLS,
+ KC_CAPS, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, KC_APP, KC_RCTL, MO(1)),
+
+ LAYOUT(
+ KC_TILD, 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_BSPC,
+ 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_TRNS,
+ KC_CAPS, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_APP, KC_RCTL, KC_TRNS)
+
+};
+
+void matrix_init_user(void) {
+}
+
+void matrix_scan_user(void) {
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ return true;
+}
+
+void led_set_user(uint8_t usb_led) {
+
+ if (usb_led & (1 << USB_LED_NUM_LOCK)) {
+
+ } else {
+
+ }
+
+ if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
+
+ } else {
+
+ }
+
+ if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
+
+ } else {
+
+ }
+
+ if (usb_led & (1 << USB_LED_COMPOSE)) {
+
+ } else {
+
+ }
+
+ if (usb_led & (1 << USB_LED_KANA)) {
+
+ } else {
+
+ }
+
+}
\ No newline at end of file
diff --git a/keyboards/hfdkb/k61/keymaps/via/rules.mk b/keyboards/hfdkb/k61/keymaps/via/rules.mk
new file mode 100644
index 000000000000..1e5b99807cb7
--- /dev/null
+++ b/keyboards/hfdkb/k61/keymaps/via/rules.mk
@@ -0,0 +1 @@
+VIA_ENABLE = yes
diff --git a/keyboards/hfdkb/k61/rules.mk b/keyboards/hfdkb/k61/rules.mk
new file mode 100644
index 000000000000..94cddc2d3643
--- /dev/null
+++ b/keyboards/hfdkb/k61/rules.mk
@@ -0,0 +1,60 @@
+# MCU name
+MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+
+# Build Options
+# comment out to disable the options.
+#
+BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
+CONSOLE_ENABLE ?= no # Console for debug(+400)
+COMMAND_ENABLE ?= no # Commands for debug and configuration
+SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
+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 ?= no # Enable keyboard backlight functionality
+AUDIO_ENABLE ?= no
+RGBLIGHT_ENABLE ?= no
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = IS31FL3733
+
From 2744b7adc534ce01bfd9f37eff63ab60829d296d Mon Sep 17 00:00:00 2001
From: jonylee1986 <108282809+jonylee1986@users.noreply.github.com>
Date: Mon, 8 Aug 2022 12:04:21 +0800
Subject: [PATCH 07/79] Add files via upload
---
keyboards/hfdkb/ac001/ac001.c | 36 +
keyboards/hfdkb/ac001/ac001.h | 26 +
keyboards/hfdkb/ac001/config.h | 140 ++++
keyboards/hfdkb/ac001/halconf.h | 8 +
keyboards/hfdkb/ac001/info.json | 15 +
.../hfdkb/ac001/keymaps/default/keymap.c | 29 +
.../hfdkb/ac001/keymaps/via/ac001_via.json | 44 ++
keyboards/hfdkb/ac001/keymaps/via/config.h | 21 +
keyboards/hfdkb/ac001/keymaps/via/keymap.c | 29 +
keyboards/hfdkb/ac001/keymaps/via/rules.mk | 1 +
keyboards/hfdkb/ac001/mcuconf.h | 9 +
keyboards/hfdkb/ac001/rules.mk | 26 +
keyboards/hfdkb/ac001/src/eeprom_flash.c | 692 ++++++++++++++++++
keyboards/hfdkb/k61/Makefile | 3 +
keyboards/hfdkb/k61/config.h | 116 +++
keyboards/hfdkb/k61/k61.c | 104 +++
keyboards/hfdkb/k61/k61.h | 20 +
keyboards/hfdkb/k61/k61.json | 127 ++++
keyboards/hfdkb/k61/keymaps/default/keymap.c | 78 ++
keyboards/hfdkb/k61/keymaps/via/keymap.c | 63 ++
keyboards/hfdkb/k61/keymaps/via/rules.mk | 1 +
keyboards/hfdkb/k61/rules.mk | 60 ++
22 files changed, 1648 insertions(+)
create mode 100644 keyboards/hfdkb/ac001/ac001.c
create mode 100644 keyboards/hfdkb/ac001/ac001.h
create mode 100644 keyboards/hfdkb/ac001/config.h
create mode 100644 keyboards/hfdkb/ac001/halconf.h
create mode 100644 keyboards/hfdkb/ac001/info.json
create mode 100644 keyboards/hfdkb/ac001/keymaps/default/keymap.c
create mode 100644 keyboards/hfdkb/ac001/keymaps/via/ac001_via.json
create mode 100644 keyboards/hfdkb/ac001/keymaps/via/config.h
create mode 100644 keyboards/hfdkb/ac001/keymaps/via/keymap.c
create mode 100644 keyboards/hfdkb/ac001/keymaps/via/rules.mk
create mode 100644 keyboards/hfdkb/ac001/mcuconf.h
create mode 100644 keyboards/hfdkb/ac001/rules.mk
create mode 100644 keyboards/hfdkb/ac001/src/eeprom_flash.c
create mode 100644 keyboards/hfdkb/k61/Makefile
create mode 100644 keyboards/hfdkb/k61/config.h
create mode 100644 keyboards/hfdkb/k61/k61.c
create mode 100644 keyboards/hfdkb/k61/k61.h
create mode 100644 keyboards/hfdkb/k61/k61.json
create mode 100644 keyboards/hfdkb/k61/keymaps/default/keymap.c
create mode 100644 keyboards/hfdkb/k61/keymaps/via/keymap.c
create mode 100644 keyboards/hfdkb/k61/keymaps/via/rules.mk
create mode 100644 keyboards/hfdkb/k61/rules.mk
diff --git a/keyboards/hfdkb/ac001/ac001.c b/keyboards/hfdkb/ac001/ac001.c
new file mode 100644
index 000000000000..7edeab93fb3c
--- /dev/null
+++ b/keyboards/hfdkb/ac001/ac001.c
@@ -0,0 +1,36 @@
+/* Copyright (C) 2022 Westberry Technology (ChangZhou) Corp., Ltd
+ *
+ * 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 .
+ */
+
+#include "ac001.h"
+/*
+ 3---------------2
+ | | |
+ | | |
+ 4-------0-------1
+*/
+#ifdef RGB_MATRIX_ENABLE
+led_config_t g_led_config = { {
+ // Key Matrix to LED Index
+ { 0, 1, 2, 3, 4}
+}, {
+ // LED Index to Physical Position
+ { 64, 112 }, { 64, 224 }, { 224, 0 }, { 0, 0 }, { 64, 0 },
+
+}, {
+ // LED Index to Flag
+ 4, 4, 4, 4, 4
+} };
+#endif
diff --git a/keyboards/hfdkb/ac001/ac001.h b/keyboards/hfdkb/ac001/ac001.h
new file mode 100644
index 000000000000..9c901b623d0e
--- /dev/null
+++ b/keyboards/hfdkb/ac001/ac001.h
@@ -0,0 +1,26 @@
+/* Copyright (C) 2022 Westberry Technology (ChangZhou) Corp., Ltd
+ *
+ * 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 .
+ */
+
+#pragma once
+
+#include "quantum.h"
+
+#define LAYOUT( \
+ K000, K001, K002, K003, K004 \
+) { \
+ { K000, K001, K002, KC_NO, KC_NO } \
+}
+// clang-format on
diff --git a/keyboards/hfdkb/ac001/config.h b/keyboards/hfdkb/ac001/config.h
new file mode 100644
index 000000000000..9d035113767c
--- /dev/null
+++ b/keyboards/hfdkb/ac001/config.h
@@ -0,0 +1,140 @@
+/* Copyright (C) 2022 Westberry Technology (ChangZhou) Corp., Ltd
+ *
+ * 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 .
+ */
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define DEVICE_VER 0x0100
+#define VENDOR_ID 0x3528
+#define PRODUCT_ID 0x2330
+#define MANUFACTURER hfd
+#define PRODUCT ac001
+
+/* Force NKRO on boot up regardless of the setting saved in the EEPROM (uncomment to enable it) */
+ #define FORCE_NKRO
+
+/* key matrix size */
+#define MATRIX_ROWS 1
+#define MATRIX_COLS 5
+
+/* key matrix pins */
+#define MATRIX_ROW_PINS { B15}
+#define MATRIX_COL_PINS { A5, A6, A7, C4, C5}
+#define UNUSED_PINS
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION ROW2COL
+
+/* Hold ESC on start up to clear EEPROM and boot into bootloader mode */
+#define BOOTMAGIC_LITE_ROW 0
+#define BOOTMAGIC_LITE_COLUMN 0
+
+#define TAP_CODE_DELAY 5
+
+/* ws2812 RGB LED */
+#define RGB_DI_PIN A1
+#define DRIVER_LED_TOTAL 5
+#define RGBLED_NUM 5 // Number of LEDs
+#define NOP_FUDGE 0.4
+
+
+/* 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
+
+/* SPI Config for spi flash*/
+#define SPI_DRIVER SPIDQ
+#define SPI_SCK_PIN B3
+#define SPI_MOSI_PIN B5
+#define SPI_MISO_PIN B4
+#define SPI_MOSI_PAL_MODE 5
+
+#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12
+#define EXTERNAL_FLASH_SIZE (8 * 1024)
+#define EEPROM_SIZE EXTERNAL_FLASH_SIZE
+
+#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
+#define RGB_MATRIX_CENTER {112,32}
+
+#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
+#define RGB_MATRIX_KEYPRESSES
+#define RGB_MATRIX_KEYRELEASES
+
+// RGB Matrix Animation modes. Explicitly enabled
+// For full list of effects, see:
+// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
+// #define ENABLE_RGB_MATRIX_ALPHAS_MODS
+// #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
+// #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
+#define ENABLE_RGB_MATRIX_BREATHING
+// #define ENABLE_RGB_MATRIX_BAND_SAT
+// #define ENABLE_RGB_MATRIX_BAND_VAL
+// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
+// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
+// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
+// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
+#define ENABLE_RGB_MATRIX_CYCLE_ALL
+#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
+//#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
+#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
+//#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
+//#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
+//#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
+//#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
+//#define ENABLE_RGB_MATRIX_DUAL_BEACON
+//#define ENABLE_RGB_MATRIX_RAINBOW_BEACON
+// #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
+//#define ENABLE_RGB_MATRIX_RAINDROPS
+// #define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
+// #define ENABLE_RGB_MATRIX_HUE_BREATHING
+// #define ENABLE_RGB_MATRIX_HUE_PENDULUM
+// #define ENABLE_RGB_MATRIX_HUE_WAVE
+// #define ENABLE_RGB_MATRIX_PIXEL_RAIN
+// #define ENABLE_RGB_MATRIX_PIXEL_FLOW
+// #define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
+// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined
+//#define ENABLE_RGB_MATRIX_TYPING_HEATMAP
+//#define ENABLE_RGB_MATRIX_DIGITAL_RAIN
+// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined
+//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
+//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE
+//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
+//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
+//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
+//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
+//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
+//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
+//#define ENABLE_RGB_MATRIX_SPLASH
+#define ENABLE_RGB_MATRIX_MULTISPLASH
+//#define ENABLE_RGB_MATRIX_SOLID_SPLASH
+//#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
+
+/* Send up to 4 key press events per scan */
+#define QMK_KEYS_PER_SCAN 4
+
+#define RGBLIGHT_HUE_STEP 8
+#define RGBLIGHT_SAT_STEP 8
+#define RGBLIGHT_VAL_STEP 8
+#define RGBLIGHT_LIMIT_VAL 180 /* The maximum brightness level */
+
+/* Set debounce time to 1ms */
+#define DEBOUNCE 5
+
+#define USB_SUSPEND_WAKEUP_DELAY 1500 //Wakeup host USB
+
diff --git a/keyboards/hfdkb/ac001/halconf.h b/keyboards/hfdkb/ac001/halconf.h
new file mode 100644
index 000000000000..aef989fe0d51
--- /dev/null
+++ b/keyboards/hfdkb/ac001/halconf.h
@@ -0,0 +1,8 @@
+#pragma once
+
+#define HAL_USE_I2C TRUE
+#define HAL_USE_SPI TRUE
+#define SPI_USE_WAIT TRUE
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+
+#include_next
diff --git a/keyboards/hfdkb/ac001/info.json b/keyboards/hfdkb/ac001/info.json
new file mode 100644
index 000000000000..80d491054040
--- /dev/null
+++ b/keyboards/hfdkb/ac001/info.json
@@ -0,0 +1,15 @@
+{
+ "keyboard_name": "ac001",
+ "url": "",
+ "maintainer": "qmk",
+ "layouts": {
+ "LAYOUT": {
+ "layout": [
+ {"label":"~", "x":0, "y":0},
+ {"label":"!", "x":1, "y":0},
+ {"label":"3", "x":2, "y":0},
+ {"label":"4", "x":3, "y":0},
+ {"label":"@", "x":4, "y":0}]
+ }
+ }
+}
diff --git a/keyboards/hfdkb/ac001/keymaps/default/keymap.c b/keyboards/hfdkb/ac001/keymaps/default/keymap.c
new file mode 100644
index 000000000000..e98b83551ba3
--- /dev/null
+++ b/keyboards/hfdkb/ac001/keymaps/default/keymap.c
@@ -0,0 +1,29 @@
+/* Copyright (C) 2022 Westberry Technology (ChangZhou) Corp., Ltd
+ *
+ * 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 .
+ */
+
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT( /* Base */
+ RGB_MOD, KC_LCTL, KC_ENT,KC_NO,KC_NO),
+ [1] = LAYOUT(
+ RGB_MOD, KC_LCTL, KC_ENT,KC_NO,KC_NO),
+ [2] = LAYOUT(
+ RGB_MOD, KC_LCTL, KC_ENT,KC_NO,KC_NO),
+ [3] = LAYOUT(
+ RGB_MOD, KC_LCTL, KC_ENT,KC_NO,KC_NO)
+};
+
diff --git a/keyboards/hfdkb/ac001/keymaps/via/ac001_via.json b/keyboards/hfdkb/ac001/keymaps/via/ac001_via.json
new file mode 100644
index 000000000000..5bb4640d0911
--- /dev/null
+++ b/keyboards/hfdkb/ac001/keymaps/via/ac001_via.json
@@ -0,0 +1,44 @@
+{
+ "name": "ac001",
+ "vendorId": "0x3528",
+ "productId": "0x2330",
+ "lighting": {
+ "extends": "qmk_rgblight",
+ "underglowEffects": [
+ ["None", 0],
+ ["SOLID_COLOR", 1],
+ ["BREATHING", 1],
+ ["CYCLE_ALL", 1],
+ ["CYCLE_LEFT_RIGHT", 1],
+ ["RAINBOW_MOVING_CHEVRON", 1],
+ ["MATRIX_MULTISPLASH", 1]
+ ]
+ },
+ "matrix": { "rows": 1, "cols": 5 },
+ "layouts": {
+ "keymap": [
+ [
+ {
+ "x": 1.25,
+ "c": "#777777",
+ "w": 4,
+ "h": 4
+ },
+ "0,2"
+ ],
+ [
+ {
+ "y": 0.75,
+ "c": "#aaaaaa"
+ },
+ "0,1"
+ ],
+ [
+ {
+ "y": 0.25
+ },
+ "0,0"
+ ]
+ ]
+ }
+ }
diff --git a/keyboards/hfdkb/ac001/keymaps/via/config.h b/keyboards/hfdkb/ac001/keymaps/via/config.h
new file mode 100644
index 000000000000..8d8805624040
--- /dev/null
+++ b/keyboards/hfdkb/ac001/keymaps/via/config.h
@@ -0,0 +1,21 @@
+/* Copyright (C) 2022 Westberry Technology (ChangZhou) Corp., Ltd
+ *
+ * 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 .
+ */
+
+#pragma once
+
+#include "config_common.h"
+
+#define STM32_USB_USE_OTG1 TRUE
diff --git a/keyboards/hfdkb/ac001/keymaps/via/keymap.c b/keyboards/hfdkb/ac001/keymaps/via/keymap.c
new file mode 100644
index 000000000000..e98b83551ba3
--- /dev/null
+++ b/keyboards/hfdkb/ac001/keymaps/via/keymap.c
@@ -0,0 +1,29 @@
+/* Copyright (C) 2022 Westberry Technology (ChangZhou) Corp., Ltd
+ *
+ * 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 .
+ */
+
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT( /* Base */
+ RGB_MOD, KC_LCTL, KC_ENT,KC_NO,KC_NO),
+ [1] = LAYOUT(
+ RGB_MOD, KC_LCTL, KC_ENT,KC_NO,KC_NO),
+ [2] = LAYOUT(
+ RGB_MOD, KC_LCTL, KC_ENT,KC_NO,KC_NO),
+ [3] = LAYOUT(
+ RGB_MOD, KC_LCTL, KC_ENT,KC_NO,KC_NO)
+};
+
diff --git a/keyboards/hfdkb/ac001/keymaps/via/rules.mk b/keyboards/hfdkb/ac001/keymaps/via/rules.mk
new file mode 100644
index 000000000000..1e5b99807cb7
--- /dev/null
+++ b/keyboards/hfdkb/ac001/keymaps/via/rules.mk
@@ -0,0 +1 @@
+VIA_ENABLE = yes
diff --git a/keyboards/hfdkb/ac001/mcuconf.h b/keyboards/hfdkb/ac001/mcuconf.h
new file mode 100644
index 000000000000..ca52ddf7eefd
--- /dev/null
+++ b/keyboards/hfdkb/ac001/mcuconf.h
@@ -0,0 +1,9 @@
+#pragma once
+
+#include_next
+
+#undef WB32_SPI_USE_QSPI
+#define WB32_SPI_USE_QSPI TRUE
+
+#undef WB32_I2C_USE_I2C1
+#define WB32_I2C_USE_I2C1 TRUE
diff --git a/keyboards/hfdkb/ac001/rules.mk b/keyboards/hfdkb/ac001/rules.mk
new file mode 100644
index 000000000000..ccbbb2e9a472
--- /dev/null
+++ b/keyboards/hfdkb/ac001/rules.mk
@@ -0,0 +1,26 @@
+# MCU name
+MCU = WB32FQ95
+
+# Bootloader selection
+BOOTLOADER = wb32-dfu
+
+# 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 = yes # Enable N-Key Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = WS2812
+AUDIO_ENABLE = no # Audio output
+ENCODER_ENABLE = no
+FLASH_DRIVER = spi # Enable SPI flash
+EEPROM_DRIVER = custom # Enable SPI flash memory
+
+QUANTUM_LIB_SRC += spi_master.c
+SRC += src/eeprom_flash.c
diff --git a/keyboards/hfdkb/ac001/src/eeprom_flash.c b/keyboards/hfdkb/ac001/src/eeprom_flash.c
new file mode 100644
index 000000000000..a458c0b0a532
--- /dev/null
+++ b/keyboards/hfdkb/ac001/src/eeprom_flash.c
@@ -0,0 +1,692 @@
+/* Copyright (C) 2022 Westberry Technology (ChangZhou) Corp., Ltd
+ *
+ * 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 .
+*/
+
+#include
+#include
+#include "util.h"
+#include "debug.h"
+#include "wait.h"
+#include "timer.h"
+#include "eeprom.h"
+#include "flash_spi.h"
+
+/*
+ * We emulate eeprom by writing a snapshot compacted view of eeprom contents,
+ * followed by a write log of any change since that snapshot:
+ *
+ * === SIMULATED EEPROM CONTENTS ===
+ *
+ * ┌─ Compacted ┬ Write Log ─┐
+ * │............│[BYTE][BYTE]│
+ * │FFFF....FFFF│[WRD0][WRD1]│
+ * │FFFFFFFFFFFF│[WORD][NEXT]│
+ * │....FFFFFFFF│[BYTE][WRD0]│
+ * ├────────────┼────────────┤
+ * └──PAGE_BASE │ │
+ * PAGE_LAST─┴─WRITE_BASE │
+ * WRITE_LAST ┘
+ *
+ * Compacted contents are the 1's complement of the actual EEPROM contents.
+ * e.g. An 'FFFF' represents a '0000' value.
+ *
+ * The size of the 'compacted' area is equal to the size of the 'emulated' eeprom.
+ * The size of the compacted-area and write log are configurable, and the combined
+ * size of Compacted + WriteLog is a multiple EXTERNAL_FLASH_PAGE_SIZE, which is MCU dependent.
+ * Simulated Eeprom contents are located at the end of available flash space.
+ *
+ * The following configuration defines can be set:
+ *
+ * EXTERNAL_FLASH_PAGE_COUNT # Total number of pages to use for eeprom simulation (Compact + Write log)
+ * FEE_DENSITY_BYTES # Size of simulated eeprom. (Defaults to half the space allocated by EXTERNAL_FLASH_PAGE_COUNT)
+ * NOTE: The current implementation does not include page swapping,
+ * and FEE_DENSITY_BYTES will consume that amount of RAM as a cached view of actual EEPROM contents.
+ *
+ * The maximum size of FEE_DENSITY_BYTES is currently 16384. The write log size equals
+ * EXTERNAL_FLASH_PAGE_COUNT * EXTERNAL_FLASH_PAGE_SIZE - FEE_DENSITY_BYTES.
+ * The larger the write log, the less frequently the compacted area needs to be rewritten.
+ *
+ *
+ * *** General Algorithm ***
+ *
+ * During initialization:
+ * The contents of the Compacted-flash area are loaded and the 1's complement value
+ * is cached into memory (e.g. 0xFFFF in Flash represents 0x0000 in cache).
+ * Write log entries are processed until a 0xFFFF is reached.
+ * Each log entry updates a byte or word in the cache.
+ *
+ * During reads:
+ * EEPROM contents are given back directly from the cache in memory.
+ *
+ * During writes:
+ * The contents of the cache is updated first.
+ * If the Compacted-flash area corresponding to the write address is unprogrammed, the 1's complement of the value is written directly into Compacted-flash
+ * Otherwise:
+ * If the write log is full, erase both the Compacted-flash area and the Write log, then write cached contents to the Compacted-flash area.
+ * Otherwise a Write log entry is constructed and appended to the next free position in the Write log.
+ *
+ *
+ * *** Write Log Structure ***
+ *
+ * Write log entries allow for optimized byte writes to addresses below 128. Writing 0 or 1 words are also optimized when word-aligned.
+ *
+ * === WRITE LOG ENTRY FORMATS ===
+ *
+ * ╔═══ Byte-Entry ══╗
+ * ║0XXXXXXX║YYYYYYYY║
+ * ║ └──┬──┘║└──┬───┘║
+ * ║ Address║ Value ║
+ * ╚════════╩════════╝
+ * 0 <= Address < 0x80 (128)
+ *
+ * ╔ Word-Encoded 0 ╗
+ * ║100XXXXXXXXXXXXX║
+ * ║ │└─────┬─────┘║
+ * ║ │Address >> 1 ║
+ * ║ └── Value: 0 ║
+ * ╚════════════════╝
+ * 0 <= Address <= 0x3FFE (16382)
+ *
+ * ╔ Word-Encoded 1 ╗
+ * ║101XXXXXXXXXXXXX║
+ * ║ │└─────┬─────┘║
+ * ║ │Address >> 1 ║
+ * ║ └── Value: 1 ║
+ * ╚════════════════╝
+ * 0 <= Address <= 0x3FFE (16382)
+ *
+ * ╔═══ Reserved ═══╗
+ * ║110XXXXXXXXXXXXX║
+ * ╚════════════════╝
+ *
+ * ╔═══════════ Word-Next ═══════════╗
+ * ║111XXXXXXXXXXXXX║YYYYYYYYYYYYYYYY║
+ * ║ └─────┬─────┘║└───────┬──────┘║
+ * ║(Address-128)>>1║ ~Value ║
+ * ╚════════════════╩════════════════╝
+ * ( 0 <= Address < 0x0080 (128): Reserved)
+ * 0x80 <= Address <= 0x3FFE (16382)
+ *
+ * Write Log entry ranges:
+ * 0x0000 ... 0x7FFF - Byte-Entry; address is (Entry & 0x7F00) >> 4; value is (Entry & 0xFF)
+ * 0x8000 ... 0x9FFF - Word-Encoded 0; address is (Entry & 0x1FFF) << 1; value is 0
+ * 0xA000 ... 0xBFFF - Word-Encoded 1; address is (Entry & 0x1FFF) << 1; value is 1
+ * 0xC000 ... 0xDFFF - Reserved
+ * 0xE000 ... 0xFFBF - Word-Next; address is (Entry & 0x1FFF) << 1 + 0x80; value is ~(Next_Entry)
+ * 0xFFC0 ... 0xFFFE - Reserved
+ * 0xFFFF - Unprogrammed
+ *
+ */
+
+/* These bits are used for optimizing encoding of bytes, 0 and 1 */
+#define FEE_WORD_ENCODING 0x8000
+#define FEE_VALUE_NEXT 0x6000
+#define FEE_VALUE_RESERVED 0x4000
+#define FEE_VALUE_ENCODED 0x2000
+#define FEE_BYTE_RANGE 0x80
+
+/* Addressable range 16KByte: 0 <-> (0x1FFF << 1) */
+#define FEE_ADDRESS_MAX_SIZE 0x4000
+
+/* Flash word value after erase */
+#define FEE_EMPTY_WORD ((uint16_t)0xFFFF)
+
+/* Size of combined compacted eeprom and write log pages */
+#define FEE_DENSITY_MAX_SIZE (EXTERNAL_FLASH_PAGE_COUNT * EXTERNAL_FLASH_PAGE_SIZE)
+
+#ifndef EXTERNAL_FLASH_SIZE_IGNORE_CHECK /* *TODO: Get rid of this check */
+# if FEE_DENSITY_MAX_SIZE > (EXTERNAL_FLASH_SIZE * 1024)
+# pragma message STR(FEE_DENSITY_MAX_SIZE) " > " STR(EXTERNAL_FLASH_SIZE * 1024)
+# error emulated eeprom: FEE_DENSITY_MAX_SIZE is greater than available flash size
+# endif
+#endif
+
+/* Size of emulated eeprom */
+#ifdef FEE_DENSITY_BYTES
+# if (FEE_DENSITY_BYTES > FEE_DENSITY_MAX_SIZE)
+# pragma message STR(FEE_DENSITY_BYTES) " > " STR(FEE_DENSITY_MAX_SIZE)
+# error emulated eeprom: FEE_DENSITY_BYTES exceeds FEE_DENSITY_MAX_SIZE
+# endif
+# if (FEE_DENSITY_BYTES == FEE_DENSITY_MAX_SIZE)
+# pragma message STR(FEE_DENSITY_BYTES) " == " STR(FEE_DENSITY_MAX_SIZE)
+# warning emulated eeprom: FEE_DENSITY_BYTES leaves no room for a write log. This will greatly increase the flash wear rate!
+# endif
+# if FEE_DENSITY_BYTES > FEE_ADDRESS_MAX_SIZE
+# pragma message STR(FEE_DENSITY_BYTES) " > " STR(FEE_ADDRESS_MAX_SIZE)
+# error emulated eeprom: FEE_DENSITY_BYTES is greater than FEE_ADDRESS_MAX_SIZE allows
+# endif
+# if ((FEE_DENSITY_BYTES) % 2) == 1
+# error emulated eeprom: FEE_DENSITY_BYTES must be even
+# endif
+#else
+/* Default to half of allocated space used for emulated eeprom, half for write log */
+# define FEE_DENSITY_BYTES (EXTERNAL_FLASH_PAGE_COUNT * (EXTERNAL_FLASH_PAGE_SIZE >> 1))
+#endif
+
+/* Size of write log */
+#ifdef FEE_WRITE_LOG_BYTES
+# if ((FEE_DENSITY_BYTES + FEE_WRITE_LOG_BYTES) > FEE_DENSITY_MAX_SIZE)
+# pragma message STR(FEE_DENSITY_BYTES) " + " STR(FEE_WRITE_LOG_BYTES) " > " STR(FEE_DENSITY_MAX_SIZE)
+# error emulated eeprom: FEE_WRITE_LOG_BYTES exceeds remaining FEE_DENSITY_MAX_SIZE
+# endif
+# if ((FEE_WRITE_LOG_BYTES) % 2) == 1
+# error emulated eeprom: FEE_WRITE_LOG_BYTES must be even
+# endif
+#else
+/* Default to use all remaining space */
+# define FEE_WRITE_LOG_BYTES (EXTERNAL_FLASH_PAGE_COUNT * EXTERNAL_FLASH_PAGE_SIZE - FEE_DENSITY_BYTES)
+#endif
+
+#define EXTERNAL_FLASH_PAGE_BASE_ADDRESS 0
+/* Start of the emulated eeprom compacted flash area */
+#define FEE_COMPACTED_BASE_ADDRESS EXTERNAL_FLASH_PAGE_BASE_ADDRESS
+/* End of the emulated eeprom compacted flash area */
+#define FEE_COMPACTED_LAST_ADDRESS (FEE_COMPACTED_BASE_ADDRESS + FEE_DENSITY_BYTES)
+/* Start of the emulated eeprom write log */
+#define FEE_WRITE_LOG_BASE_ADDRESS FEE_COMPACTED_LAST_ADDRESS
+/* End of the emulated eeprom write log */
+#define FEE_WRITE_LOG_LAST_ADDRESS (FEE_WRITE_LOG_BASE_ADDRESS + FEE_WRITE_LOG_BYTES)
+
+#if defined(DYNAMIC_KEYMAP_EEPROM_MAX_ADDR) && (DYNAMIC_KEYMAP_EEPROM_MAX_ADDR >= FEE_DENSITY_BYTES)
+# error emulated eeprom: DYNAMIC_KEYMAP_EEPROM_MAX_ADDR is greater than the FEE_DENSITY_BYTES available
+#endif
+
+/* In-memory contents of emulated eeprom for faster access */
+/* *TODO: Implement page swapping */
+uint16_t WordBuf[FEE_DENSITY_BYTES / 2] = {0xFFFF};
+static uint8_t *DataBuf = (uint8_t *)WordBuf;
+
+/* Pointer to the first available slot within the write log */
+static uint16_t *empty_slot;
+
+#define DEBUG_EEPROM_OUTPUT
+
+/*
+ * Debug print utils
+ */
+
+#if defined(DEBUG_EEPROM_OUTPUT)
+
+# define debug_eeprom debug_enable
+# define eeprom_println(s) println(s)
+# define eeprom_printf(fmt, ...) dprintf(fmt, ##__VA_ARGS__)
+
+#else /* NO_DEBUG */
+
+# define debug_eeprom false
+# define eeprom_println(s)
+# define eeprom_printf(fmt, ...)
+
+#endif /* NO_DEBUG */
+
+void print_eeprom(void) {
+#ifndef NO_DEBUG
+ int empty_rows = 0;
+ for (uint16_t i = 0; i < FEE_DENSITY_BYTES; i++) {
+ if (i % 16 == 0) {
+ if (i >= FEE_DENSITY_BYTES - 16) {
+ /* Make sure we display the last row */
+ empty_rows = 0;
+ }
+ /* Check if this row is uninitialized */
+ ++empty_rows;
+ for (uint16_t j = 0; j < 16; j++) {
+ if (DataBuf[i + j]) {
+ empty_rows = 0;
+ break;
+ }
+ }
+ if (empty_rows > 1) {
+ /* Repeat empty row */
+ if (empty_rows == 2) {
+ /* Only display the first repeat empty row */
+ println("*");
+ }
+ i += 15;
+ continue;
+ }
+ xprintf("%04x", i);
+ }
+ if (i % 8 == 0) print(" ");
+
+ xprintf(" %02x", DataBuf[i]);
+ if ((i + 1) % 16 == 0) {
+ println("");
+ }
+ }
+#endif
+}
+
+static flash_status_t external_flash_program_half_word(uint32_t addr, uint16_t value) {
+ uint8_t *src = (uint8_t *)&value;
+
+ return flash_write_block(addr, src, 2);
+}
+
+static uint32_t EEPROM_Init(void) {
+ /* Load emulated eeprom contents from compacted flash into memory */
+ uint32_t src = (uint32_t)FEE_COMPACTED_BASE_ADDRESS;
+ uint16_t *dest = (uint16_t *)DataBuf;
+
+ flash_read_block(src, (uint8_t *)dest, FEE_COMPACTED_LAST_ADDRESS - FEE_COMPACTED_BASE_ADDRESS);
+
+ for (int i = 0; i < ((FEE_COMPACTED_LAST_ADDRESS - FEE_COMPACTED_BASE_ADDRESS) >> 1); i++, ++dest) {
+ *dest = ~*dest;
+ }
+
+ if (debug_eeprom) {
+ println("EEPROM_Init Compacted Pages:");
+ print_eeprom();
+ println("EEPROM_Init Write Log:");
+ }
+
+ /* Replay write log */
+ uint16_t *log_addr;
+ for (log_addr = (uint16_t *)FEE_WRITE_LOG_BASE_ADDRESS; log_addr < (uint16_t *)FEE_WRITE_LOG_LAST_ADDRESS; ++log_addr) {
+ uint16_t address;
+
+ flash_read_block((uint32_t)log_addr, (uint8_t *)&address, 0x02);
+ if (address == FEE_EMPTY_WORD) {
+ break;
+ }
+ /* Check for lowest 128-bytes optimization */
+ if (!(address & FEE_WORD_ENCODING)) {
+ uint8_t bvalue = (uint8_t)address;
+ address >>= 8;
+ DataBuf[address] = bvalue;
+ eeprom_printf("DataBuf[0x%02x] = 0x%02x;\n", address, bvalue);
+ } else {
+ uint16_t wvalue;
+
+ /* Check if value is in next word */
+ if ((address & FEE_VALUE_NEXT) == FEE_VALUE_NEXT) {
+ /* Read value from next word */
+ if (++log_addr >= (uint16_t *)FEE_WRITE_LOG_LAST_ADDRESS) {
+ break;
+ }
+ flash_read_block((uint32_t)log_addr, (uint8_t *)&wvalue, 0x02);
+ wvalue = ~wvalue;
+ if (!wvalue) {
+ eeprom_printf("Incomplete write at log_addr: 0x%04x;\n", (uint32_t)log_addr);
+ /* Possibly incomplete write. Ignore and continue */
+ continue;
+ }
+ address &= 0x1FFF;
+ address <<= 1;
+ /* Writes to addresses less than 128 are byte log entries */
+ address += FEE_BYTE_RANGE;
+ } else {
+ /* Reserved for future use */
+ if (address & FEE_VALUE_RESERVED) {
+ eeprom_printf("Reserved encoded value at log_addr: 0x%04x;\n", (uint32_t)log_addr);
+ continue;
+ }
+
+ /* Optimization for 0 or 1 values. */
+ wvalue = (address & FEE_VALUE_ENCODED) >> 13;
+ address &= 0x1FFF;
+ address <<= 1;
+ }
+ if (address < FEE_DENSITY_BYTES) {
+ eeprom_printf("DataBuf[0x%04x] = 0x%04x;\n", address, wvalue);
+ *(uint16_t *)(&DataBuf[address]) = wvalue;
+ } else {
+ eeprom_printf("DataBuf[0x%04x] cannot be set to 0x%04x [BAD ADDRESS]\n", address, wvalue);
+ }
+ }
+ }
+
+ empty_slot = log_addr;
+
+ if (debug_eeprom) {
+ println("EEPROM_Init Final DataBuf:");
+ print_eeprom();
+ }
+
+ return (uint32_t)FEE_DENSITY_BYTES;
+}
+
+/* Clear flash contents (doesn't touch in-memory DataBuf) */
+static void eeprom_clear(void) {
+ uint32_t erase_addr = EXTERNAL_FLASH_PAGE_BASE_ADDRESS;
+
+ for ( ; erase_addr < (uint32_t)(EXTERNAL_FLASH_SIZE);) {
+
+ if (erase_addr % ((uint32_t)(EXTERNAL_FLASH_SECTOR_SIZE)) != 0) {
+ eeprom_printf("The external Flash address to be erased is incorrect: 0x%08x\n", (uint32_t)erase_addr);
+ break;
+ }
+ flash_erase_sector(erase_addr);
+ erase_addr += (uint32_t)(EXTERNAL_FLASH_SECTOR_SIZE);
+ }
+
+ empty_slot = (uint16_t *)FEE_WRITE_LOG_BASE_ADDRESS;
+ eeprom_printf("eeprom_clear empty_slot: 0x%08x\n", (uint32_t)empty_slot);
+}
+
+/* Erase emulated eeprom */
+void EEPROM_Erase(void) {
+ eeprom_println("EEPROM_Erase");
+ /* Erase compacted pages and write log */
+ eeprom_clear();
+ /* re-initialize to reset DataBuf */
+ EEPROM_Init();
+}
+
+/* Compact write log */
+static uint8_t eeprom_compact(void) {
+ /* Erase compacted pages and write log */
+ eeprom_clear();
+
+ flash_status_t final_status = FLASH_STATUS_SUCCESS;
+
+ /* Write emulated eeprom contents from memory to compacted flash */
+ uint16_t *src = (uint16_t *)DataBuf;
+ uintptr_t dest = FEE_COMPACTED_BASE_ADDRESS;
+ uint16_t value;
+ for (; dest < FEE_COMPACTED_LAST_ADDRESS; ++src, dest += 2) {
+ value = *src;
+ if (value) {
+ eeprom_printf("external_flash_program_half_word(0x%04x, 0x%04x)\n", (uint32_t)dest, ~value);
+ flash_status_t status = external_flash_program_half_word(dest, ~value);
+ if (status != FLASH_STATUS_SUCCESS) final_status = status;
+ }
+ }
+
+ if (debug_eeprom) {
+ println("eeprom_compacted:");
+ print_eeprom();
+ }
+
+ return final_status;
+}
+
+static uint8_t eeprom_write_direct_entry(uint16_t Address) {
+ /* Check if we can just write this directly to the compacted flash area */
+ uint32_t directAddress = FEE_COMPACTED_BASE_ADDRESS + (Address & 0xFFFE);
+ uint16_t wvalue;
+
+ flash_read_block(directAddress, (uint8_t *)&wvalue, 0x02);
+ if (wvalue == FEE_EMPTY_WORD) {
+ /* Write the value directly to the compacted area without a log entry */
+ wvalue = ~*(uint16_t *)(&DataBuf[Address & 0xFFFE]);
+
+ /* Early exit if a write isn't needed */
+ if (wvalue == FEE_EMPTY_WORD) return FLASH_STATUS_SUCCESS;
+
+ eeprom_printf("external_flash_program_half_word(0x%08x, 0x%04x) [DIRECT]\n", directAddress, wvalue);
+ flash_status_t status = external_flash_program_half_word(directAddress, wvalue);
+
+ return status;
+ }
+ return 0;
+}
+
+static uint8_t eeprom_write_log_word_entry(uint16_t Address) {
+ flash_status_t final_status = FLASH_STATUS_SUCCESS;
+
+ uint16_t value = *(uint16_t *)(&DataBuf[Address]);
+ eeprom_printf("eeprom_write_log_word_entry(0x%04x): 0x%04x\n", Address, value);
+
+ /* MSB signifies the lowest 128-byte optimization is not in effect */
+ uint16_t encoding = FEE_WORD_ENCODING;
+ uint8_t entry_size;
+ if (value <= 1) {
+ encoding |= value << 13;
+ entry_size = 2;
+ } else {
+ encoding |= FEE_VALUE_NEXT;
+ entry_size = 4;
+ /* Writes to addresses less than 128 are byte log entries */
+ Address -= FEE_BYTE_RANGE;
+ }
+
+ /* if we can't find an empty spot, we must compact emulated eeprom */
+ if (empty_slot > (uint16_t *)(FEE_WRITE_LOG_LAST_ADDRESS - entry_size)) {
+ /* compact the write log into the compacted flash area */
+ return eeprom_compact();
+ }
+
+ /* Word log writes should be word-aligned. Take back a bit */
+ Address >>= 1;
+ Address |= encoding;
+
+ /* ok we found a place let's write our data */
+
+ /* address */
+ eeprom_printf("external_flash_program_half_word(0x%08x, 0x%04x)\n", (uint32_t)empty_slot, Address);
+ final_status = external_flash_program_half_word((uintptr_t)empty_slot++, Address);
+
+ /* value */
+ if (encoding == (FEE_WORD_ENCODING | FEE_VALUE_NEXT)) {
+ eeprom_printf("external_flash_program_half_word(0x%08x, 0x%04x)\n", (uint32_t)empty_slot, ~value);
+ flash_status_t status = external_flash_program_half_word((uintptr_t)empty_slot++, ~value);
+ if (status != FLASH_STATUS_SUCCESS) final_status = status;
+ }
+
+ return final_status;
+}
+
+static uint8_t eeprom_write_log_byte_entry(uint16_t Address) {
+ eeprom_printf("eeprom_write_log_byte_entry(0x%04x): 0x%02x\n", Address, DataBuf[Address]);
+
+ /* if couldn't find an empty spot, we must compact emulated eeprom */
+ if (empty_slot >= (uint16_t *)FEE_WRITE_LOG_LAST_ADDRESS) {
+ /* compact the write log into the compacted flash area */
+ return eeprom_compact();
+ }
+
+ /* ok we found a place let's write our data */
+
+ /* Pack address and value into the same word */
+ uint16_t value = (Address << 8) | DataBuf[Address];
+
+ /* write to flash */
+ eeprom_printf("external_flash_program_half_word(0x%08x, 0x%04x)\n", (uint32_t)empty_slot, value);
+ flash_status_t status = external_flash_program_half_word((uintptr_t)empty_slot++, value);
+
+ return status;
+}
+
+flash_status_t EEPROM_WriteDataByte(uint16_t Address, uint8_t DataByte) {
+ /* if the address is out-of-bounds, do nothing */
+ if (Address >= FEE_DENSITY_BYTES) {
+ eeprom_printf("EEPROM_WriteDataByte(0x%04x, 0x%02x) [BAD ADDRESS]\n", Address, DataByte);
+ return FLASH_STATUS_BAD_ADDRESS;
+ }
+
+ /* if the value is the same, don't bother writing it */
+ if (DataBuf[Address] == DataByte) {
+ eeprom_printf("EEPROM_WriteDataByte(0x%04x, 0x%02x) [SKIP SAME]\n", Address, DataByte);
+ return FLASH_STATUS_SUCCESS;
+ }
+
+ /* keep DataBuf cache in sync */
+ DataBuf[Address] = DataByte;
+ eeprom_printf("EEPROM_WriteDataByte DataBuf[0x%04x] = 0x%02x\n", Address, DataBuf[Address]);
+
+ /* perform the write into flash memory */
+ /* First, attempt to write directly into the compacted flash area */
+ flash_status_t status = eeprom_write_direct_entry(Address);
+ if (!status) {
+ /* Otherwise append to the write log */
+ if (Address < FEE_BYTE_RANGE) {
+ status = eeprom_write_log_byte_entry(Address);
+ } else {
+ status = eeprom_write_log_word_entry(Address & 0xFFFE);
+ }
+ }
+ if (status != 0 && status != FLASH_STATUS_SUCCESS) {
+ eeprom_printf("EEPROM_WriteDataByte [STATUS == %d]\n", status);
+ }
+ return status;
+}
+
+flash_status_t EEPROM_WriteDataWord(uint16_t Address, uint16_t DataWord) {
+ /* if the address is out-of-bounds, do nothing */
+ if (Address >= FEE_DENSITY_BYTES) {
+ eeprom_printf("EEPROM_WriteDataWord(0x%04x, 0x%04x) [BAD ADDRESS]\n", Address, DataWord);
+ return FLASH_STATUS_BAD_ADDRESS;
+ }
+
+ /* Check for word alignment */
+ flash_status_t final_status = FLASH_STATUS_SUCCESS;
+ if (Address % 2) {
+ final_status = EEPROM_WriteDataByte(Address, DataWord);
+ flash_status_t status = EEPROM_WriteDataByte(Address + 1, DataWord >> 8);
+ if (status != FLASH_STATUS_SUCCESS) final_status = status;
+ if (final_status != 0 && final_status != FLASH_STATUS_SUCCESS) {
+ eeprom_printf("EEPROM_WriteDataWord [STATUS == %d]\n", final_status);
+ }
+ return final_status;
+ }
+
+ /* if the value is the same, don't bother writing it */
+ uint16_t oldValue = *(uint16_t *)(&DataBuf[Address]);
+ if (oldValue == DataWord) {
+ eeprom_printf("EEPROM_WriteDataWord(0x%04x, 0x%04x) [SKIP SAME]\n", Address, DataWord);
+ return FLASH_STATUS_SUCCESS;
+ }
+
+ /* keep DataBuf cache in sync */
+ *(uint16_t *)(&DataBuf[Address]) = DataWord;
+ eeprom_printf("EEPROM_WriteDataWord DataBuf[0x%04x] = 0x%04x\n", Address, *(uint16_t *)(&DataBuf[Address]));
+
+ /* perform the write into flash memory */
+ /* First, attempt to write directly into the compacted flash area */
+ final_status = eeprom_write_direct_entry(Address);
+ if (!final_status) {
+ /* Otherwise append to the write log */
+ /* Check if we need to fall back to byte write */
+ if (Address < FEE_BYTE_RANGE) {
+ final_status = FLASH_STATUS_SUCCESS;
+ /* Only write a byte if it has changed */
+ if ((uint8_t)oldValue != (uint8_t)DataWord) {
+ final_status = eeprom_write_log_byte_entry(Address);
+ }
+ flash_status_t status = FLASH_STATUS_SUCCESS;
+ /* Only write a byte if it has changed */
+ if ((oldValue >> 8) != (DataWord >> 8)) {
+ status = eeprom_write_log_byte_entry(Address + 1);
+ }
+ if (status != FLASH_STATUS_SUCCESS) final_status = status;
+ } else {
+ final_status = eeprom_write_log_word_entry(Address);
+ }
+ }
+ if (final_status != 0 && final_status != FLASH_STATUS_SUCCESS) {
+ eeprom_printf("EEPROM_WriteDataWord [STATUS == %d]\n", final_status);
+ }
+ return final_status;
+}
+
+uint8_t EEPROM_ReadDataByte(uint16_t Address) {
+ uint8_t DataByte = 0xFF;
+
+ if (Address < FEE_DENSITY_BYTES) {
+ DataByte = DataBuf[Address];
+ }
+
+ eeprom_printf("EEPROM_ReadDataByte(0x%04x): 0x%02x\n", Address, DataByte);
+
+ return DataByte;
+}
+
+uint16_t EEPROM_ReadDataWord(uint16_t Address) {
+ uint16_t DataWord = 0xFFFF;
+
+ if (Address < FEE_DENSITY_BYTES - 1) {
+ /* Check word alignment */
+ if (Address % 2) {
+ DataWord = DataBuf[Address] | (DataBuf[Address + 1] << 8);
+ } else {
+ DataWord = *(uint16_t *)(&DataBuf[Address]);
+ }
+ }
+
+ eeprom_printf("EEPROM_ReadDataWord(0x%04x): 0x%04x\n", Address, DataWord);
+
+ return DataWord;
+}
+
+/*****************************************************************************
+ * Bind to eeprom_driver.c
+ *******************************************************************************/
+void eeprom_driver_init(void) {
+ flash_init();
+ EEPROM_Init();
+}
+
+void eeprom_driver_erase(void) { EEPROM_Erase(); }
+
+void eeprom_read_block(void *buf, const void *addr, size_t len) {
+ const uint8_t *src = (const uint8_t *)addr;
+ uint8_t * dest = (uint8_t *)buf;
+
+ /* Check word alignment */
+ if (len && (uintptr_t)src % 2) {
+ /* Read the unaligned first byte */
+ *dest++ = EEPROM_ReadDataByte((const uintptr_t)src++);
+ --len;
+ }
+
+ uint16_t value;
+ bool aligned = ((uintptr_t)dest % 2 == 0);
+ while (len > 1) {
+ value = EEPROM_ReadDataWord((const uintptr_t)((uint16_t *)src));
+ if (aligned) {
+ *(uint16_t *)dest = value;
+ dest += 2;
+ } else {
+ *dest++ = value;
+ *dest++ = value >> 8;
+ }
+ src += 2;
+ len -= 2;
+ }
+ if (len) {
+ *dest = EEPROM_ReadDataByte((const uintptr_t)src);
+ }
+}
+
+void eeprom_write_block(const void *buf, void *addr, size_t len) {
+ uint8_t * dest = (uint8_t *)addr;
+ const uint8_t *src = (const uint8_t *)buf;
+
+ /* Check word alignment */
+ if (len && (uintptr_t)dest % 2) {
+ /* Write the unaligned first byte */
+ EEPROM_WriteDataByte((uintptr_t)dest++, *src++);
+ --len;
+ }
+
+ uint16_t value;
+ bool aligned = ((uintptr_t)src % 2 == 0);
+ while (len > 1) {
+ if (aligned) {
+ value = *(uint16_t *)src;
+ } else {
+ value = *(uint8_t *)src | (*(uint8_t *)(src + 1) << 8);
+ }
+ EEPROM_WriteDataWord((uintptr_t)((uint16_t *)dest), value);
+ dest += 2;
+ src += 2;
+ len -= 2;
+ }
+
+ if (len) {
+ EEPROM_WriteDataByte((uintptr_t)dest, *src);
+ }
+}
diff --git a/keyboards/hfdkb/k61/Makefile b/keyboards/hfdkb/k61/Makefile
new file mode 100644
index 000000000000..57b2ef62e5f3
--- /dev/null
+++ b/keyboards/hfdkb/k61/Makefile
@@ -0,0 +1,3 @@
+ifndef MAKEFILE_INCLUDED
+ include ../../Makefile
+endif
diff --git a/keyboards/hfdkb/k61/config.h b/keyboards/hfdkb/k61/config.h
new file mode 100644
index 000000000000..fd4ceefbd873
--- /dev/null
+++ b/keyboards/hfdkb/k61/config.h
@@ -0,0 +1,116 @@
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x0c45
+#define PRODUCT_ID 0x8006
+#define DEVICE_VER 0x0100
+#define MANUFACTURER qmkbuilder
+#define PRODUCT keyboard
+#define DESCRIPTION Keyboard
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 14
+
+/* key matrix pins */
+#define MATRIX_ROW_PINS { C6, C7, C8, F9, A8 }
+#define MATRIX_COL_PINS { C1, C2, C3, A0, A1, A2, A3, A4, A5, A6, A7, B0, B1, B2 }
+#define UNUSED_PINS
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION ROW2COL
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCING_DELAY 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
+
+/* key combination for command */
+#define IS_COMMAND() ( \
+ keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
+)
+
+/* prevent stuck modifiers */
+#define PREVENT_STUCK_MODIFIERS
+
+// This is a 7-bit address, that gets left-shifted and bit 0
+// set to 0 for write, 1 for read (as per I2C protocol)
+// The address will vary depending on your wiring:
+// 00 <-> GND
+// 01 <-> SCL
+// 10 <-> SDA
+// 11 <-> VCC
+// ADDR1 represents A1:A0 of the 7-bit address.
+// ADDR2 represents A3:A2 of the 7-bit address.
+// The result is: 0b101(ADDR2)(ADDR1)
+#define DRIVER_ADDR_1 0b1110100
+
+#define DRIVER_COUNT 1
+#define DRIVER_1_LED_TOTAL 61
+#define DRIVER_2_LED_TOTAL 0
+#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
+
+/* Allow VIA to edit lighting */
+#ifdef VIA_ENABLE
+#define VIA_QMK_RGBLIGHT_ENABLE
+#endif
+
+#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
+
+// RGB Matrix Animation modes. Explicitly enabled
+// For full list of effects, see:
+// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
+// #define ENABLE_RGB_MATRIX_ALPHAS_MODS
+// #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
+// #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
+#define ENABLE_RGB_MATRIX_BREATHING
+// #define ENABLE_RGB_MATRIX_BAND_SAT
+// #define ENABLE_RGB_MATRIX_BAND_VAL
+// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
+// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
+// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
+// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
+#define ENABLE_RGB_MATRIX_CYCLE_ALL
+#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
+#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
+#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
+#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
+#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
+#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
+#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
+#define ENABLE_RGB_MATRIX_DUAL_BEACON
+#define ENABLE_RGB_MATRIX_RAINBOW_BEACON
+// #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
+#define ENABLE_RGB_MATRIX_RAINDROPS
+// #define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
+// #define ENABLE_RGB_MATRIX_HUE_BREATHING
+// #define ENABLE_RGB_MATRIX_HUE_PENDULUM
+// #define ENABLE_RGB_MATRIX_HUE_WAVE
+// #define ENABLE_RGB_MATRIX_PIXEL_RAIN
+// #define ENABLE_RGB_MATRIX_PIXEL_FLOW
+// #define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
+// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined
+#define ENABLE_RGB_MATRIX_TYPING_HEATMAP
+#define ENABLE_RGB_MATRIX_DIGITAL_RAIN
+// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined
+#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
+#define ENABLE_RGB_MATRIX_SOLID_REACTIVE
+#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
+#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
+#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
+#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
+#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
+#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
+#define ENABLE_RGB_MATRIX_SPLASH
+#define ENABLE_RGB_MATRIX_MULTISPLASH
+#define ENABLE_RGB_MATRIX_SOLID_SPLASH
+#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
+
+#endif
diff --git a/keyboards/hfdkb/k61/k61.c b/keyboards/hfdkb/k61/k61.c
new file mode 100644
index 000000000000..f3448851ae84
--- /dev/null
+++ b/keyboards/hfdkb/k61/k61.c
@@ -0,0 +1,104 @@
+#include "k61.h"
+
+#ifdef RGB_MATRIX_ENABLE
+const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = {
+/* Refer to IS31 manual for these locations
+ * driver
+ * | R location
+ * | | G location
+ * | | | B location
+ * | | | | */
+ {0, A_1, B_1, C_1},
+ {0, A_2, B_2, C_2},
+ {0, A_3, B_3, C_3},
+ {0, A_4, B_4, C_4},
+ {0, A_5, B_5, C_5},
+ {0, A_6, B_6, C_6},
+ {0, A_7, B_7, C_7},
+ {0, A_8, B_8, C_8},
+ {0, A_9, B_9, C_9},
+ {0, A_10, B_10, C_10},
+ {0, A_11, B_11, C_11},
+ {0, A_12, B_12, C_12},
+ {0, A_13, B_13, C_13},
+ {0, A_14, B_14, C_14},
+// {0, A_15, B_15, C_15},
+ // {0, A_16, B_16, C_16},
+
+ {0, D_1, E_1, F_1},
+ {0, D_2, E_2, F_2},
+ {0, D_3, E_3, F_3},
+ {0, D_4, E_4, F_4},
+ {0, D_5, E_5, F_5},
+ {0, D_6, E_6, F_6},
+ {0, D_7, E_7, F_7},
+ {0, D_8, E_8, F_8},
+ {0, D_9, E_9, F_9},
+ {0, D_10, E_10, F_10},
+ {0, D_11, E_11, F_11},
+ {0, D_12, E_12, F_12},
+ {0, D_13, E_13, F_13},
+ {0, D_14, E_14, F_14},
+ {0, D_15, E_15, F_15},
+ // {0, D_16, E_16, F_16},
+
+ {0, G_1, H_1, I_1},
+ {0, G_2, H_2, I_2},
+ {0, G_3, H_3, I_3},
+ {0, G_4, H_4, I_4},
+ {0, G_5, H_5, I_5},
+ {0, G_6, H_6, I_6},
+ {0, G_7, H_7, I_7},
+ {0, G_8, H_8, I_8},
+ {0, G_9, H_9, I_9},
+ {0, G_10, H_10, I_10},
+ {0, G_11, H_11, I_11},
+ {0, G_12, H_12, I_12},
+ {0, G_13, H_13, I_13},
+ {0, G_14, H_14, I_14},
+ {0, G_15, H_15, I_15},
+ {0, G_16, H_16, I_16},
+
+ {0, J_1, K_1, L_1},
+ {0, J_2, K_2, L_2},
+ {0, J_3, K_3, L_3},
+ {0, J_4, K_4, L_4},
+ {0, J_5, K_5, L_5},
+ {0, J_6, K_6, L_6},
+ {0, J_7, K_7, L_7},
+ {0, J_8, K_8, L_8},
+ {0, J_9, K_9, L_9},
+ {0, J_10, K_10, L_10},
+ {0, J_11, K_11, L_11},
+ {0, J_12, K_12, L_12},
+ {0, J_13, K_13, L_13},
+ {0, J_14, K_14, L_14},
+ {0, J_15, K_15, L_15},
+ {0, J_16, K_16, L_16},
+};
+
+led_config_t g_led_config = {
+ {
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, },
+ { 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, },
+ { 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, NO_LED, 41, },
+ { 45, NO_LED, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, NO_LED, 56, },
+ { 57, 58, 59, NO_LED, NO_LED, NO_LED, 60, NO_LED, NO_LED, NO_LED, 42, 43, 44, 28, }
+ },
+ {
+ { 0, 0}, { 17, 0}, { 34, 0}, { 51, 0}, { 68, 0}, {86, 0}, {103, 0}, {120, 0}, {137, 0}, {155, 0}, {172, 0}, {189, 0}, {206, 0}, {224, 0},
+ { 0, 16},{ 17, 16},{ 34, 16},{ 51, 16},{ 68, 16},{ 86, 16},{103, 16},{120, 16},{137, 16},{155, 16},{172, 16},{189, 16},{ 206, 16},{ 224, 16},
+ { 0, 32},{ 17, 32},{ 34, 32},{ 51, 32},{ 68, 32},{ 86, 32},{103, 32},{120, 32},{137, 32},{155, 32},{172, 32},{189, 32}, { 224, 32},
+ { 0, 48}, { 34, 48},{ 51, 48},{ 68, 48},{ 86, 48},{103, 48},{120, 48},{137, 48},{155, 48},{172, 48},{189, 48}, { 224, 48},
+ { 0, 64},{ 17, 64},{ 34, 64}, {103, 64}, {172, 64},{189, 64},{206, 64}, { 224, 64},
+ },
+ {
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4
+ }
+};
+
+#endif
diff --git a/keyboards/hfdkb/k61/k61.h b/keyboards/hfdkb/k61/k61.h
new file mode 100644
index 000000000000..560c89afe8e3
--- /dev/null
+++ b/keyboards/hfdkb/k61/k61.h
@@ -0,0 +1,20 @@
+#ifndef K61_H
+#define K61_H
+
+#include "quantum.h"
+
+#define LAYOUT( \
+ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \
+ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \
+ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, \
+ K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \
+ K400, K401, K402, K406, K410, K411, K412, K413 \
+) { \
+ { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \
+ { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113 }, \
+ { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, KC_NO, K213 }, \
+ { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313 }, \
+ { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413 } \
+}
+
+#endif
\ No newline at end of file
diff --git a/keyboards/hfdkb/k61/k61.json b/keyboards/hfdkb/k61/k61.json
new file mode 100644
index 000000000000..ebc8949047ab
--- /dev/null
+++ b/keyboards/hfdkb/k61/k61.json
@@ -0,0 +1,127 @@
+{
+ "name": "hfdk61",
+ "vendorId": "0x0c45",
+ "productId": "0x8006",
+ "lighting": "none",
+ "matrix": { "rows": 5, "cols": 14 },
+ "layouts": {
+ "keymap": [
+ [
+ "0,0",
+ "0,1",
+ "0,2",
+ "0,3",
+ "0,4",
+ "0,5",
+ "0,6",
+ "0,7",
+ "0,8",
+ "0,9",
+ "0,10",
+ "0,11",
+ "0,12",
+ {
+ "w": 2
+ },
+ "0,13"
+ ],
+ [
+ {
+ "w": 1.5
+ },
+ "1,0",
+ "1,1",
+ "1,2",
+ "1,3",
+ "1,4",
+ "1,5",
+ "1,6",
+ "1,7",
+ "1,8",
+ "1,9",
+ "1,10",
+ "1,11",
+ "1,12",
+ {
+ "w": 1.5
+ },
+ "1,13"
+ ],
+ [
+ {
+ "w": 1.75
+ },
+ "2,0",
+ "2,1",
+ "2,2",
+ "2,3",
+ "2,4",
+ "2,5",
+ "2,6",
+ "2,7",
+ "2,8",
+ "2,9",
+ "2,10",
+ "2,11",
+ {
+ "w": 2.25
+ },
+ "2,13"
+ ],
+ [
+ {
+ "w": 2.25
+ },
+ "3,0",
+ "3,2",
+ "3,3",
+ "3,4",
+ "3,5",
+ "3,6",
+ "3,7",
+ "3,8",
+ "3,9",
+ "3,10",
+ "3,11",
+ {
+ "w": 2.75
+ },
+ "3,13"
+ ],
+ [
+ {
+ "w": 1.25
+ },
+ "4,0",
+ {
+ "w": 1.25
+ },
+ "4,1",
+ {
+ "w": 1.25
+ },
+ "4,2",
+ {
+ "w": 6.25
+ },
+ "4,6",
+ {
+ "w": 1.25
+ },
+ "4,10",
+ {
+ "w": 1.25
+ },
+ "4,11",
+ {
+ "w": 1.25
+ },
+ "4,12",
+ {
+ "w": 1.25
+ },
+ "4,13"
+ ]
+ ]
+ }
+ }
diff --git a/keyboards/hfdkb/k61/keymaps/default/keymap.c b/keyboards/hfdkb/k61/keymaps/default/keymap.c
new file mode 100644
index 000000000000..6afbdd685fc9
--- /dev/null
+++ b/keyboards/hfdkb/k61/keymaps/default/keymap.c
@@ -0,0 +1,78 @@
+#include "k61.h"
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ 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_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_BSLS,
+ KC_CAPS, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, KC_APP, KC_RCTL, MO(1)),
+
+ LAYOUT(
+ KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, RGB_MODE_FORWARD, RGB_MODE_REVERSE, KC_BSPC,
+ 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_TRNS,
+ KC_CAPS, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
+ KC_LCTL, MAGIC_TOGGLE_GUI, KC_LALT, KC_SPC, KC_RALT, KC_APP, KC_RCTL, KC_TRNS)
+
+};
+
+void matrix_init_user(void) {
+}
+
+void matrix_scan_user(void) {
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ return true;
+}
+
+void led_set_user(uint8_t usb_led) {
+
+ if (usb_led & (1 << USB_LED_NUM_LOCK)) {
+
+ } else {
+
+ }
+
+ if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
+
+ } else {
+
+ }
+
+ if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
+
+ } else {
+
+ }
+
+ if (usb_led & (1 << USB_LED_COMPOSE)) {
+
+ } else {
+
+ }
+
+ if (usb_led & (1 << USB_LED_KANA)) {
+
+ } else {
+
+ }
+
+}
+
+#ifdef RGB_MATRIX_ENABLE
+void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
+ // caps lock cyan
+ if (host_keyboard_led_state().caps_lock) {
+ RGB_MATRIX_INDICATOR_SET_COLOR(29, 255, 255, 255);
+ }
+
+ if(keymap_config.no_gui)
+ {
+ RGB_MATRIX_INDICATOR_SET_COLOR(58, 255, 255, 255);
+ }
+
+}
+#endif
diff --git a/keyboards/hfdkb/k61/keymaps/via/keymap.c b/keyboards/hfdkb/k61/keymaps/via/keymap.c
new file mode 100644
index 000000000000..fd31715f36b2
--- /dev/null
+++ b/keyboards/hfdkb/k61/keymaps/via/keymap.c
@@ -0,0 +1,63 @@
+#include "k61.h"
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ 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_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_BSLS,
+ KC_CAPS, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, KC_APP, KC_RCTL, MO(1)),
+
+ LAYOUT(
+ KC_TILD, 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_BSPC,
+ 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_TRNS,
+ KC_CAPS, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_APP, KC_RCTL, KC_TRNS)
+
+};
+
+void matrix_init_user(void) {
+}
+
+void matrix_scan_user(void) {
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ return true;
+}
+
+void led_set_user(uint8_t usb_led) {
+
+ if (usb_led & (1 << USB_LED_NUM_LOCK)) {
+
+ } else {
+
+ }
+
+ if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
+
+ } else {
+
+ }
+
+ if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
+
+ } else {
+
+ }
+
+ if (usb_led & (1 << USB_LED_COMPOSE)) {
+
+ } else {
+
+ }
+
+ if (usb_led & (1 << USB_LED_KANA)) {
+
+ } else {
+
+ }
+
+}
\ No newline at end of file
diff --git a/keyboards/hfdkb/k61/keymaps/via/rules.mk b/keyboards/hfdkb/k61/keymaps/via/rules.mk
new file mode 100644
index 000000000000..1e5b99807cb7
--- /dev/null
+++ b/keyboards/hfdkb/k61/keymaps/via/rules.mk
@@ -0,0 +1 @@
+VIA_ENABLE = yes
diff --git a/keyboards/hfdkb/k61/rules.mk b/keyboards/hfdkb/k61/rules.mk
new file mode 100644
index 000000000000..94cddc2d3643
--- /dev/null
+++ b/keyboards/hfdkb/k61/rules.mk
@@ -0,0 +1,60 @@
+# MCU name
+MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+
+# Build Options
+# comment out to disable the options.
+#
+BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
+CONSOLE_ENABLE ?= no # Console for debug(+400)
+COMMAND_ENABLE ?= no # Commands for debug and configuration
+SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
+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 ?= no # Enable keyboard backlight functionality
+AUDIO_ENABLE ?= no
+RGBLIGHT_ENABLE ?= no
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = IS31FL3733
+
From 49492529cba32620c56316a7771b6ba31e9632d6 Mon Sep 17 00:00:00 2001
From: "jonylee@hfd" <108282809+jonylee1986@users.noreply.github.com>
Date: Mon, 8 Aug 2022 22:50:26 +0800
Subject: [PATCH 08/79] Delete keyboards/hfdkb/k61 directory
---
keyboards/hfdkb/k61/Makefile | 3 -
keyboards/hfdkb/k61/config.h | 116 -----------------
keyboards/hfdkb/k61/k61.c | 104 ---------------
keyboards/hfdkb/k61/k61.h | 20 ---
keyboards/hfdkb/k61/k61.json | 127 -------------------
keyboards/hfdkb/k61/keymaps/default/keymap.c | 78 ------------
keyboards/hfdkb/k61/keymaps/via/keymap.c | 63 ---------
keyboards/hfdkb/k61/keymaps/via/rules.mk | 1 -
keyboards/hfdkb/k61/rules.mk | 60 ---------
9 files changed, 572 deletions(-)
delete mode 100644 keyboards/hfdkb/k61/Makefile
delete mode 100644 keyboards/hfdkb/k61/config.h
delete mode 100644 keyboards/hfdkb/k61/k61.c
delete mode 100644 keyboards/hfdkb/k61/k61.h
delete mode 100644 keyboards/hfdkb/k61/k61.json
delete mode 100644 keyboards/hfdkb/k61/keymaps/default/keymap.c
delete mode 100644 keyboards/hfdkb/k61/keymaps/via/keymap.c
delete mode 100644 keyboards/hfdkb/k61/keymaps/via/rules.mk
delete mode 100644 keyboards/hfdkb/k61/rules.mk
diff --git a/keyboards/hfdkb/k61/Makefile b/keyboards/hfdkb/k61/Makefile
deleted file mode 100644
index 57b2ef62e5f3..000000000000
--- a/keyboards/hfdkb/k61/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-ifndef MAKEFILE_INCLUDED
- include ../../Makefile
-endif
diff --git a/keyboards/hfdkb/k61/config.h b/keyboards/hfdkb/k61/config.h
deleted file mode 100644
index fd4ceefbd873..000000000000
--- a/keyboards/hfdkb/k61/config.h
+++ /dev/null
@@ -1,116 +0,0 @@
-#ifndef CONFIG_H
-#define CONFIG_H
-
-#include "config_common.h"
-
-/* USB Device descriptor parameter */
-#define VENDOR_ID 0x0c45
-#define PRODUCT_ID 0x8006
-#define DEVICE_VER 0x0100
-#define MANUFACTURER qmkbuilder
-#define PRODUCT keyboard
-#define DESCRIPTION Keyboard
-
-/* key matrix size */
-#define MATRIX_ROWS 5
-#define MATRIX_COLS 14
-
-/* key matrix pins */
-#define MATRIX_ROW_PINS { C6, C7, C8, F9, A8 }
-#define MATRIX_COL_PINS { C1, C2, C3, A0, A1, A2, A3, A4, A5, A6, A7, B0, B1, B2 }
-#define UNUSED_PINS
-
-/* COL2ROW or ROW2COL */
-#define DIODE_DIRECTION ROW2COL
-
-/* Set 0 if debouncing isn't needed */
-#define DEBOUNCING_DELAY 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
-
-/* key combination for command */
-#define IS_COMMAND() ( \
- keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
-)
-
-/* prevent stuck modifiers */
-#define PREVENT_STUCK_MODIFIERS
-
-// This is a 7-bit address, that gets left-shifted and bit 0
-// set to 0 for write, 1 for read (as per I2C protocol)
-// The address will vary depending on your wiring:
-// 00 <-> GND
-// 01 <-> SCL
-// 10 <-> SDA
-// 11 <-> VCC
-// ADDR1 represents A1:A0 of the 7-bit address.
-// ADDR2 represents A3:A2 of the 7-bit address.
-// The result is: 0b101(ADDR2)(ADDR1)
-#define DRIVER_ADDR_1 0b1110100
-
-#define DRIVER_COUNT 1
-#define DRIVER_1_LED_TOTAL 61
-#define DRIVER_2_LED_TOTAL 0
-#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
-
-/* Allow VIA to edit lighting */
-#ifdef VIA_ENABLE
-#define VIA_QMK_RGBLIGHT_ENABLE
-#endif
-
-#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
-
-// RGB Matrix Animation modes. Explicitly enabled
-// For full list of effects, see:
-// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
-// #define ENABLE_RGB_MATRIX_ALPHAS_MODS
-// #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
-// #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
-#define ENABLE_RGB_MATRIX_BREATHING
-// #define ENABLE_RGB_MATRIX_BAND_SAT
-// #define ENABLE_RGB_MATRIX_BAND_VAL
-// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
-// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
-// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
-// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
-#define ENABLE_RGB_MATRIX_CYCLE_ALL
-#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
-#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
-#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
-#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
-#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
-#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
-#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
-#define ENABLE_RGB_MATRIX_DUAL_BEACON
-#define ENABLE_RGB_MATRIX_RAINBOW_BEACON
-// #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
-#define ENABLE_RGB_MATRIX_RAINDROPS
-// #define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
-// #define ENABLE_RGB_MATRIX_HUE_BREATHING
-// #define ENABLE_RGB_MATRIX_HUE_PENDULUM
-// #define ENABLE_RGB_MATRIX_HUE_WAVE
-// #define ENABLE_RGB_MATRIX_PIXEL_RAIN
-// #define ENABLE_RGB_MATRIX_PIXEL_FLOW
-// #define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
-// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined
-#define ENABLE_RGB_MATRIX_TYPING_HEATMAP
-#define ENABLE_RGB_MATRIX_DIGITAL_RAIN
-// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
-#define ENABLE_RGB_MATRIX_SPLASH
-#define ENABLE_RGB_MATRIX_MULTISPLASH
-#define ENABLE_RGB_MATRIX_SOLID_SPLASH
-#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
-
-#endif
diff --git a/keyboards/hfdkb/k61/k61.c b/keyboards/hfdkb/k61/k61.c
deleted file mode 100644
index f3448851ae84..000000000000
--- a/keyboards/hfdkb/k61/k61.c
+++ /dev/null
@@ -1,104 +0,0 @@
-#include "k61.h"
-
-#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = {
-/* Refer to IS31 manual for these locations
- * driver
- * | R location
- * | | G location
- * | | | B location
- * | | | | */
- {0, A_1, B_1, C_1},
- {0, A_2, B_2, C_2},
- {0, A_3, B_3, C_3},
- {0, A_4, B_4, C_4},
- {0, A_5, B_5, C_5},
- {0, A_6, B_6, C_6},
- {0, A_7, B_7, C_7},
- {0, A_8, B_8, C_8},
- {0, A_9, B_9, C_9},
- {0, A_10, B_10, C_10},
- {0, A_11, B_11, C_11},
- {0, A_12, B_12, C_12},
- {0, A_13, B_13, C_13},
- {0, A_14, B_14, C_14},
-// {0, A_15, B_15, C_15},
- // {0, A_16, B_16, C_16},
-
- {0, D_1, E_1, F_1},
- {0, D_2, E_2, F_2},
- {0, D_3, E_3, F_3},
- {0, D_4, E_4, F_4},
- {0, D_5, E_5, F_5},
- {0, D_6, E_6, F_6},
- {0, D_7, E_7, F_7},
- {0, D_8, E_8, F_8},
- {0, D_9, E_9, F_9},
- {0, D_10, E_10, F_10},
- {0, D_11, E_11, F_11},
- {0, D_12, E_12, F_12},
- {0, D_13, E_13, F_13},
- {0, D_14, E_14, F_14},
- {0, D_15, E_15, F_15},
- // {0, D_16, E_16, F_16},
-
- {0, G_1, H_1, I_1},
- {0, G_2, H_2, I_2},
- {0, G_3, H_3, I_3},
- {0, G_4, H_4, I_4},
- {0, G_5, H_5, I_5},
- {0, G_6, H_6, I_6},
- {0, G_7, H_7, I_7},
- {0, G_8, H_8, I_8},
- {0, G_9, H_9, I_9},
- {0, G_10, H_10, I_10},
- {0, G_11, H_11, I_11},
- {0, G_12, H_12, I_12},
- {0, G_13, H_13, I_13},
- {0, G_14, H_14, I_14},
- {0, G_15, H_15, I_15},
- {0, G_16, H_16, I_16},
-
- {0, J_1, K_1, L_1},
- {0, J_2, K_2, L_2},
- {0, J_3, K_3, L_3},
- {0, J_4, K_4, L_4},
- {0, J_5, K_5, L_5},
- {0, J_6, K_6, L_6},
- {0, J_7, K_7, L_7},
- {0, J_8, K_8, L_8},
- {0, J_9, K_9, L_9},
- {0, J_10, K_10, L_10},
- {0, J_11, K_11, L_11},
- {0, J_12, K_12, L_12},
- {0, J_13, K_13, L_13},
- {0, J_14, K_14, L_14},
- {0, J_15, K_15, L_15},
- {0, J_16, K_16, L_16},
-};
-
-led_config_t g_led_config = {
- {
- { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, },
- { 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, },
- { 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, NO_LED, 41, },
- { 45, NO_LED, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, NO_LED, 56, },
- { 57, 58, 59, NO_LED, NO_LED, NO_LED, 60, NO_LED, NO_LED, NO_LED, 42, 43, 44, 28, }
- },
- {
- { 0, 0}, { 17, 0}, { 34, 0}, { 51, 0}, { 68, 0}, {86, 0}, {103, 0}, {120, 0}, {137, 0}, {155, 0}, {172, 0}, {189, 0}, {206, 0}, {224, 0},
- { 0, 16},{ 17, 16},{ 34, 16},{ 51, 16},{ 68, 16},{ 86, 16},{103, 16},{120, 16},{137, 16},{155, 16},{172, 16},{189, 16},{ 206, 16},{ 224, 16},
- { 0, 32},{ 17, 32},{ 34, 32},{ 51, 32},{ 68, 32},{ 86, 32},{103, 32},{120, 32},{137, 32},{155, 32},{172, 32},{189, 32}, { 224, 32},
- { 0, 48}, { 34, 48},{ 51, 48},{ 68, 48},{ 86, 48},{103, 48},{120, 48},{137, 48},{155, 48},{172, 48},{189, 48}, { 224, 48},
- { 0, 64},{ 17, 64},{ 34, 64}, {103, 64}, {172, 64},{189, 64},{206, 64}, { 224, 64},
- },
- {
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4
- }
-};
-
-#endif
diff --git a/keyboards/hfdkb/k61/k61.h b/keyboards/hfdkb/k61/k61.h
deleted file mode 100644
index 560c89afe8e3..000000000000
--- a/keyboards/hfdkb/k61/k61.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef K61_H
-#define K61_H
-
-#include "quantum.h"
-
-#define LAYOUT( \
- K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \
- K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \
- K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, \
- K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \
- K400, K401, K402, K406, K410, K411, K412, K413 \
-) { \
- { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \
- { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113 }, \
- { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, KC_NO, K213 }, \
- { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313 }, \
- { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413 } \
-}
-
-#endif
\ No newline at end of file
diff --git a/keyboards/hfdkb/k61/k61.json b/keyboards/hfdkb/k61/k61.json
deleted file mode 100644
index ebc8949047ab..000000000000
--- a/keyboards/hfdkb/k61/k61.json
+++ /dev/null
@@ -1,127 +0,0 @@
-{
- "name": "hfdk61",
- "vendorId": "0x0c45",
- "productId": "0x8006",
- "lighting": "none",
- "matrix": { "rows": 5, "cols": 14 },
- "layouts": {
- "keymap": [
- [
- "0,0",
- "0,1",
- "0,2",
- "0,3",
- "0,4",
- "0,5",
- "0,6",
- "0,7",
- "0,8",
- "0,9",
- "0,10",
- "0,11",
- "0,12",
- {
- "w": 2
- },
- "0,13"
- ],
- [
- {
- "w": 1.5
- },
- "1,0",
- "1,1",
- "1,2",
- "1,3",
- "1,4",
- "1,5",
- "1,6",
- "1,7",
- "1,8",
- "1,9",
- "1,10",
- "1,11",
- "1,12",
- {
- "w": 1.5
- },
- "1,13"
- ],
- [
- {
- "w": 1.75
- },
- "2,0",
- "2,1",
- "2,2",
- "2,3",
- "2,4",
- "2,5",
- "2,6",
- "2,7",
- "2,8",
- "2,9",
- "2,10",
- "2,11",
- {
- "w": 2.25
- },
- "2,13"
- ],
- [
- {
- "w": 2.25
- },
- "3,0",
- "3,2",
- "3,3",
- "3,4",
- "3,5",
- "3,6",
- "3,7",
- "3,8",
- "3,9",
- "3,10",
- "3,11",
- {
- "w": 2.75
- },
- "3,13"
- ],
- [
- {
- "w": 1.25
- },
- "4,0",
- {
- "w": 1.25
- },
- "4,1",
- {
- "w": 1.25
- },
- "4,2",
- {
- "w": 6.25
- },
- "4,6",
- {
- "w": 1.25
- },
- "4,10",
- {
- "w": 1.25
- },
- "4,11",
- {
- "w": 1.25
- },
- "4,12",
- {
- "w": 1.25
- },
- "4,13"
- ]
- ]
- }
- }
diff --git a/keyboards/hfdkb/k61/keymaps/default/keymap.c b/keyboards/hfdkb/k61/keymaps/default/keymap.c
deleted file mode 100644
index 6afbdd685fc9..000000000000
--- a/keyboards/hfdkb/k61/keymaps/default/keymap.c
+++ /dev/null
@@ -1,78 +0,0 @@
-#include "k61.h"
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
- 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_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_BSLS,
- KC_CAPS, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT,
- KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, KC_APP, KC_RCTL, MO(1)),
-
- LAYOUT(
- KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, RGB_MODE_FORWARD, RGB_MODE_REVERSE, KC_BSPC,
- 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_TRNS,
- KC_CAPS, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
- KC_LCTL, MAGIC_TOGGLE_GUI, KC_LALT, KC_SPC, KC_RALT, KC_APP, KC_RCTL, KC_TRNS)
-
-};
-
-void matrix_init_user(void) {
-}
-
-void matrix_scan_user(void) {
-}
-
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- return true;
-}
-
-void led_set_user(uint8_t usb_led) {
-
- if (usb_led & (1 << USB_LED_NUM_LOCK)) {
-
- } else {
-
- }
-
- if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
-
- } else {
-
- }
-
- if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
-
- } else {
-
- }
-
- if (usb_led & (1 << USB_LED_COMPOSE)) {
-
- } else {
-
- }
-
- if (usb_led & (1 << USB_LED_KANA)) {
-
- } else {
-
- }
-
-}
-
-#ifdef RGB_MATRIX_ENABLE
-void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
- // caps lock cyan
- if (host_keyboard_led_state().caps_lock) {
- RGB_MATRIX_INDICATOR_SET_COLOR(29, 255, 255, 255);
- }
-
- if(keymap_config.no_gui)
- {
- RGB_MATRIX_INDICATOR_SET_COLOR(58, 255, 255, 255);
- }
-
-}
-#endif
diff --git a/keyboards/hfdkb/k61/keymaps/via/keymap.c b/keyboards/hfdkb/k61/keymaps/via/keymap.c
deleted file mode 100644
index fd31715f36b2..000000000000
--- a/keyboards/hfdkb/k61/keymaps/via/keymap.c
+++ /dev/null
@@ -1,63 +0,0 @@
-#include "k61.h"
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
- 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_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_BSLS,
- KC_CAPS, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT,
- KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, KC_APP, KC_RCTL, MO(1)),
-
- LAYOUT(
- KC_TILD, 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_BSPC,
- 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_TRNS,
- KC_CAPS, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
- KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_APP, KC_RCTL, KC_TRNS)
-
-};
-
-void matrix_init_user(void) {
-}
-
-void matrix_scan_user(void) {
-}
-
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- return true;
-}
-
-void led_set_user(uint8_t usb_led) {
-
- if (usb_led & (1 << USB_LED_NUM_LOCK)) {
-
- } else {
-
- }
-
- if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
-
- } else {
-
- }
-
- if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
-
- } else {
-
- }
-
- if (usb_led & (1 << USB_LED_COMPOSE)) {
-
- } else {
-
- }
-
- if (usb_led & (1 << USB_LED_KANA)) {
-
- } else {
-
- }
-
-}
\ No newline at end of file
diff --git a/keyboards/hfdkb/k61/keymaps/via/rules.mk b/keyboards/hfdkb/k61/keymaps/via/rules.mk
deleted file mode 100644
index 1e5b99807cb7..000000000000
--- a/keyboards/hfdkb/k61/keymaps/via/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-VIA_ENABLE = yes
diff --git a/keyboards/hfdkb/k61/rules.mk b/keyboards/hfdkb/k61/rules.mk
deleted file mode 100644
index 94cddc2d3643..000000000000
--- a/keyboards/hfdkb/k61/rules.mk
+++ /dev/null
@@ -1,60 +0,0 @@
-# MCU name
-MCU = atmega32u4
-
-# Processor frequency.
-# This will define a symbol, F_CPU, in all source code files equal to the
-# processor frequency in Hz. You can then use this symbol in your source code to
-# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
-# automatically to create a 32-bit value in your source code.
-#
-# This will be an integer division of F_USB below, as it is sourced by
-# F_USB after it has run through any CPU prescalers. Note that this value
-# does not *change* the processor frequency - it should merely be updated to
-# reflect the processor speed set externally so that the code can use accurate
-# software delays.
-F_CPU = 16000000
-
-#
-# LUFA specific
-#
-# Target architecture (see library "Board Types" documentation).
-ARCH = AVR8
-
-# Input clock frequency.
-# This will define a symbol, F_USB, in all source code files equal to the
-# input clock frequency (before any prescaling is performed) in Hz. This value may
-# differ from F_CPU if prescaling is used on the latter, and is required as the
-# raw input clock is fed directly to the PLL sections of the AVR for high speed
-# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
-# at the end, this will be done automatically to create a 32-bit value in your
-# source code.
-#
-# If no clock division is performed on the input clock inside the AVR (via the
-# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
-F_USB = $(F_CPU)
-
-# Interrupt driven control endpoint task(+60)
-OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-
-# Boot Section Size in *bytes*
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
-
-
-# Build Options
-# comment out to disable the options.
-#
-BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000)
-MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
-EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
-CONSOLE_ENABLE ?= no # Console for debug(+400)
-COMMAND_ENABLE ?= no # Commands for debug and configuration
-SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
-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 ?= no # Enable keyboard backlight functionality
-AUDIO_ENABLE ?= no
-RGBLIGHT_ENABLE ?= no
-RGB_MATRIX_ENABLE = yes
-RGB_MATRIX_DRIVER = IS31FL3733
-
From 86e48a9c2f3b103bbb808328191b87f97138ef3f Mon Sep 17 00:00:00 2001
From: "jonylee@hfd" <108282809+jonylee1986@users.noreply.github.com>
Date: Mon, 8 Aug 2022 22:50:44 +0800
Subject: [PATCH 09/79] Delete kb
---
keyboards/hfdkb/kb | 1 -
1 file changed, 1 deletion(-)
delete mode 100644 keyboards/hfdkb/kb
diff --git a/keyboards/hfdkb/kb b/keyboards/hfdkb/kb
deleted file mode 100644
index 8b137891791f..000000000000
--- a/keyboards/hfdkb/kb
+++ /dev/null
@@ -1 +0,0 @@
-
From 28cf4116a750ce9c0e79ee4ef9bb7b6cfb6e1410 Mon Sep 17 00:00:00 2001
From: jonylee1986 <2532487686@qq.com>
Date: Wed, 10 Aug 2022 11:40:04 +0800
Subject: [PATCH 10/79] Added license header,removed ac001_via.json!
---
keyboards/hfdkb/ac001/ac001.c | 2 +-
keyboards/hfdkb/ac001/ac001.h | 2 +-
keyboards/hfdkb/ac001/halconf.h | 15 +++++++
.../hfdkb/ac001/keymaps/default/keymap.c | 2 +-
.../hfdkb/ac001/keymaps/via/ac001_via.json | 44 -------------------
keyboards/hfdkb/ac001/keymaps/via/config.h | 2 +-
keyboards/hfdkb/ac001/keymaps/via/keymap.c | 2 +-
keyboards/hfdkb/ac001/mcuconf.h | 15 +++++++
keyboards/hfdkb/ac001/src/eeprom_flash.c | 2 +-
9 files changed, 36 insertions(+), 50 deletions(-)
delete mode 100644 keyboards/hfdkb/ac001/keymaps/via/ac001_via.json
diff --git a/keyboards/hfdkb/ac001/ac001.c b/keyboards/hfdkb/ac001/ac001.c
index 7edeab93fb3c..a977f9c80da0 100644
--- a/keyboards/hfdkb/ac001/ac001.c
+++ b/keyboards/hfdkb/ac001/ac001.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2022 Westberry Technology (ChangZhou) Corp., Ltd
+/* Copyright (C) 2022 jonylee@hfd
*
* 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
diff --git a/keyboards/hfdkb/ac001/ac001.h b/keyboards/hfdkb/ac001/ac001.h
index 9c901b623d0e..870c23132198 100644
--- a/keyboards/hfdkb/ac001/ac001.h
+++ b/keyboards/hfdkb/ac001/ac001.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2022 Westberry Technology (ChangZhou) Corp., Ltd
+/* Copyright (C) 2022 jonylee@hfd
*
* 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
diff --git a/keyboards/hfdkb/ac001/halconf.h b/keyboards/hfdkb/ac001/halconf.h
index aef989fe0d51..5179ebf43ab8 100644
--- a/keyboards/hfdkb/ac001/halconf.h
+++ b/keyboards/hfdkb/ac001/halconf.h
@@ -1,3 +1,18 @@
+/* Copyright (C) 2022 Westberry Technology (ChangZhou) Corp., Ltd
+ *
+ * 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 .
+ */
#pragma once
#define HAL_USE_I2C TRUE
diff --git a/keyboards/hfdkb/ac001/keymaps/default/keymap.c b/keyboards/hfdkb/ac001/keymaps/default/keymap.c
index e98b83551ba3..72b9720d5cd9 100644
--- a/keyboards/hfdkb/ac001/keymaps/default/keymap.c
+++ b/keyboards/hfdkb/ac001/keymaps/default/keymap.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2022 Westberry Technology (ChangZhou) Corp., Ltd
+/* Copyright (C) 2022 jonylee@hfd
*
* 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
diff --git a/keyboards/hfdkb/ac001/keymaps/via/ac001_via.json b/keyboards/hfdkb/ac001/keymaps/via/ac001_via.json
deleted file mode 100644
index 5bb4640d0911..000000000000
--- a/keyboards/hfdkb/ac001/keymaps/via/ac001_via.json
+++ /dev/null
@@ -1,44 +0,0 @@
-{
- "name": "ac001",
- "vendorId": "0x3528",
- "productId": "0x2330",
- "lighting": {
- "extends": "qmk_rgblight",
- "underglowEffects": [
- ["None", 0],
- ["SOLID_COLOR", 1],
- ["BREATHING", 1],
- ["CYCLE_ALL", 1],
- ["CYCLE_LEFT_RIGHT", 1],
- ["RAINBOW_MOVING_CHEVRON", 1],
- ["MATRIX_MULTISPLASH", 1]
- ]
- },
- "matrix": { "rows": 1, "cols": 5 },
- "layouts": {
- "keymap": [
- [
- {
- "x": 1.25,
- "c": "#777777",
- "w": 4,
- "h": 4
- },
- "0,2"
- ],
- [
- {
- "y": 0.75,
- "c": "#aaaaaa"
- },
- "0,1"
- ],
- [
- {
- "y": 0.25
- },
- "0,0"
- ]
- ]
- }
- }
diff --git a/keyboards/hfdkb/ac001/keymaps/via/config.h b/keyboards/hfdkb/ac001/keymaps/via/config.h
index 8d8805624040..72f334e41c39 100644
--- a/keyboards/hfdkb/ac001/keymaps/via/config.h
+++ b/keyboards/hfdkb/ac001/keymaps/via/config.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2022 Westberry Technology (ChangZhou) Corp., Ltd
+/* Copyright (C) 2022 jonylee@hfd
*
* 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
diff --git a/keyboards/hfdkb/ac001/keymaps/via/keymap.c b/keyboards/hfdkb/ac001/keymaps/via/keymap.c
index e98b83551ba3..72b9720d5cd9 100644
--- a/keyboards/hfdkb/ac001/keymaps/via/keymap.c
+++ b/keyboards/hfdkb/ac001/keymaps/via/keymap.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2022 Westberry Technology (ChangZhou) Corp., Ltd
+/* Copyright (C) 2022 jonylee@hfd
*
* 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
diff --git a/keyboards/hfdkb/ac001/mcuconf.h b/keyboards/hfdkb/ac001/mcuconf.h
index ca52ddf7eefd..0d16f4f04e46 100644
--- a/keyboards/hfdkb/ac001/mcuconf.h
+++ b/keyboards/hfdkb/ac001/mcuconf.h
@@ -1,3 +1,18 @@
+/* Copyright (C) 2022 jonylee@hfd
+ *
+ * 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 .
+ */
#pragma once
#include_next
diff --git a/keyboards/hfdkb/ac001/src/eeprom_flash.c b/keyboards/hfdkb/ac001/src/eeprom_flash.c
index a458c0b0a532..0c35e08e5398 100644
--- a/keyboards/hfdkb/ac001/src/eeprom_flash.c
+++ b/keyboards/hfdkb/ac001/src/eeprom_flash.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2022 Westberry Technology (ChangZhou) Corp., Ltd
+/* Copyright (C) 2022 jonylee@hfd
*
* 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
From 307cf7ff7017fe25f9b7fe3844661775c8942507 Mon Sep 17 00:00:00 2001
From: jonylee1986 <2532487686@qq.com>
Date: Wed, 10 Aug 2022 19:05:49 +0800
Subject: [PATCH 11/79] move usb device information form config.h to info.json
---
keyboards/hfdkb/ac001/info.json | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/keyboards/hfdkb/ac001/info.json b/keyboards/hfdkb/ac001/info.json
index 80d491054040..57f87a1f67fa 100644
--- a/keyboards/hfdkb/ac001/info.json
+++ b/keyboards/hfdkb/ac001/info.json
@@ -1,7 +1,13 @@
{
"keyboard_name": "ac001",
+ "manufacturer": "hfd",
"url": "",
- "maintainer": "qmk",
+ "maintainer": "jonylee@hfd",
+ "usb": {
+ "vid": "0xFFFE",
+ "pid": "0x0001",
+ "device_version": "0.0.1"
+ },
"layouts": {
"LAYOUT": {
"layout": [
From e56a5d01677b48e9e1cfe07fe50e42b8d6d8eefd Mon Sep 17 00:00:00 2001
From: "jonylee@hfd" <108282809+jonylee1986@users.noreply.github.com>
Date: Sat, 13 Aug 2022 09:50:41 +0800
Subject: [PATCH 12/79] Update config.h
modify PID and VID!
---
keyboards/hfdkb/ac001/config.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/keyboards/hfdkb/ac001/config.h b/keyboards/hfdkb/ac001/config.h
index 9d035113767c..8d8a6f42b823 100644
--- a/keyboards/hfdkb/ac001/config.h
+++ b/keyboards/hfdkb/ac001/config.h
@@ -20,8 +20,8 @@
/* USB Device descriptor parameter */
#define DEVICE_VER 0x0100
-#define VENDOR_ID 0x3528
-#define PRODUCT_ID 0x2330
+#define VENDOR_ID 0xFFFE
+#define PRODUCT_ID 0x0001
#define MANUFACTURER hfd
#define PRODUCT ac001
From ebb9df691315587bae448122365deb0cb1d97726 Mon Sep 17 00:00:00 2001
From: "jonylee@hfd" <108282809+jonylee1986@users.noreply.github.com>
Date: Sat, 13 Aug 2022 10:53:36 +0800
Subject: [PATCH 13/79] Update config.h
removed USB Device descriptor parameter!
---
keyboards/hfdkb/ac001/config.h | 7 -------
1 file changed, 7 deletions(-)
diff --git a/keyboards/hfdkb/ac001/config.h b/keyboards/hfdkb/ac001/config.h
index 8d8a6f42b823..c13922c97fcb 100644
--- a/keyboards/hfdkb/ac001/config.h
+++ b/keyboards/hfdkb/ac001/config.h
@@ -18,13 +18,6 @@
#include "config_common.h"
-/* USB Device descriptor parameter */
-#define DEVICE_VER 0x0100
-#define VENDOR_ID 0xFFFE
-#define PRODUCT_ID 0x0001
-#define MANUFACTURER hfd
-#define PRODUCT ac001
-
/* Force NKRO on boot up regardless of the setting saved in the EEPROM (uncomment to enable it) */
#define FORCE_NKRO
From 47fab8f2b6ecb91615617561a66ac24acd40e364 Mon Sep 17 00:00:00 2001
From: jonylee1986 <2532487686@qq.com>
Date: Thu, 9 Feb 2023 10:19:52 +0800
Subject: [PATCH 14/79] add m1 and mk47 keyboard!
---
keyboards/hfdkb/keyboard_sw/mk47/config.h | 132 ++++++++
keyboards/hfdkb/keyboard_sw/mk47/halconf.h | 23 ++
keyboards/hfdkb/keyboard_sw/mk47/info.json | 68 +++++
.../keyboard_sw/mk47/keymaps/default/keymap.c | 65 ++++
.../keyboard_sw/mk47/keymaps/via/config.h | 21 ++
.../keyboard_sw/mk47/keymaps/via/keymap.c | 69 +++++
.../keyboard_sw/mk47/keymaps/via/rules.mk | 1 +
keyboards/hfdkb/keyboard_sw/mk47/matrix.c | 183 +++++++++++
keyboards/hfdkb/keyboard_sw/mk47/mcuconf.h | 24 ++
keyboards/hfdkb/keyboard_sw/mk47/mk47.c | 170 +++++++++++
keyboards/hfdkb/keyboard_sw/mk47/mk47.h | 35 +++
keyboards/hfdkb/keyboard_sw/mk47/rules.mk | 25 ++
keyboards/hfdkb/monsgeek/m1/config.h | 145 +++++++++
keyboards/hfdkb/monsgeek/m1/halconf.h | 23 ++
keyboards/hfdkb/monsgeek/m1/info.json | 106 +++++++
.../monsgeek/m1/keymaps/default/config.h | 21 ++
.../monsgeek/m1/keymaps/default/keymap.c | 139 +++++++++
.../hfdkb/monsgeek/m1/keymaps/via/config.h | 21 ++
.../hfdkb/monsgeek/m1/keymaps/via/keymap.c | 181 +++++++++++
.../hfdkb/monsgeek/m1/keymaps/via/rules.mk | 2 +
keyboards/hfdkb/monsgeek/m1/m1.c | 283 +++++++++++++++++
keyboards/hfdkb/monsgeek/m1/m1.h | 39 +++
keyboards/hfdkb/monsgeek/m1/matrix.c | 284 ++++++++++++++++++
keyboards/hfdkb/monsgeek/m1/mcuconf.h | 24 ++
.../hfdkb/monsgeek/m1/rgb_matrix_user.inc | 51 ++++
keyboards/hfdkb/monsgeek/m1/rules.mk | 28 ++
26 files changed, 2163 insertions(+)
create mode 100644 keyboards/hfdkb/keyboard_sw/mk47/config.h
create mode 100644 keyboards/hfdkb/keyboard_sw/mk47/halconf.h
create mode 100644 keyboards/hfdkb/keyboard_sw/mk47/info.json
create mode 100644 keyboards/hfdkb/keyboard_sw/mk47/keymaps/default/keymap.c
create mode 100644 keyboards/hfdkb/keyboard_sw/mk47/keymaps/via/config.h
create mode 100644 keyboards/hfdkb/keyboard_sw/mk47/keymaps/via/keymap.c
create mode 100644 keyboards/hfdkb/keyboard_sw/mk47/keymaps/via/rules.mk
create mode 100644 keyboards/hfdkb/keyboard_sw/mk47/matrix.c
create mode 100644 keyboards/hfdkb/keyboard_sw/mk47/mcuconf.h
create mode 100644 keyboards/hfdkb/keyboard_sw/mk47/mk47.c
create mode 100644 keyboards/hfdkb/keyboard_sw/mk47/mk47.h
create mode 100644 keyboards/hfdkb/keyboard_sw/mk47/rules.mk
create mode 100644 keyboards/hfdkb/monsgeek/m1/config.h
create mode 100644 keyboards/hfdkb/monsgeek/m1/halconf.h
create mode 100644 keyboards/hfdkb/monsgeek/m1/info.json
create mode 100644 keyboards/hfdkb/monsgeek/m1/keymaps/default/config.h
create mode 100644 keyboards/hfdkb/monsgeek/m1/keymaps/default/keymap.c
create mode 100644 keyboards/hfdkb/monsgeek/m1/keymaps/via/config.h
create mode 100644 keyboards/hfdkb/monsgeek/m1/keymaps/via/keymap.c
create mode 100644 keyboards/hfdkb/monsgeek/m1/keymaps/via/rules.mk
create mode 100644 keyboards/hfdkb/monsgeek/m1/m1.c
create mode 100644 keyboards/hfdkb/monsgeek/m1/m1.h
create mode 100644 keyboards/hfdkb/monsgeek/m1/matrix.c
create mode 100644 keyboards/hfdkb/monsgeek/m1/mcuconf.h
create mode 100644 keyboards/hfdkb/monsgeek/m1/rgb_matrix_user.inc
create mode 100644 keyboards/hfdkb/monsgeek/m1/rules.mk
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/config.h b/keyboards/hfdkb/keyboard_sw/mk47/config.h
new file mode 100644
index 000000000000..ad1df5c186ce
--- /dev/null
+++ b/keyboards/hfdkb/keyboard_sw/mk47/config.h
@@ -0,0 +1,132 @@
+/* Copyright (C) 2022 jonylee@hfd
+ *
+ * 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 .
+ */
+
+#pragma once
+
+#include "config_common.h"
+
+/* Force NKRO on boot up regardless of the setting saved in the EEPROM (uncomment to enable it) */
+ #define FORCE_NKRO
+
+/* key matrix size */
+#define MATRIX_ROWS 4
+#define MATRIX_COLS 12
+
+/* key matrix pins */
+#define MATRIX_ROW_PINS { C6, C7, C8, C9 }
+#define MATRIX_COL_PINS { C1, C2, C3, A0, A1, A2, A3, A4, A5, A6, A7, C4 }
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION ROW2COL
+
+/* Hold ESC on start up to clear EEPROM and boot into bootloader mode */
+#define BOOTMAGIC_LITE_ROW 0
+#define BOOTMAGIC_LITE_COLUMN 0
+
+#define TAP_CODE_DELAY 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
+
+/* SPI Config for spi flash*/
+#define SPI_DRIVER SPIDQ
+#define SPI_SCK_PIN B3
+#define SPI_MOSI_PIN B5
+#define SPI_MISO_PIN B4
+#define SPI_MOSI_PAL_MODE 5
+
+#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12
+#define WEAR_LEVELING_BACKING_SIZE (8 * 1024)
+
+/* I2C Config for LED Driver */
+#define DRIVER_COUNT 1
+#define DRIVER_ADDR_1 0b1110100
+#define I2C1_SDA_PIN B7
+#define I2C1_SCL_PIN B6
+#define I2C1_SCL_PAL_MODE 4
+#define I2C1_OPMODE OPMODE_I2C
+#define I2C1_CLOCK_SPEED 400000 /* 400000 */
+
+#define DRIVER_1_LED_TOTAL 47
+#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+#define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL
+
+#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
+#define RGB_MATRIX_CENTER {112,32}
+
+#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
+#define RGB_MATRIX_KEYPRESSES
+#define RGB_MATRIX_KEYRELEASES
+
+// RGB Matrix Animation modes. Explicitly enabled
+// For full list of effects, see:
+// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
+// #define ENABLE_RGB_MATRIX_ALPHAS_MODS
+// #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
+// #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
+#define ENABLE_RGB_MATRIX_BREATHING
+// #define ENABLE_RGB_MATRIX_BAND_SAT
+// #define ENABLE_RGB_MATRIX_BAND_VAL
+// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
+// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
+// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
+// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
+#define ENABLE_RGB_MATRIX_CYCLE_ALL
+#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
+#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
+#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
+#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
+#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
+#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
+#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
+#define ENABLE_RGB_MATRIX_DUAL_BEACON
+#define ENABLE_RGB_MATRIX_RAINBOW_BEACON
+// #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
+#define ENABLE_RGB_MATRIX_RAINDROPS
+// #define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
+// #define ENABLE_RGB_MATRIX_HUE_BREATHING
+// #define ENABLE_RGB_MATRIX_HUE_PENDULUM
+// #define ENABLE_RGB_MATRIX_HUE_WAVE
+// #define ENABLE_RGB_MATRIX_PIXEL_RAIN
+// #define ENABLE_RGB_MATRIX_PIXEL_FLOW
+// #define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
+// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined
+#define ENABLE_RGB_MATRIX_TYPING_HEATMAP
+//#define ENABLE_RGB_MATRIX_DIGITAL_RAIN
+// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined
+#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
+#define ENABLE_RGB_MATRIX_SOLID_REACTIVE
+//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
+//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
+//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
+//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
+//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
+//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
+//#define ENABLE_RGB_MATRIX_SPLASH
+#define ENABLE_RGB_MATRIX_MULTISPLASH
+//#define ENABLE_RGB_MATRIX_SOLID_SPLASH
+//#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
+
+#define RGB_MATRIX_HUE_STEP 25
+#define RGB_MATRIX_SAT_STEP 25
+#define RGB_MATRIX_VAL_STEP 50
+#define RGB_MATRIX_SPD_STEP 52
+#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 250 /* The maximum brightness level */
+
+/* Set debounce time to 1ms */
+#define DEBOUNCE 5
+
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/halconf.h b/keyboards/hfdkb/keyboard_sw/mk47/halconf.h
new file mode 100644
index 000000000000..2f64e65393a5
--- /dev/null
+++ b/keyboards/hfdkb/keyboard_sw/mk47/halconf.h
@@ -0,0 +1,23 @@
+/* Copyright (C) 2022 jonylee@hfd
+ *
+ * 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 .
+ */
+#pragma once
+
+#define HAL_USE_I2C TRUE
+#define HAL_USE_SPI TRUE
+#define SPI_USE_WAIT TRUE
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+
+#include_next
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/info.json b/keyboards/hfdkb/keyboard_sw/mk47/info.json
new file mode 100644
index 000000000000..1633779e6af1
--- /dev/null
+++ b/keyboards/hfdkb/keyboard_sw/mk47/info.json
@@ -0,0 +1,68 @@
+{
+ "keyboard_name": "MK47",
+ "manufacturer": "www.hfd.cn",
+ "maintainer": "hfd",
+ "usb": {
+ "vid": "0xFFFE",
+ "pid": "0x0002",
+ "device_version": "0.0.1"
+ },
+ "layouts": {
+ "LAYOUT": {
+ "layout": [
+ { "label": "Esc", "x": 0, "y": 0 },
+ { "label": "F1", "x": 2, "y": 0 },
+ { "label": "F2", "x": 3, "y": 0 },
+ { "label": "F3", "x": 4, "y": 0 },
+ { "label": "F4", "x": 5, "y": 0 },
+ { "label": "F5", "x": 6.5, "y": 0 },
+ { "label": "F6", "x": 7.5, "y": 0 },
+ { "label": "F7", "x": 8.5, "y": 0 },
+ { "label": "F8", "x": 9.5, "y": 0 },
+ { "label": "F9", "x": 11, "y": 0 },
+ { "label": "F10", "x": 12, "y": 0 },
+ { "label": "F11", "x": 13, "y": 0 },
+ { "label": "F12", "x": 14, "y": 0 },
+ { "label": "PrtSc", "x": 15.25, "y": 0 },
+ { "label": "Scroll Lock", "x": 16.25, "y": 0 },
+ { "label": "Pause", "x": 17.25, "y": 0 },
+
+ { "label": "~", "x": 0, "y": 1.25 },
+ { "label": "!", "x": 1, "y": 1.25 },
+ { "label": "@", "x": 2, "y": 1.25 },
+ { "label": "#", "x": 3, "y": 1.25 },
+ { "label": "$", "x": 4, "y": 1.25 },
+ { "label": "%", "x": 5, "y": 1.25 },
+ { "label": "^", "x": 6, "y": 1.25 },
+ { "label": "&", "x": 7, "y": 1.25 },
+ { "label": "*", "x": 8, "y": 1.25 },
+ { "label": "(", "x": 9, "y": 1.25 },
+ { "label": ")", "x": 10, "y": 1.25 },
+ { "label": "_", "x": 11, "y": 1.25 },
+ { "label": "+", "x": 12, "y": 1.25 },
+ { "label": "Bksp", "x": 14, "y": 1.25 },
+ { "label": "Insert", "x": 15.25, "y": 1.25 },
+ { "label": "Home", "x": 16.25, "y": 1.25 },
+ { "label": "PgUp", "x": 17.25, "y": 1.25 },
+
+ { "label": "Tab", "x": 0, "y": 2.25, "w": 1.5 },
+ { "label": "Q", "x": 1.5, "y": 2.25 },
+ { "label": "W", "x": 2.5, "y": 2.25 },
+ { "label": "E", "x": 3.5, "y": 2.25 },
+ { "label": "R", "x": 4.5, "y": 2.25 },
+ { "label": "T", "x": 5.5, "y": 2.25 },
+ { "label": "Y", "x": 6.5, "y": 2.25 },
+ { "label": "U", "x": 7.5, "y": 2.25 },
+ { "label": "I", "x": 8.5, "y": 2.25 },
+ { "label": "O", "x": 9.5, "y": 2.25 },
+ { "label": "P", "x": 10.5, "y": 2.25 },
+ { "label": "{", "x": 11.5, "y": 2.25 },
+ { "label": "}", "x": 12.5, "y": 2.25 },
+
+
+
+ { "label": "|", "x": 13.5, "y": 2.25, "w": 1.5 }
+ ]
+ }
+ }
+}
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/keymaps/default/keymap.c b/keyboards/hfdkb/keyboard_sw/mk47/keymaps/default/keymap.c
new file mode 100644
index 000000000000..fac94ae1054f
--- /dev/null
+++ b/keyboards/hfdkb/keyboard_sw/mk47/keymaps/default/keymap.c
@@ -0,0 +1,65 @@
+/* Copyright (C) 2022 jonylee@hfd
+ *
+ * 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 .
+ */
+
+#include QMK_KEYBOARD_H
+
+enum custom_keycodes {
+ KC_MISSION_CONTROL = SAFE_RANGE,
+ KC_LAUNCHPAD
+};
+
+#define KC_TASK LGUI(KC_TAB)
+#define KC_FLXP LGUI(KC_E)
+#define KC_MCTL KC_MISSION_CONTROL
+#define KC_LPAD KC_LAUNCHPAD
+
+// clang-format off
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ [0] = LAYOUT( /* Base */
+ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_SLSH,
+ KC_LCTL, MO(2), KC_LALT, KC_DEL, KC_PGDN, KC_SPC, KC_PGUP, MO(1), KC_LEFT, KC_DOWN, KC_RGHT),
+
+ [1] = LAYOUT( /* FN */
+ KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, RGB_MOD,
+ KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MSTP, KC_MUTE, KC_MPRV, KC_MPLY, KC_MNXT, RGB_VAI, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, KC_TRNS),
+
+ [2] = LAYOUT( /* Base */
+ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_CAPS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_TRNS,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_SLSH,
+ KC_LCTL, KC_NO, KC_LALT, KC_DEL, KC_PGDN, KC_SPC, KC_PGUP, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT),
+
+ [3] = LAYOUT( /* FN */
+ 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_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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
+};
+// clang-format on
+
+#ifdef RGB_MATRIX_ENABLE
+void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
+ // caps lock cyan
+ if (host_keyboard_led_state().caps_lock) {
+ RGB_MATRIX_INDICATOR_SET_COLOR(50, 255, 255, 255);
+ }
+}
+#endif
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/keymaps/via/config.h b/keyboards/hfdkb/keyboard_sw/mk47/keymaps/via/config.h
new file mode 100644
index 000000000000..5a9ae66052b3
--- /dev/null
+++ b/keyboards/hfdkb/keyboard_sw/mk47/keymaps/via/config.h
@@ -0,0 +1,21 @@
+/* Copyright (C) 2022 jonylee@hfd
+ *
+ * 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 .
+ */
+
+#pragma once
+
+#include "config_common.h"
+
+#define USB_ENDPOINTS_ARE_REORDERABLE
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/keymaps/via/keymap.c b/keyboards/hfdkb/keyboard_sw/mk47/keymaps/via/keymap.c
new file mode 100644
index 000000000000..945c70e0f486
--- /dev/null
+++ b/keyboards/hfdkb/keyboard_sw/mk47/keymaps/via/keymap.c
@@ -0,0 +1,69 @@
+/* Copyright (C) 2022 jonylee@hfd
+ *
+ * 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 .
+ */
+
+#include QMK_KEYBOARD_H
+
+enum custom_keycodes {
+ KC_MISSION_CONTROL = SAFE_RANGE,
+ KC_LAUNCHPAD
+};
+
+#define KC_TASK LGUI(KC_TAB)
+#define KC_FLXP LGUI(KC_E)
+#define KC_MCTL KC_MISSION_CONTROL
+#define KC_LPAD KC_LAUNCHPAD
+
+// clang-format off
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ [0] = LAYOUT( /* Base */
+ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_SLSH,
+ KC_LCTL, MO(2), KC_LALT, KC_DEL, KC_PGDN, KC_SPC, KC_PGUP, MO(1), KC_LEFT, KC_DOWN, KC_RGHT),
+
+ [1] = LAYOUT( /* FN */
+ KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, RGB_MOD,
+ RGB_HUI, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MSEL, KC_MUTE, KC_MPRV, KC_MPLY, KC_MNXT, RGB_VAI, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPD, RGB_VAD, RGB_SPI),
+
+ [2] = LAYOUT( /* Base */
+ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_CAPS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_TRNS,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_SLSH,
+ KC_LCTL, KC_NO, KC_LALT, KC_DEL, KC_PGDN, KC_SPC, KC_PGUP, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT),
+
+ [3] = LAYOUT( /* FN */
+ 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_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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
+};
+// clang-format on
+
+#ifdef RGB_MATRIX_ENABLE
+bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {
+ if (!rgb_matrix_indicators_advanced_user(led_min, led_max)) {
+ return false;
+ }
+ // caps lock cyan
+ if (host_keyboard_led_state().caps_lock) {
+ RGB_MATRIX_INDICATOR_SET_COLOR(12, 255, 255, 255);
+ }
+ return true;
+}
+#endif
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/keymaps/via/rules.mk b/keyboards/hfdkb/keyboard_sw/mk47/keymaps/via/rules.mk
new file mode 100644
index 000000000000..1e5b99807cb7
--- /dev/null
+++ b/keyboards/hfdkb/keyboard_sw/mk47/keymaps/via/rules.mk
@@ -0,0 +1 @@
+VIA_ENABLE = yes
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/matrix.c b/keyboards/hfdkb/keyboard_sw/mk47/matrix.c
new file mode 100644
index 000000000000..a8ab288542a7
--- /dev/null
+++ b/keyboards/hfdkb/keyboard_sw/mk47/matrix.c
@@ -0,0 +1,183 @@
+/* Copyright (C) 2022 jonylee@hfd
+ *
+ * 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 .
+ */
+#include "eeconfig.h"
+#include "quantum.h"
+
+
+enum colors { WHITE, RED, GREEN, BLUE };
+enum colors led_color_status = WHITE;
+
+static bool fn_make_flag = false;
+static bool Lkey_flag = false;
+static bool reset_glint_flag = false;
+static bool while_test_flag = false;
+static uint16_t current_time = 0;
+static uint8_t glint_cnt = 0;
+static uint16_t scancode = 0;
+
+HSV hsv;
+
+void led_test(uint8_t color);
+void clear_eeprom(void);
+
+bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case MO(1):
+ fn_make_flag = false;
+ if (record->event.pressed) {
+ fn_make_flag = true;
+ }
+ return true;
+ case KC_DEL:
+ if (fn_make_flag && record->event.pressed) {
+ Lkey_flag = true;
+ current_time = timer_read();
+ scancode = KC_DEL;
+ return false;
+ } else {
+ Lkey_flag = 0;
+ }
+ return true;
+ case KC_SPC:
+ if (fn_make_flag && record->event.pressed) {
+
+ if(while_test_flag)
+ {
+ while_test_flag = false;
+ rgb_matrix_init();
+ }
+ else
+ {
+ Lkey_flag = true;
+ current_time = timer_read();
+ scancode = KC_SPC;
+ }
+ return false;
+ } else {
+ Lkey_flag = 0;
+ }
+ return true;
+ default:
+ return process_record_user(keycode, record);
+ }
+}
+
+void matrix_scan_kb(void) {
+ if(Lkey_flag){
+ if(scancode == KC_DEL)
+ {
+ if (timer_elapsed(current_time) >= 5000) {
+ Lkey_flag = false;
+ clear_eeprom();
+
+ current_time = timer_read();
+ reset_glint_flag = true;
+ glint_cnt = 0;
+ rgb_matrix_mode_noeeprom(RGB_MATRIX_SOLID_COLOR);
+ rgb_matrix_sethsv_noeeprom(HSV_OFF);
+ }
+ }
+ else if(scancode == KC_SPC)
+ {
+ if (timer_elapsed(current_time) >= 3000) {
+ Lkey_flag = false;
+ clear_eeprom();
+
+ while_test_flag = true;
+ glint_cnt = 0;
+ rgb_matrix_mode_noeeprom(RGB_MATRIX_SOLID_COLOR);
+ rgb_matrix_sethsv_noeeprom(HSV_RED);
+ }
+ }
+ }
+ else if(reset_glint_flag)
+ {
+ if ((timer_elapsed(current_time)) >= 300) {
+ current_time = timer_read();
+ if (((glint_cnt++) & 0x01 )== 0) {
+ rgb_matrix_sethsv_noeeprom(HSV_WHITE);
+ } else {
+ rgb_matrix_sethsv_noeeprom(HSV_OFF);
+ }
+ if (glint_cnt >= 3) {
+ glint_cnt = 0;
+ reset_glint_flag = false;
+ rgb_matrix_init();
+ }
+ }
+
+ }
+ else if(while_test_flag){
+ if ((timer_elapsed(current_time)) >= 1500) {
+ current_time = timer_read();
+ if ((glint_cnt%3) == 0) {
+ rgb_matrix_sethsv_noeeprom(HSV_RED);
+ } else if ((glint_cnt%3)== 1) {
+ rgb_matrix_sethsv_noeeprom(HSV_GREEN);
+ } else if ((glint_cnt%3)== 2) {
+ rgb_matrix_sethsv_noeeprom(HSV_BLUE);
+ }
+ glint_cnt++;
+ if(glint_cnt>=30)
+ {
+ glint_cnt = 0;
+ while_test_flag = false;
+ rgb_matrix_init();
+ }
+ }
+ }
+}
+
+
+void led_test(uint8_t color) {
+ rgb_matrix_mode_noeeprom(RGB_MATRIX_SOLID_COLOR);
+
+ switch (color) {
+ case WHITE:
+ rgb_matrix_sethsv_noeeprom(HSV_WHITE);
+ break;
+
+ case RED:
+ rgb_matrix_sethsv_noeeprom(HSV_RED);
+ break;
+
+ case GREEN:
+ rgb_matrix_sethsv_noeeprom(HSV_GREEN);
+ break;
+
+ case BLUE:
+ rgb_matrix_sethsv_noeeprom(HSV_BLUE);
+ break;
+ }
+}
+
+void clear_eeprom(void) {
+ layer_state_t default_layer_temp = default_layer_state;
+ eeconfig_init();
+ default_layer_set(default_layer_temp);
+
+ #ifdef VIA_ENABLE
+ // This resets the layout options
+ via_set_layout_options(VIA_EEPROM_LAYOUT_OPTIONS_DEFAULT);
+ // This resets the keymaps in EEPROM to what is in flash.
+ dynamic_keymap_reset();
+ // This resets the macros in EEPROM to nothing.
+ dynamic_keymap_macro_reset();
+ #endif
+
+ rgb_matrix_enable_noeeprom();
+}
+
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/mcuconf.h b/keyboards/hfdkb/keyboard_sw/mk47/mcuconf.h
new file mode 100644
index 000000000000..0d16f4f04e46
--- /dev/null
+++ b/keyboards/hfdkb/keyboard_sw/mk47/mcuconf.h
@@ -0,0 +1,24 @@
+/* Copyright (C) 2022 jonylee@hfd
+ *
+ * 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 .
+ */
+#pragma once
+
+#include_next
+
+#undef WB32_SPI_USE_QSPI
+#define WB32_SPI_USE_QSPI TRUE
+
+#undef WB32_I2C_USE_I2C1
+#define WB32_I2C_USE_I2C1 TRUE
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/mk47.c b/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
new file mode 100644
index 000000000000..21d82ffcff9c
--- /dev/null
+++ b/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
@@ -0,0 +1,170 @@
+/* Copyright (C) 2022 jonylee@hfd
+ *
+ * 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 .
+ */
+
+#include "mk47.h"
+
+#ifdef RGB_MATRIX_ENABLE
+const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = {
+/* Refer to IS31 manual for these locations
+ * driver
+ * | R location
+ * | | G location
+ * | | | B location
+ * | | | | */
+ {0, D_1, E_1, F_1},
+ {0, D_2, E_2, F_2},
+ {0, D_3, E_3, F_3},
+ {0, D_4, E_4, F_4},
+ {0, D_5, E_5, F_5},
+ {0, D_6, E_6, F_6},
+ {0, D_7, E_7, F_7},
+ {0, D_8, E_8, F_8},
+ {0, D_9, E_9, F_9},
+ {0, D_10, E_10, F_10},
+ {0, D_11, E_11, F_11},
+ {0, D_12, E_12, F_12},
+
+ {0, G_1, H_1, I_1},
+ {0, G_2, H_2, I_2},
+ {0, G_3, H_3, I_3},
+ {0, G_4, H_4, I_4},
+ {0, G_5, H_5, I_5},
+ {0, G_6, H_6, I_6},
+ {0, G_7, H_7, I_7},
+ {0, G_8, H_8, I_8},
+ {0, G_9, H_9, I_9},
+ {0, G_10, H_10, I_10},
+ {0, G_11, H_11, I_11},
+ {0, G_12, H_12, I_12},
+
+ {0, J_1, K_1, L_1},
+ {0, J_2, K_2, L_2},
+ {0, J_3, K_3, L_3},
+ {0, J_4, K_4, L_4},
+ {0, J_5, K_5, L_5},
+ {0, J_6, K_6, L_6},
+ {0, J_7, K_7, L_7},
+ {0, J_8, K_8, L_8},
+ {0, J_9, K_9, L_9},
+ {0, J_10, K_10, L_10},
+ {0, J_11, K_11, L_11},
+ {0, J_12, K_12, L_12},
+
+ {0, J_13, K_13, L_13},
+ {0, J_14, K_14, L_14},
+ {0, J_15, K_15, L_15},
+ {0, J_16, K_16, L_16},
+ {0, D_13, E_13, F_13},
+ {0, D_14, E_14, F_14},
+ {0, D_15, E_15, F_15},
+ {0, G_13, H_13, I_13},
+ {0, G_14, H_14, I_14},
+ {0, G_15, H_15, I_15},
+ {0, G_16, H_16, I_16},
+};
+
+led_config_t g_led_config = {
+ {
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11},
+ { 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23},
+ { 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35},
+ { 36, 37, 38, 39, 40, 41, NO_LED, 42, 43, 44, 45, 46}
+ },
+ {
+ { 0, 0}, // 0
+ { 20, 0}, // 1
+ { 40, 0}, // 2
+ { 61, 0}, // 3
+ { 81, 0}, // 4
+ { 101, 0}, // 5
+ { 122, 0}, // 6
+ {142, 0}, // 7
+ {162, 0}, // 8
+ {183, 0}, // 9
+ {203, 0}, // 10
+ {224, 0}, // 11
+
+ { 0, 21}, // 12
+ { 20, 21}, // 13
+ { 40, 21}, // 14
+ { 61, 21}, // 15
+ { 81, 21}, // 16
+ { 101, 21}, // 17
+ { 122, 21}, // 18
+ {142, 21}, // 19
+ {162, 21}, // 20
+ {183, 21}, // 21
+ {203, 21}, // 22
+ {224, 21}, // 23
+
+ { 0, 42}, // 24
+ { 20, 42}, // 25
+ { 40, 42}, // 26
+ { 61, 42}, // 27
+ { 81, 42}, // 28
+ { 101, 42}, // 29
+ { 122, 42}, // 30
+ {142, 42}, // 31
+ {162, 42}, // 32
+ {183, 42}, // 33
+ {203, 42}, // 34
+ {224, 42}, // 35
+
+ { 0, 64}, // 36
+ { 20, 64}, // 37
+ { 40, 64}, // 38
+ { 61, 64}, // 39
+ { 81, 64}, // 40
+ { 111, 64}, // 41
+ {142, 64}, // 42
+ {162, 64}, // 43
+ {183, 64}, // 44
+ {203, 64}, // 45
+ {224, 64} // 46
+ },
+ {
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
+ }
+};
+
+#endif
+
+#ifdef VIA_ENABLE
+enum custom_keycodes {
+ KC_RESET = USER00,
+};
+#endif
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+#ifdef VIA_ENABLE
+ case KC_RESET: {
+ if (record->event.pressed) {
+
+ #include "via.h"
+ via_eeprom_set_valid(false);
+ eeconfig_init_via();
+ }
+ return false;
+ }
+#endif
+ default:
+ return true; // Process all other keycodes normally
+ }
+}
+
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/mk47.h b/keyboards/hfdkb/keyboard_sw/mk47/mk47.h
new file mode 100644
index 000000000000..8075340b1995
--- /dev/null
+++ b/keyboards/hfdkb/keyboard_sw/mk47/mk47.h
@@ -0,0 +1,35 @@
+/* Copyright (C) 2022 jonylee@hfd
+ *
+ * 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 .
+ */
+
+#pragma once
+
+#include "quantum.h"
+
+#define LAYOUT( \
+ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \
+ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \
+ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \
+ K300, K301, K302, K303, K304, K305, K307, K308, K309, K310, K311 \
+) { \
+ { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \
+ { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111 }, \
+ { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \
+ { K300, K301, K302, K303, K304, K305, KC_NO, K307, K308, K309, K310, K311 } \
+}
+// clang-format on
+
+
+
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/rules.mk b/keyboards/hfdkb/keyboard_sw/mk47/rules.mk
new file mode 100644
index 000000000000..7f64d52769d6
--- /dev/null
+++ b/keyboards/hfdkb/keyboard_sw/mk47/rules.mk
@@ -0,0 +1,25 @@
+# MCU name
+MCU = WB32FQ95
+
+# Bootloader selection
+BOOTLOADER = wb32-dfu
+
+# 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 = yes # Enable N-Key Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
+AUDIO_ENABLE = no # Audio output
+ENCODER_ENABLE = no
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = IS31FL3733
+EEPROM_DRIVER = wear_leveling
+WEAR_LEVELING_DRIVER = spi_flash
+
+SRC += matrix.c
diff --git a/keyboards/hfdkb/monsgeek/m1/config.h b/keyboards/hfdkb/monsgeek/m1/config.h
new file mode 100644
index 000000000000..9064eaed4a5e
--- /dev/null
+++ b/keyboards/hfdkb/monsgeek/m1/config.h
@@ -0,0 +1,145 @@
+/* Copyright (C) 2022 jonylee@hfd
+ *
+ * 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 .
+ */
+
+#pragma once
+
+#include "config_common.h"
+
+/* Use 5 dynamic keymap layers */
+#define DYNAMIC_KEYMAP_LAYER_COUNT 6
+
+#define RGB_TRIGGER_ON_KEYDOWN
+/* Force NKRO on boot up regardless of the setting saved in the EEPROM (uncomment to enable it) */
+ #define FORCE_NKRO
+
+/* key matrix size */
+#define MATRIX_ROWS 6
+#define MATRIX_COLS 16
+
+/* key matrix pins */
+#define MATRIX_ROW_PINS {B15, C6, C7, C8, C9, A8}
+#define MATRIX_COL_PINS { C1, C2, C3, A0, A1, A2, A3, A4, A5, A6, A7, C4, C5, B0, B1, B2}
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION ROW2COL
+
+/* encode pins */
+
+#define ENCODERS_PAD_A { B14 }
+#define ENCODERS_PAD_B { B13 }
+
+/* encoder resolution */
+#define ENCODER_RESOLUTION 2
+#define TAP_CODE_DELAY 20
+
+/* Hold ESC on start up to clear EEPROM and boot into bootloader mode */
+#define BOOTMAGIC_LITE_ROW 0
+#define BOOTMAGIC_LITE_COLUMN 0
+
+/* 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
+
+/* SPI Config for spi flash*/
+#define SPI_DRIVER SPIDQ
+#define SPI_SCK_PIN B3
+#define SPI_MOSI_PIN B5
+#define SPI_MISO_PIN B4
+#define SPI_MOSI_PAL_MODE 5
+
+#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12
+#define WEAR_LEVELING_BACKING_SIZE (8 * 1024)
+
+/* I2C Config for LED Driver */
+#define DRIVER_COUNT 2
+#define DRIVER_ADDR_1 0b1110100
+#define DRIVER_ADDR_2 0b1110111
+#define I2C1_SDA_PIN B7
+#define I2C1_SCL_PIN B6
+#define I2C1_SCL_PAL_MODE 4
+#define I2C1_OPMODE OPMODE_I2C
+#define I2C1_CLOCK_SPEED 400000 /* 400000 */
+
+#define DRIVER_1_LED_TOTAL 63
+#define DRIVER_2_LED_TOTAL 21
+#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL+22)
+
+#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
+#define RGB_MATRIX_CENTER {112,32}
+
+#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
+#define RGB_MATRIX_KEYPRESSES
+#define RGB_MATRIX_KEYRELEASES
+
+// RGB Matrix Animation modes. Explicitly enabled
+// For full list of effects, see:
+// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
+// #define ENABLE_RGB_MATRIX_ALPHAS_MODS
+// #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
+// #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
+#define ENABLE_RGB_MATRIX_BREATHING
+// #define ENABLE_RGB_MATRIX_BAND_SAT
+// #define ENABLE_RGB_MATRIX_BAND_VAL
+// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
+// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
+// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
+// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
+#define ENABLE_RGB_MATRIX_CYCLE_ALL
+#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
+#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
+#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
+#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
+#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
+#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
+#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
+#define ENABLE_RGB_MATRIX_DUAL_BEACON
+#define ENABLE_RGB_MATRIX_RAINBOW_BEACON
+// #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
+#define ENABLE_RGB_MATRIX_RAINDROPS
+// #define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
+// #define ENABLE_RGB_MATRIX_HUE_BREATHING
+// #define ENABLE_RGB_MATRIX_HUE_PENDULUM
+// #define ENABLE_RGB_MATRIX_HUE_WAVE
+// #define ENABLE_RGB_MATRIX_PIXEL_RAIN
+// #define ENABLE_RGB_MATRIX_PIXEL_FLOW
+// #define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
+// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined
+#define ENABLE_RGB_MATRIX_TYPING_HEATMAP
+//#define ENABLE_RGB_MATRIX_DIGITAL_RAIN
+// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined
+#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
+#define ENABLE_RGB_MATRIX_SOLID_REACTIVE
+//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
+//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
+//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
+//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
+//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
+//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
+//#define ENABLE_RGB_MATRIX_SPLASH
+#define ENABLE_RGB_MATRIX_MULTISPLASH
+//#define ENABLE_RGB_MATRIX_SOLID_SPLASH
+//#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
+
+#define RGB_MATRIX_HUE_STEP 62
+#define RGB_MATRIX_SAT_STEP 62
+#define RGB_MATRIX_VAL_STEP 50
+#define RGB_MATRIX_SPD_STEP 62
+#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 /* The maximum brightness level */
+
+/* Set debounce time to 1ms */
+#define DEBOUNCE 5
+
diff --git a/keyboards/hfdkb/monsgeek/m1/halconf.h b/keyboards/hfdkb/monsgeek/m1/halconf.h
new file mode 100644
index 000000000000..2f64e65393a5
--- /dev/null
+++ b/keyboards/hfdkb/monsgeek/m1/halconf.h
@@ -0,0 +1,23 @@
+/* Copyright (C) 2022 jonylee@hfd
+ *
+ * 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 .
+ */
+#pragma once
+
+#define HAL_USE_I2C TRUE
+#define HAL_USE_SPI TRUE
+#define SPI_USE_WAIT TRUE
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+
+#include_next
diff --git a/keyboards/hfdkb/monsgeek/m1/info.json b/keyboards/hfdkb/monsgeek/m1/info.json
new file mode 100644
index 000000000000..6712a3eea39d
--- /dev/null
+++ b/keyboards/hfdkb/monsgeek/m1/info.json
@@ -0,0 +1,106 @@
+{
+ "keyboard_name": "MonsGeek Keyboard",
+ "manufacturer": "www.hfd.cn",
+ "maintainer": "hfd",
+ "usb": {
+ "vid": "0xFFFE",
+ "pid": "0x0005",
+ "device_version": "1.1.0"
+ },
+ "layouts": {
+ "LAYOUT": {
+ "layout": [
+ { "label": "Esc", "x": 0, "y": 0 },
+ { "label": "F1", "x": 2, "y": 0 },
+ { "label": "F2", "x": 3, "y": 0 },
+ { "label": "F3", "x": 4, "y": 0 },
+ { "label": "F4", "x": 5, "y": 0 },
+ { "label": "F5", "x": 6.5, "y": 0 },
+ { "label": "F6", "x": 7.5, "y": 0 },
+ { "label": "F7", "x": 8.5, "y": 0 },
+ { "label": "F8", "x": 9.5, "y": 0 },
+ { "label": "F9", "x": 11, "y": 0 },
+ { "label": "F10", "x": 12, "y": 0 },
+ { "label": "F11", "x": 13, "y": 0 },
+ { "label": "F12", "x": 14, "y": 0 },
+ { "label": "PrtSc", "x": 15.25, "y": 0 },
+ { "label": "PrtSc", "x": 15.25, "y": 0 },
+
+ { "label": "~", "x": 0, "y": 1.25 },
+ { "label": "!", "x": 1, "y": 1.25 },
+ { "label": "@", "x": 2, "y": 1.25 },
+ { "label": "#", "x": 3, "y": 1.25 },
+ { "label": "$", "x": 4, "y": 1.25 },
+ { "label": "%", "x": 5, "y": 1.25 },
+ { "label": "^", "x": 6, "y": 1.25 },
+ { "label": "&", "x": 7, "y": 1.25 },
+ { "label": "*", "x": 8, "y": 1.25 },
+ { "label": "(", "x": 9, "y": 1.25 },
+ { "label": ")", "x": 10, "y": 1.25 },
+ { "label": "_", "x": 11, "y": 1.25 },
+ { "label": "+", "x": 12, "y": 1.25 },
+ { "label": "Bksp", "x": 14, "y": 1.25 },
+ { "label": "Insert", "x": 15.25, "y": 1.25 },
+
+ { "label": "Tab", "x": 0, "y": 2.25, "w": 1.5 },
+ { "label": "Q", "x": 1.5, "y": 2.25 },
+ { "label": "W", "x": 2.5, "y": 2.25 },
+ { "label": "E", "x": 3.5, "y": 2.25 },
+ { "label": "R", "x": 4.5, "y": 2.25 },
+ { "label": "T", "x": 5.5, "y": 2.25 },
+ { "label": "Y", "x": 6.5, "y": 2.25 },
+ { "label": "U", "x": 7.5, "y": 2.25 },
+ { "label": "I", "x": 8.5, "y": 2.25 },
+ { "label": "O", "x": 9.5, "y": 2.25 },
+ { "label": "P", "x": 10.5, "y": 2.25 },
+ { "label": "{", "x": 11.5, "y": 2.25 },
+ { "label": "}", "x": 12.5, "y": 2.25 },
+ { "label": "|", "x": 13.5, "y": 2.25, "w": 1.5 },
+ { "label": "Delete", "x": 15.25, "y": 2.25 },
+
+ { "label": "Caps Lock", "x": 0, "y": 3.25, "w": 1.75 },
+ { "label": "A", "x": 1.75, "y": 3.25 },
+ { "label": "S", "x": 2.75, "y": 3.25 },
+ { "label": "D", "x": 3.75, "y": 3.25 },
+ { "label": "F", "x": 4.75, "y": 3.25 },
+ { "label": "G", "x": 5.75, "y": 3.25 },
+ { "label": "H", "x": 6.75, "y": 3.25 },
+ { "label": "J", "x": 7.75, "y": 3.25 },
+ { "label": "K", "x": 8.75, "y": 3.25 },
+ { "label": "L", "x": 9.75, "y": 3.25 },
+ { "label": ":", "x": 10.75, "y": 3.25 },
+ { "label": "\"", "x": 11.75, "y": 3.25 },
+ { "label": ":", "x": 10.75, "y": 3.25 },
+ { "label": "Enter", "x": 13.75, "y": 3.25, "w": 1.25 },
+ { "label": "End", "x": 16.25, "y": 2.25 },
+
+ { "label": "Shift", "x": 0, "y": 4.25, "w": 1.25 },
+ { "label": "Z", "x": 2.25, "y": 4.25 },
+ { "label": "X", "x": 3.25, "y": 4.25 },
+ { "label": "C", "x": 4.25, "y": 4.25 },
+ { "label": "V", "x": 5.25, "y": 4.25 },
+ { "label": "B", "x": 6.25, "y": 4.25 },
+ { "label": "N", "x": 7.25, "y": 4.25 },
+ { "label": "M", "x": 8.25, "y": 4.25 },
+ { "label": "<", "x": 9.25, "y": 4.25 },
+ { "label": ">", "x": 10.25, "y": 4.25 },
+ { "label": "?", "x": 11.25, "y": 4.25 },
+ { "label": ":", "x": 10.75, "y": 3.25 },
+ { "label": "Shift", "x": 12.25, "y": 4.25, "w": 1.75 },
+ { "label": "Up", "x": 16.25, "y": 4.25 },
+ { "label": "Up", "x": 16.25, "y": 4.25 },
+
+ { "label": "Ctrl", "x": 0, "y": 5.25, "w": 1.25 },
+ { "label": "Win", "x": 1.25, "y": 5.25, "w": 1.25 },
+ { "label": "Alt", "x": 2.5, "y": 5.25, "w": 1.25 },
+ { "label": "Space", "x": 3.75, "y": 5.25, "w": 6.25 },
+ { "label": "Alt", "x": 10, "y": 5.25, "w": 1.25 },
+ { "label": "Menu", "x": 12.5, "y": 5.25, "w": 1.25 },
+ { "label": "Ctrl", "x": 13.75, "y": 5.25, "w": 1.25 },
+ { "label": "Left", "x": 15.25, "y": 5.25 },
+ { "label": "Down", "x": 16.25, "y": 5.25 },
+ { "label": "Right", "x": 17.25, "y": 5.25 }
+ ]
+ }
+ }
+}
diff --git a/keyboards/hfdkb/monsgeek/m1/keymaps/default/config.h b/keyboards/hfdkb/monsgeek/m1/keymaps/default/config.h
new file mode 100644
index 000000000000..5a9ae66052b3
--- /dev/null
+++ b/keyboards/hfdkb/monsgeek/m1/keymaps/default/config.h
@@ -0,0 +1,21 @@
+/* Copyright (C) 2022 jonylee@hfd
+ *
+ * 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 .
+ */
+
+#pragma once
+
+#include "config_common.h"
+
+#define USB_ENDPOINTS_ARE_REORDERABLE
diff --git a/keyboards/hfdkb/monsgeek/m1/keymaps/default/keymap.c b/keyboards/hfdkb/monsgeek/m1/keymaps/default/keymap.c
new file mode 100644
index 000000000000..ed8c41ab9f04
--- /dev/null
+++ b/keyboards/hfdkb/monsgeek/m1/keymaps/default/keymap.c
@@ -0,0 +1,139 @@
+/* Copyright (C) 2022 jonylee@hfd
+ *
+ * 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 .
+ */
+
+#include QMK_KEYBOARD_H
+
+static uint16_t map_current_time = 0;
+static bool pwron_flag = false;
+
+enum __layers {
+ WIN_B,
+ WIN_WASD,
+ WIN_FN,
+ MAC_B,
+ MAC_WASD,
+ MAC_FN
+};
+enum custom_keycodes {
+ KC_MISSION_CONTROL = SAFE_RANGE,
+ KC_LAUNCHPAD,
+ KC_RESET
+};
+
+#define KC_TASK LGUI(KC_TAB)
+#define KC_FLXP LGUI(KC_E)
+#define KC_MCTL KC_MISSION_CONTROL
+#define KC_LPAD KC_LAUNCHPAD
+
+// clang-format off
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ [WIN_B] = LAYOUT( /* Base */
+ KC_ESC, 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_DEL, KC_MUTE,
+ KC_GRV, 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_HOME,
+ 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_BSLS, KC_PGUP,
+ KC_CAPS, 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_PGDN,
+ 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_END,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(WIN_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
+
+ [WIN_WASD] = LAYOUT( /* Base */
+ KC_ESC, 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_DEL, KC_MUTE,
+ KC_GRV, 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_HOME,
+ KC_TAB, KC_Q, KC_UP, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
+ KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
+ 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_W, KC_END,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(WIN_FN), KC_RCTL, KC_A, KC_S, KC_D),
+
+
+ [WIN_FN] = LAYOUT( /* FN */
+ KC_ESC, KC_MYCM, KC_MAIL, KC_WSCH, KC_WHOM,KC_MSEL,KC_MPLY,KC_MPRV,KC_MNXT,KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, RGB_MOD,
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, RGB_SPD, RGB_SPI, KC_BSPC, KC_HOME,
+ KC_TAB, KC_Q, TG(WIN_WASD), KC_E, KC_R, KC_T, KC_Y, KC_U, KC_INS, TO(MAC_B), KC_PSCR, KC_LBRC, KC_RBRC, RGB_MOD, KC_PGUP,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, RGB_TOG, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
+ KC_LSFT, KC_Z, KC_X, KC_CALC, KC_V, KC_B, KC_N, KC_MUTE, KC_VOLD,KC_VOLU, KC_SLSH, KC_RSFT, RGB_VAI, KC_END,
+ KC_LCTL, MAGIC_TOGGLE_GUI, KC_LALT, KC_SPC, KC_RALT, MO(WIN_FN), KC_RCTL, RGB_SAD, RGB_VAD, RGB_SAI),
+
+ [MAC_B] = LAYOUT( /* Base */
+ KC_ESC, 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_DEL, KC_MUTE,
+ KC_GRV, 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_HOME,
+ 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_BSLS, KC_PGUP,
+ KC_CAPS, 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_PGDN,
+ 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_END,
+ KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(MAC_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
+
+ [MAC_WASD] = LAYOUT( /* Base */
+ KC_ESC, 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_DEL, KC_MUTE,
+ KC_GRV, 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_HOME,
+ KC_TAB, KC_Q, KC_UP, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
+ KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
+ 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_W, KC_END,
+ KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(MAC_FN), KC_RCTL, KC_A, KC_S, KC_D),
+
+ [MAC_FN] = LAYOUT( /* FN */
+ KC_ESC, KC_BRID, KC_BRIU, KC_MCTL, KC_LPAD, KC_F5, KC_F6, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_DEL, RGB_MOD,
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, RGB_SPD, RGB_SPI, KC_BSPC, KC_HOME,
+ KC_TAB, KC_Q, TG(MAC_WASD), KC_E, KC_R, KC_T, KC_Y, KC_U, KC_INS, TO(WIN_B), KC_PSCR, KC_LBRC, KC_RBRC, RGB_MOD, KC_PGUP,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, RGB_TOG, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
+ KC_LSFT, KC_Z, KC_X, KC_CALC, KC_V, KC_B, KC_N, KC_MUTE, KC_VOLD,KC_VOLU, KC_SLSH, KC_RSFT, RGB_VAI, KC_END,
+ KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(MAC_FN), KC_RCTL, RGB_SAD, RGB_VAD, RGB_SAI)
+};
+// clang-format on
+
+#ifdef RGB_MATRIX_ENABLE
+bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {
+ if (!rgb_matrix_indicators_advanced_user(led_min, led_max)) {
+ return false;
+ }
+ if(pwron_flag == false){
+ map_current_time = timer_read();
+ if(map_current_time<3000){
+ map_current_time++;
+ for (uint8_t i = led_min; i < led_max; i++) {
+ rgb_matrix_set_color(i, 150, 150, 150);
+ }
+ }
+ if(map_current_time >= 3000)
+ pwron_flag = true;
+ }
+
+ else{
+ // caps lock cyan
+ if (host_keyboard_led_state().caps_lock) {
+ RGB_MATRIX_INDICATOR_SET_COLOR(44, 255, 255, 255);
+ }
+
+ if(keymap_config.no_gui)
+ {
+ RGB_MATRIX_INDICATOR_SET_COLOR(73, 255, 255, 255);
+ }
+
+ }
+
+ return true;
+}
+#endif
+
+#if defined(ENCODER_MAP_ENABLE)
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
+ [WIN_B] = { ENCODER_CCW_CW(KC_VOLU, KC_VOLD) },
+ [WIN_WASD] = { ENCODER_CCW_CW(KC_VOLU, KC_VOLD) },
+ [WIN_FN] = { ENCODER_CCW_CW(RGB_VAI, RGB_VAD) },
+ [MAC_B] = { ENCODER_CCW_CW(KC_VOLU, KC_VOLD) },
+ [MAC_WASD] = { ENCODER_CCW_CW(KC_VOLU, KC_VOLD) },
+ [MAC_FN] = { ENCODER_CCW_CW(RGB_VAI, RGB_VAD) }
+};
+#endif
+
diff --git a/keyboards/hfdkb/monsgeek/m1/keymaps/via/config.h b/keyboards/hfdkb/monsgeek/m1/keymaps/via/config.h
new file mode 100644
index 000000000000..5a9ae66052b3
--- /dev/null
+++ b/keyboards/hfdkb/monsgeek/m1/keymaps/via/config.h
@@ -0,0 +1,21 @@
+/* Copyright (C) 2022 jonylee@hfd
+ *
+ * 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 .
+ */
+
+#pragma once
+
+#include "config_common.h"
+
+#define USB_ENDPOINTS_ARE_REORDERABLE
diff --git a/keyboards/hfdkb/monsgeek/m1/keymaps/via/keymap.c b/keyboards/hfdkb/monsgeek/m1/keymaps/via/keymap.c
new file mode 100644
index 000000000000..ad3fa3280dbc
--- /dev/null
+++ b/keyboards/hfdkb/monsgeek/m1/keymaps/via/keymap.c
@@ -0,0 +1,181 @@
+/* Copyright (C) 2022 jonylee@hfd
+ *
+ * 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 .
+ */
+
+#include QMK_KEYBOARD_H
+
+static uint16_t map_current_time = 0;
+static bool pwron_flag = false;
+
+enum __layers {
+ WIN_B,
+ WIN_WASD,
+ WIN_FN,
+ MAC_B,
+ MAC_WASD,
+ MAC_FN
+};
+enum custom_keycodes {
+ KC_MISSION_CONTROL = SAFE_RANGE,
+ KC_LAUNCHPAD,
+ KC_RESET
+};
+
+#define KC_TASK LGUI(KC_TAB)
+#define KC_FLXP LGUI(KC_E)
+#define KC_MCTL KC_MISSION_CONTROL
+#define KC_LPAD KC_LAUNCHPAD
+
+// clang-format off
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ [WIN_B] = LAYOUT( /* Base */
+ KC_ESC, 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_DEL, KC_MUTE,
+ KC_GRV, 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_HOME,
+ 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_BSLS, KC_PGUP,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_PGDN,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NUBS, KC_RSFT, KC_UP, KC_END,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(WIN_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
+
+ [WIN_WASD] = LAYOUT( /* Base */
+ KC_ESC, 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_DEL, KC_MUTE,
+ KC_GRV, 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_HOME,
+ KC_TAB, KC_Q, KC_UP, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
+ KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_PGDN,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NUBS, KC_RSFT, KC_W, KC_END,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(WIN_FN), KC_RCTL, KC_A, KC_S, KC_D),
+
+
+ [WIN_FN] = LAYOUT( /* FN */
+ KC_ESC, KC_MYCM, KC_MAIL, KC_WSCH, KC_WHOM,KC_MSEL,KC_MPLY,KC_MPRV,KC_MNXT,KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, RGB_MOD,
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, RGB_SPD, RGB_SPI, KC_BSPC, KC_HOME,
+ KC_TAB, KC_Q, TG(WIN_WASD), KC_E, KC_R, KC_T, KC_Y, KC_U, KC_INS, DF(MAC_B), KC_PSCR, KC_LBRC, KC_RBRC, RGB_MOD, KC_PGUP,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, RGB_TOG, KC_SCLN, KC_QUOT, RGB_MOD, KC_ENT, KC_PGDN,
+ KC_LSFT, KC_Z, KC_X, KC_CALC, KC_V, KC_B, KC_N, KC_MUTE, KC_VOLD,KC_VOLU, KC_SLSH, KC_NUBS, KC_RSFT, RGB_VAI, KC_END,
+ KC_LCTL, MAGIC_TOGGLE_GUI, KC_LALT, KC_SPC, KC_RALT, MO(WIN_FN), KC_RCTL, RGB_SAD, RGB_VAD, RGB_SAI),
+
+ [MAC_B] = LAYOUT( /* Base */
+ KC_ESC, KC_BRID, KC_BRIU, KC_MCTL, KC_LPAD, KC_F5, KC_F6, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_DEL, KC_MUTE,
+ KC_GRV, 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_HOME,
+ 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_BSLS, KC_PGUP,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_PGDN,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_NUBS, KC_RSFT, KC_UP, KC_END,
+ KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(MAC_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
+
+ [MAC_WASD] = LAYOUT( /* Base */
+ KC_ESC, KC_BRID, KC_BRIU, KC_MCTL, KC_LPAD, KC_F5, KC_F6, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_DEL, KC_MUTE,
+ KC_GRV, 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_HOME,
+ KC_TAB, KC_Q, KC_UP, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
+ KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_PGDN,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_NUBS, KC_RSFT, KC_W, KC_END,
+ KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(MAC_FN), KC_RCTL, KC_A, KC_S, KC_D),
+
+ [MAC_FN] = LAYOUT( /* FN */
+ KC_ESC, 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_DEL, RGB_MOD,
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, RGB_SPD, RGB_SPI, KC_BSPC, KC_HOME,
+ KC_TAB, KC_Q, TG(MAC_WASD), KC_E, KC_R, KC_T, KC_Y, KC_U, KC_INS, DF(WIN_B), KC_PSCR, KC_LBRC, KC_RBRC, RGB_MOD, KC_PGUP,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, RGB_TOG, KC_SCLN, KC_QUOT, RGB_MOD, KC_ENT, KC_PGDN,
+ KC_LSFT, KC_Z, KC_X, KC_CALC, KC_V, KC_B, KC_N, KC_MUTE, KC_VOLD,KC_VOLU, KC_SLSH, KC_NUBS, KC_RSFT, RGB_VAI, KC_END,
+ KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(MAC_FN), KC_RCTL, RGB_SAD, RGB_VAD, RGB_SAI)
+};
+// clang-format on
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case KC_MISSION_CONTROL:
+ if (record->event.pressed) {
+ host_consumer_send(0x29F);
+ } else {
+ host_consumer_send(0);
+ }
+ return false; // Skip all further processing of this key
+ case KC_LAUNCHPAD:
+ if (record->event.pressed) {
+ host_consumer_send(0x2A0);
+ } else {
+ host_consumer_send(0);
+ }
+ return false; // Skip all further processing of this key
+#ifdef VIA_ENABLE
+ case KC_RESET: {
+ if (record->event.pressed) {
+
+ #include "via.h"
+ via_eeprom_set_valid(false);
+ eeconfig_init_via();
+
+ }
+ return false;
+ }
+#endif
+ }
+ return true;
+}
+
+#if CONSOLE_ENABLE
+void keyboard_post_init_user(void) {
+ // Customise these values to desired behaviour
+ debug_enable=true;
+// debug_matrix=true;
+//debug_keyboard=true;
+//debug_mouse=true;
+}
+#endif
+
+#ifdef RGB_MATRIX_ENABLE
+bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {
+ if (!rgb_matrix_indicators_advanced_user(led_min, led_max)) {
+ return false;
+ }
+ if(pwron_flag == false){
+ map_current_time = timer_read();
+ if(map_current_time<3000){
+ map_current_time++;
+ for (uint8_t i = led_min; i < led_max; i++) {
+ rgb_matrix_set_color(i, 150, 150, 150);
+ }
+ }
+ if(map_current_time >= 3000)
+ pwron_flag = true;
+ }
+
+ else{
+ // caps lock cyan
+ if (host_keyboard_led_state().caps_lock) {
+ RGB_MATRIX_INDICATOR_SET_COLOR(44, 255, 255, 255);
+ }
+
+ if(keymap_config.no_gui)
+ {
+ RGB_MATRIX_INDICATOR_SET_COLOR(75, 255, 255, 255);
+ }
+
+ }
+
+ return true;
+}
+#endif
+
+#if defined(ENCODER_MAP_ENABLE)
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
+ [WIN_B] = { ENCODER_CCW_CW(KC_VOLU, KC_VOLD) },
+ [WIN_WASD] = { ENCODER_CCW_CW(KC_VOLU, KC_VOLD) },
+ [WIN_FN] = { ENCODER_CCW_CW(RGB_VAI, RGB_VAD) },
+ [MAC_B] = { ENCODER_CCW_CW(KC_VOLU, KC_VOLD) },
+ [MAC_WASD] = { ENCODER_CCW_CW(KC_VOLU, KC_VOLD) },
+ [MAC_FN] = { ENCODER_CCW_CW(RGB_VAI, RGB_VAD) }
+};
+#endif
+
diff --git a/keyboards/hfdkb/monsgeek/m1/keymaps/via/rules.mk b/keyboards/hfdkb/monsgeek/m1/keymaps/via/rules.mk
new file mode 100644
index 000000000000..4253f570f0bb
--- /dev/null
+++ b/keyboards/hfdkb/monsgeek/m1/keymaps/via/rules.mk
@@ -0,0 +1,2 @@
+VIA_ENABLE = yes
+ENCODER_MAP_ENABLE = yes
\ No newline at end of file
diff --git a/keyboards/hfdkb/monsgeek/m1/m1.c b/keyboards/hfdkb/monsgeek/m1/m1.c
new file mode 100644
index 000000000000..ed2e0a7bb957
--- /dev/null
+++ b/keyboards/hfdkb/monsgeek/m1/m1.c
@@ -0,0 +1,283 @@
+/* Copyright (C) 2022 jonylee@hfd
+ *
+ * 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 .
+ */
+
+#include "m1.h"
+
+#ifdef RGB_MATRIX_ENABLE
+const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+/* Refer to IS31 manual for these locations
+ * driver
+ * | R location
+ * | | G location
+ * | | | B location
+ * | | | | */
+ {1, A_1, B_1, C_1},
+ {1, A_2, B_2, C_2},
+ {1, A_3, B_3, C_3},
+ {1, A_4, B_4, C_4},
+ {1, A_5, B_5, C_5},
+ {1, A_6, B_6, C_6},
+ {1, A_7, B_7, C_7},
+ {1, A_8, B_8, C_8},
+ {1, A_9, B_9, C_9},
+ {1, A_10, B_10, C_10},
+ {1, A_11, B_11, C_11},
+ {1, A_12, B_12, C_12},
+ {1, A_13, B_13, C_13},
+ {1, A_14, B_14, C_14},
+
+ {0, A_1, B_1, C_1},
+ {0, A_2, B_2, C_2},
+ {0, A_3, B_3, C_3},
+ {0, A_4, B_4, C_4},
+ {0, A_5, B_5, C_5},
+ {0, A_6, B_6, C_6},
+ {0, A_7, B_7, C_7},
+ {0, A_8, B_8, C_8},
+ {0, A_9, B_9, C_9},
+ {0, A_10, B_10, C_10},
+ {0, A_11, B_11, C_11},
+ {0, A_12, B_12, C_12},
+ {0, A_13, B_13, C_13},
+ {0, A_14, B_14, C_14},
+ {1, D_1, E_1, F_1},
+
+ {0, D_1, E_1, F_1},
+ {0, D_2, E_2, F_2},
+ {0, D_3, E_3, F_3},
+ {0, D_4, E_4, F_4},
+ {0, D_5, E_5, F_5},
+ {0, D_6, E_6, F_6},
+ {0, D_7, E_7, F_7},
+ {0, D_8, E_8, F_8},
+ {0, D_9, E_9, F_9},
+ {0, D_10, E_10, F_10},
+ {0, D_11, E_11, F_11},
+ {0, D_12, E_12, F_12},
+ {0, D_13, E_13, F_13},
+ {0, D_14, E_14, F_14},
+ {1, D_2, E_2, F_2},
+
+ {0, G_1, H_1, I_1},
+ {0, G_2, H_2, I_2},
+ {0, G_3, H_3, I_3},
+ {0, G_4, H_4, I_4},
+ {0, G_5, H_5, I_5},
+ {0, G_6, H_6, I_6},
+ {0, G_7, H_7, I_7},
+ {0, G_8, H_8, I_8},
+ {0, G_9, H_9, I_9},
+ {0, G_10, H_10, I_10},
+ {0, G_11, H_11, I_11},
+ {0, G_12, H_12, I_12},
+ {0, A_15, B_15, C_15},
+ {0, G_13, H_13, I_13},
+ {1, D_3, E_3, F_3},
+
+ {0, J_1, K_1, L_1},
+ {0, A_16, B_16, C_16},
+ {0, J_2, K_2, L_2},
+ {0, J_3, K_3, L_3},
+ {0, J_4, K_4, L_4},
+ {0, J_5, K_5, L_5},
+ {0, J_6, K_6, L_6},
+ {0, J_7, K_7, L_7},
+ {0, J_8, K_8, L_8},
+ {0, J_9, K_9, L_9},
+ {0, J_10, K_10, L_10},
+ {0, J_11, K_11, L_11},
+ {0, J_12, K_12, L_12},
+ {1, D_7, E_7, F_7},
+ {1, D_4, E_4, F_4},
+
+ {0, J_13, K_13, L_13},
+ {0, J_14, K_14, L_14},
+ {0, J_15, K_15, L_15},
+ {0, J_16, K_16, L_16},
+
+ {0, G_14, H_14, I_14},
+ {0, G_15, H_15, I_15},
+ {0, G_16, H_16, I_16},
+
+ {0, D_15, E_15, F_15},
+ {1, D_6, E_6, F_6},
+ {1, D_5, E_5, F_5},
+
+ {1, G_1, H_1, I_1},
+ {1, G_2, H_2, I_2},
+ {1, G_3, H_3, I_3},
+ {1, G_4, H_4, I_4},
+ {1, G_5, H_5, I_5},
+ {1, G_6, H_6, I_6},
+ {1, G_7, H_7, I_7},
+ {1, G_8, H_8, I_8},
+ {1, G_9, H_9, I_9},
+ {1, G_10, H_10, I_10},
+ {1, G_11, H_11, I_11},
+
+ {1, J_1, K_1, L_1},
+ {1, J_2, K_2, L_2},
+ {1, J_3, K_3, L_3},
+ {1, J_4, K_4, L_4},
+ {1, J_5, K_5, L_5},
+ {1, J_6, K_6, L_6},
+ {1, J_7, K_7, L_7},
+ {1, J_8, K_8, L_8},
+ {1, J_9, K_9, L_9},
+ {1, J_10, K_10, L_10},
+ {1, J_11, K_11, L_11},
+};
+
+led_config_t g_led_config = {
+ {
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, NO_LED, NO_LED},
+ { 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, NO_LED, 28},
+ { 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, NO_LED, 43},
+ { 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, NO_LED, 58},
+ { 59, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 60, NO_LED, 71, 72, 73},
+ { 74, 75, 76, NO_LED, NO_LED, 77, NO_LED, NO_LED, NO_LED, 78, 79, 80, NO_LED, 81, 82, 83}
+ },
+ {
+ { 0, 0}, // 0
+ { 14, 0}, // 1
+ { 29, 0}, // 2
+ { 44, 0}, // 3
+ { 59, 0}, // 4
+ { 74, 0}, // 5
+ { 89, 0}, // 6
+ {104, 0}, // 7
+ {119, 0}, // 8
+ {134, 0}, // 9
+ {149, 0}, // 10
+ {164, 0}, // 11
+ {179, 0}, // 12
+ {194, 0}, // 13
+
+ { 0, 12}, // 14
+ { 14, 12}, // 15
+ { 28, 12}, // 16
+ { 42, 12}, // 17
+ { 56, 12}, // 18
+ { 70, 12}, // 19
+ { 84, 12}, // 20
+ { 98, 12}, // 21
+ {112, 12}, // 22
+ {126, 12}, // 23
+ {140, 12}, // 24
+ {154, 12}, // 25
+ {168, 12}, // 26
+ {182, 12}, // 27
+ {224, 12}, // 28
+
+ { 0, 25}, // 29
+ { 14, 25}, // 30
+ { 28, 25}, // 31
+ { 42, 25}, // 32
+ { 56, 25}, // 33
+ { 70, 25}, // 34
+ { 84, 25}, // 35
+ { 98, 25}, // 36
+ {112, 25}, // 37
+ {126, 25}, // 38
+ {140, 25}, // 39
+ {154, 25}, // 40
+ {168, 25}, // 41
+ {182, 25}, // 42
+ {224, 25}, // 43
+
+ { 0, 38}, // 44
+ { 28, 38}, // 45
+ { 42, 38}, // 46
+ { 56, 38}, // 47
+ { 70, 38}, // 48
+ { 84, 38}, // 49
+ { 98, 38}, // 50
+ {112, 38}, // 51
+ {126, 38}, // 52
+ {140, 38}, // 53
+ {154, 38}, // 54
+ {168, 38}, // 55
+ {182, 38}, // 56
+ {196, 38}, // 57
+ {224, 38}, // 57
+
+ { 0, 51}, // 58
+ { 14, 51}, // 59
+ { 28, 51}, // 59
+ { 37, 51}, // 60
+ { 56, 51}, // 61
+ { 74, 51}, // 62
+ { 93, 51}, // 63
+ {112, 51}, // 64
+ {130, 51}, // 65
+ {149, 51}, // 66
+ {168, 51}, // 67
+ {186, 51}, // 68
+ {200, 51}, // 69
+ {214, 51}, // 70
+ {224, 51}, // 71
+
+ { 0, 64}, // 72
+ { 18, 64}, // 73
+ { 37, 64}, // 74
+ { 92, 64}, // 75
+ {140, 64}, // 76
+ {154, 64}, // 77
+ {168, 64}, // 78
+ {196, 64}, // 80
+ {210, 64}, // 81
+ {224, 64}, // 82
+
+ {0, 0}, // 68 LED 1
+ {0, 6}, // 69 LED 2
+ {0, 13}, // 70 LED 3
+ {0, 19}, // 71 LED 4
+ {0, 25}, // 72 LED 5
+ {0, 32}, // 73 LED 6
+ {0, 38}, // 74 LED 7
+ {0, 45}, // 75 LED 8
+ {0, 51}, // 73 LED 9
+ {0, 57}, // 74 LED 10
+ {0, 64}, // 75 LED 11
+
+ {224, 0 }, // 78 LED 12
+ {224, 6 }, // 79 LED 13
+ {224, 13}, // 80 LED 14
+ {224, 19}, // 81 LED 15
+ {224, 25}, // 82 LED 16
+ {224, 32}, // 83 LED 17
+ {224, 38}, // 84 LED 18
+ {224, 45}, // 82 LED 19
+ {224, 51}, // 83 LED 20
+ {224, 57}, // 84 LED 21
+ {224, 64} // 85 LED 22
+ },
+ {
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
+ }
+};
+
+#endif
+
+
+
diff --git a/keyboards/hfdkb/monsgeek/m1/m1.h b/keyboards/hfdkb/monsgeek/m1/m1.h
new file mode 100644
index 000000000000..ebd2bfe85d13
--- /dev/null
+++ b/keyboards/hfdkb/monsgeek/m1/m1.h
@@ -0,0 +1,39 @@
+/* Copyright (C) 2022 jonylee@hfd
+ *
+ * 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 .
+ */
+
+#pragma once
+
+#include "quantum.h"
+
+#define LAYOUT(\
+ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K015, \
+ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115, \
+ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \
+ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K315, \
+ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, K415, \
+ K500, K501, K502, K505, K509, K510, K511, K513, K514, K515 \
+) { \
+ { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015 }, \
+ { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO, K115 }, \
+ { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO, K215 }, \
+ { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, K315 }, \
+ { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, K415 }, \
+ { K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, K509, K510, K511, KC_NO, K513, K514, K515 } \
+}
+// clang-format on
+
+
+
diff --git a/keyboards/hfdkb/monsgeek/m1/matrix.c b/keyboards/hfdkb/monsgeek/m1/matrix.c
new file mode 100644
index 000000000000..e7d50132f799
--- /dev/null
+++ b/keyboards/hfdkb/monsgeek/m1/matrix.c
@@ -0,0 +1,284 @@
+/* Copyright (C) 2022 jonylee@hfd
+ *
+ * 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 .
+ */
+#include "eeconfig.h"
+#include "quantum.h"
+
+enum __layers {
+ WIN_B,
+ WIN_WASD,
+ WIN_FN,
+ MAC_B,
+ MAC_WASD,
+ MAC_FN
+};
+
+enum colors { WHITE, RED, GREEN, BLUE };
+enum colors led_color_status = WHITE;
+
+static bool fn_make_flag = false;
+static bool Lkey_flag = false;
+static bool reset_glint_flag = false;
+static bool while_test_flag = false;
+static bool alarm_flag = false;
+static uint16_t current_time = 0;
+static uint8_t glint_cnt = 0;
+static uint16_t scancode = 0;
+static uint8_t alarm_cnt = 0;
+
+HSV hsv;
+
+void led_test(uint8_t color);
+void clear_eeprom(void);
+
+bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
+
+dprintf("keycode = 0x%X,TG(WIN_B) = 0x%X,TG(MAC_B) = 0x%X\r\n",keycode,TG(WIN_B),TG(MAC_B));
+// uint8_t s = rgblight_get_sat();
+ // uint8_t v = rgblight_get_val();
+
+ switch (keycode) {
+ case MO(WIN_FN):
+ case MO(MAC_FN):
+ fn_make_flag = false;
+ if (record->event.pressed) {
+ fn_make_flag = true;
+ }
+ return true;
+ case KC_GRV:
+ if (fn_make_flag && record->event.pressed) {
+ Lkey_flag = true;
+ current_time = timer_read();
+ scancode = KC_GRV;
+ return false;
+ } else {
+ Lkey_flag = 0;
+ }
+ return true;
+ case KC_LCTL:
+ if (fn_make_flag && record->event.pressed) {
+
+ if(while_test_flag)
+ {
+ while_test_flag = false;
+ rgb_matrix_init();
+ }
+ else
+ {
+ Lkey_flag = true;
+ current_time = timer_read();
+ scancode = KC_LCTL;
+ }
+ return false;
+ } else {
+ Lkey_flag = 0;
+ }
+ return true;
+ case DF(WIN_B):
+ if ((fn_make_flag && record->event.pressed)&&(alarm_flag == 0)) {
+ alarm_flag = true;
+ rgb_matrix_toggle_noeeprom();
+ current_time = timer_read();
+ set_single_persistent_default_layer(WIN_B);
+ return false;
+ }
+ return true;
+ case DF(MAC_B):
+ if ((fn_make_flag && record->event.pressed)&&(alarm_flag == 0)) {
+ alarm_flag = true;
+ rgb_matrix_toggle_noeeprom();
+ current_time = timer_read();
+ set_single_persistent_default_layer(MAC_B);
+ return false;
+ }
+ return true;
+ case TG(WIN_WASD):
+ if ((fn_make_flag && record->event.pressed)&&(alarm_flag == 0)) {
+ alarm_flag = true;
+ rgb_matrix_toggle_noeeprom();
+ current_time = timer_read();
+ // set_single_persistent_default_layer(WIN_WASD);
+ return false;
+ }
+ return true;
+ case TG(MAC_WASD):
+ if ((fn_make_flag && record->event.pressed)&&(alarm_flag == 0)) {
+ alarm_flag = true;
+ rgb_matrix_toggle_noeeprom();
+ current_time = timer_read();
+// set_single_persistent_default_layer(MAC_WASD);
+ return false;
+ }
+ return true;
+ case MAGIC_TOGGLE_GUI:
+ if ((fn_make_flag && record->event.pressed)&&(alarm_flag == 0)) {
+ alarm_flag = true;
+ rgb_matrix_toggle_noeeprom();
+ current_time = timer_read();
+ }
+ return true;
+ case RGB_VAI:
+ if ((fn_make_flag && record->event.pressed)&&(alarm_flag == 0)) {
+ if(rgblight_get_val()<180){
+ alarm_cnt = 2;
+ }
+ }
+ return true;
+ case RGB_VAD:
+ if ((fn_make_flag && record->event.pressed)&&(alarm_flag == 0)) {
+ if(rgblight_get_val()>10){
+ alarm_cnt = 2;
+ }
+ }
+ return true;
+ case RGB_SAI:
+ if ((fn_make_flag && record->event.pressed)&&(alarm_flag == 0)) {
+ if(rgblight_get_sat()<240){
+ alarm_cnt = 2;
+ }
+ }
+ return true;
+ case RGB_SAD:
+ if ((fn_make_flag && record->event.pressed)&&(alarm_flag == 0)) {
+ if(rgblight_get_sat()>10){
+ alarm_cnt = 2;
+ }
+ }
+ return true;
+ default:
+ return process_record_user(keycode, record);
+ }
+}
+
+void matrix_scan_kb(void) {
+ if(Lkey_flag){
+ if(scancode == KC_GRV){
+ if (timer_elapsed(current_time) >= 3000) {
+ Lkey_flag = false;
+ clear_eeprom();
+
+ current_time = timer_read();
+ reset_glint_flag = true;
+ glint_cnt = 0;
+ rgb_matrix_mode_noeeprom(RGB_MATRIX_SOLID_COLOR);
+ rgb_matrix_sethsv_noeeprom(HSV_OFF);
+ }
+ }
+ else if(scancode == KC_LCTL){
+ if (timer_elapsed(current_time) >= 3000) {
+ Lkey_flag = false;
+ clear_eeprom();
+
+ while_test_flag = true;
+ glint_cnt = 0;
+ rgb_matrix_mode_noeeprom(RGB_MATRIX_SOLID_COLOR);
+ rgb_matrix_sethsv_noeeprom(HSV_WHITE);
+ }
+ }
+ }
+ else if(reset_glint_flag){
+ if ((timer_elapsed(current_time)) >= 300) {
+ current_time = timer_read();
+ if (((glint_cnt++) & 0x01 )== 0) {
+ rgb_matrix_sethsv_noeeprom(HSV_WHITE);
+ } else {
+ rgb_matrix_sethsv_noeeprom(HSV_OFF);
+ }
+ if (glint_cnt >= 3) {
+ glint_cnt = 0;
+ reset_glint_flag = false;
+ rgb_matrix_init();
+ }
+ }
+
+ }
+ else if(while_test_flag){
+ if ((timer_elapsed(current_time)) >= 1000) {
+ current_time = timer_read();
+ if ((glint_cnt%4) == 0) {
+ rgb_matrix_sethsv_noeeprom(HSV_RED);
+ } else if ((glint_cnt%4)== 1) {
+ rgb_matrix_sethsv_noeeprom(HSV_GREEN);
+ } else if ((glint_cnt%4)== 2) {
+ rgb_matrix_sethsv_noeeprom(HSV_BLUE);
+ } else if ((glint_cnt%4)== 3) {
+ rgb_matrix_sethsv_noeeprom(HSV_WHITE);
+ }
+ glint_cnt++;
+ if(glint_cnt>=30)
+ {
+ glint_cnt = 0;
+ while_test_flag = false;
+ rgb_matrix_init();
+ }
+ }
+ }
+ else if(alarm_cnt != 0)
+ {
+ alarm_cnt--;
+ if(alarm_cnt == 0){
+ alarm_flag = true;
+ rgb_matrix_toggle_noeeprom();
+ current_time = timer_read();
+ }
+ }
+ else if(alarm_flag){
+ if ((timer_elapsed(current_time)) >= 200) {
+ rgb_matrix_toggle_noeeprom();
+ alarm_flag = 0;
+ }
+ }
+}
+
+
+void led_test(uint8_t color) {
+ rgb_matrix_mode_noeeprom(RGB_MATRIX_SOLID_COLOR);
+
+ switch (color) {
+ case WHITE:
+ rgb_matrix_sethsv_noeeprom(HSV_WHITE);
+ break;
+
+ case RED:
+ rgb_matrix_sethsv_noeeprom(HSV_RED);
+ break;
+
+ case GREEN:
+ rgb_matrix_sethsv_noeeprom(HSV_GREEN);
+ break;
+
+ case BLUE:
+ rgb_matrix_sethsv_noeeprom(HSV_BLUE);
+ break;
+ }
+}
+
+void clear_eeprom(void) {
+ layer_state_t default_layer_temp = default_layer_state;
+ eeconfig_init();
+ default_layer_set(default_layer_temp);
+
+ #ifdef VIA_ENABLE
+ // This resets the layout options
+ via_set_layout_options(VIA_EEPROM_LAYOUT_OPTIONS_DEFAULT);
+ // This resets the keymaps in EEPROM to what is in flash.
+ dynamic_keymap_reset();
+ // This resets the macros in EEPROM to nothing.
+ dynamic_keymap_macro_reset();
+ #endif
+
+ rgb_matrix_enable_noeeprom();
+}
+
diff --git a/keyboards/hfdkb/monsgeek/m1/mcuconf.h b/keyboards/hfdkb/monsgeek/m1/mcuconf.h
new file mode 100644
index 000000000000..0d16f4f04e46
--- /dev/null
+++ b/keyboards/hfdkb/monsgeek/m1/mcuconf.h
@@ -0,0 +1,24 @@
+/* Copyright (C) 2022 jonylee@hfd
+ *
+ * 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 .
+ */
+#pragma once
+
+#include_next
+
+#undef WB32_SPI_USE_QSPI
+#define WB32_SPI_USE_QSPI TRUE
+
+#undef WB32_I2C_USE_I2C1
+#define WB32_I2C_USE_I2C1 TRUE
diff --git a/keyboards/hfdkb/monsgeek/m1/rgb_matrix_user.inc b/keyboards/hfdkb/monsgeek/m1/rgb_matrix_user.inc
new file mode 100644
index 000000000000..56e2bd31cbbd
--- /dev/null
+++ b/keyboards/hfdkb/monsgeek/m1/rgb_matrix_user.inc
@@ -0,0 +1,51 @@
+// !!! DO NOT ADD #pragma once !!! //
+
+// Step 1.
+// Declare custom effects using the RGB_MATRIX_EFFECT macro
+// (note the lack of semicolon after the macro!)
+
+RGB_MATRIX_EFFECT(turn_off_rgb)
+RGB_MATRIX_EFFECT(kb_reset_rgb)
+
+// Step 2.
+// Define effects inside the `RGB_MATRIX_CUSTOM_EFFECT_IMPLS` ifdef block
+
+#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+// e.g: A simple effect, self-contained within a single method
+static bool turn_off_rgb(effect_params_t *params) {
+ RGB_MATRIX_USE_LIMITS(led_min, led_max);
+ for (uint8_t i = led_min; i < led_max; i++) {
+ rgb_matrix_set_color(i, 0x00, 0x00, 0x00);
+ }
+ return rgb_matrix_check_finished_leds(led_max);
+}
+
+// e.g: A more complex effect, relying on external methods and state, with
+// dedicated init and run methods
+static uint8_t some_global_state;
+static void kb_reset_rgb_init(effect_params_t* params) {
+ some_global_state = 0;
+}
+static bool kb_reset_rgb_run(effect_params_t* params) {
+ RGB_MATRIX_USE_LIMITS(led_min, led_max);
+ some_global_state++;
+ if(some_global_state&0x01){
+ for (uint8_t i = led_min; i < led_max; i++)
+ rgb_matrix_set_color(i, 0, 0, 0);
+ }
+ else{
+ for (uint8_t i = led_min; i < led_max; i++)
+ rgb_matrix_set_color(i, 0xc0, 0xc0, 0xc0);
+ }
+ if(some_global_state>=7)
+ rgb_matrix_init();
+ return rgb_matrix_check_finished_leds(led_max);
+}
+
+static bool kb_reset_rgb(effect_params_t* params) {
+ if (params->init) kb_reset_rgb_init(params);
+ return kb_reset_rgb_run(params);
+}
+
+#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
diff --git a/keyboards/hfdkb/monsgeek/m1/rules.mk b/keyboards/hfdkb/monsgeek/m1/rules.mk
new file mode 100644
index 000000000000..c92be12c7776
--- /dev/null
+++ b/keyboards/hfdkb/monsgeek/m1/rules.mk
@@ -0,0 +1,28 @@
+# MCU name
+MCU = WB32FQ95
+
+# Bootloader selection
+BOOTLOADER = wb32-dfu
+
+# 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
+KEYBOARD_SHARED_EP = no
+NKRO_ENABLE = yes # Enable N-Key Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
+AUDIO_ENABLE = no # Audio output
+ENCODER_ENABLE = yes
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = IS31FL3733
+EEPROM_DRIVER = wear_leveling
+WEAR_LEVELING_DRIVER = spi_flash
+#RGB_MATRIX_CUSTOM_USER = yes #Add turnoff LED
+
+SRC += matrix.c
+
From 10be40ba075c90359a02bff2d54476734125bc7d Mon Sep 17 00:00:00 2001
From: jonylee1986 <2532487686@qq.com>
Date: Fri, 10 Feb 2023 12:09:02 +0800
Subject: [PATCH 15/79] Modify something from qmk/qmk_firmware suggested
---
keyboards/hfdkb/ac001/ac001.h | 2 +-
keyboards/hfdkb/ac001/config.h | 30 +------------------
keyboards/hfdkb/ac001/info.json | 3 ++
keyboards/hfdkb/ac001/keymaps/via/config.h | 2 --
keyboards/hfdkb/ac001/rules.mk | 6 ----
keyboards/hfdkb/keyboard_sw/mk47/config.h | 12 ++++----
keyboards/hfdkb/keyboard_sw/mk47/info.json | 2 ++
.../keyboard_sw/mk47/keymaps/via/config.h | 2 --
keyboards/hfdkb/keyboard_sw/mk47/rules.mk | 6 ----
keyboards/hfdkb/monsgeek/m1/config.h | 10 -------
keyboards/hfdkb/monsgeek/m1/info.json | 2 ++
.../hfdkb/monsgeek/m1/keymaps/via/config.h | 2 --
keyboards/hfdkb/monsgeek/m1/rules.mk | 6 ----
13 files changed, 14 insertions(+), 71 deletions(-)
diff --git a/keyboards/hfdkb/ac001/ac001.h b/keyboards/hfdkb/ac001/ac001.h
index 870c23132198..0758584ee8eb 100644
--- a/keyboards/hfdkb/ac001/ac001.h
+++ b/keyboards/hfdkb/ac001/ac001.h
@@ -21,6 +21,6 @@
#define LAYOUT( \
K000, K001, K002, K003, K004 \
) { \
- { K000, K001, K002, KC_NO, KC_NO } \
+ { K000, K001, K002, K003, K004 } \
}
// clang-format on
diff --git a/keyboards/hfdkb/ac001/config.h b/keyboards/hfdkb/ac001/config.h
index c13922c97fcb..cc5f2aec5427 100644
--- a/keyboards/hfdkb/ac001/config.h
+++ b/keyboards/hfdkb/ac001/config.h
@@ -15,35 +15,18 @@
*/
#pragma once
-
-#include "config_common.h"
-
-/* Force NKRO on boot up regardless of the setting saved in the EEPROM (uncomment to enable it) */
- #define FORCE_NKRO
-
-/* key matrix size */
-#define MATRIX_ROWS 1
-#define MATRIX_COLS 5
-
/* key matrix pins */
#define MATRIX_ROW_PINS { B15}
#define MATRIX_COL_PINS { A5, A6, A7, C4, C5}
-#define UNUSED_PINS
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION ROW2COL
-/* Hold ESC on start up to clear EEPROM and boot into bootloader mode */
-#define BOOTMAGIC_LITE_ROW 0
-#define BOOTMAGIC_LITE_COLUMN 0
-
#define TAP_CODE_DELAY 5
/* ws2812 RGB LED */
#define RGB_DI_PIN A1
-#define DRIVER_LED_TOTAL 5
-#define RGBLED_NUM 5 // Number of LEDs
-#define NOP_FUDGE 0.4
+#define RGB_MATRIX_LED_COUNT 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
@@ -118,16 +101,5 @@
//#define ENABLE_RGB_MATRIX_SOLID_SPLASH
//#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
-/* Send up to 4 key press events per scan */
-#define QMK_KEYS_PER_SCAN 4
-
-#define RGBLIGHT_HUE_STEP 8
-#define RGBLIGHT_SAT_STEP 8
-#define RGBLIGHT_VAL_STEP 8
-#define RGBLIGHT_LIMIT_VAL 180 /* The maximum brightness level */
-
-/* Set debounce time to 1ms */
-#define DEBOUNCE 5
-
#define USB_SUSPEND_WAKEUP_DELAY 1500 //Wakeup host USB
diff --git a/keyboards/hfdkb/ac001/info.json b/keyboards/hfdkb/ac001/info.json
index 57f87a1f67fa..2b42c7a2cb73 100644
--- a/keyboards/hfdkb/ac001/info.json
+++ b/keyboards/hfdkb/ac001/info.json
@@ -8,6 +8,9 @@
"pid": "0x0001",
"device_version": "0.0.1"
},
+ "processor": "WB32FQ95",
+ "bootloader": "wb32-dfu",
+
"layouts": {
"LAYOUT": {
"layout": [
diff --git a/keyboards/hfdkb/ac001/keymaps/via/config.h b/keyboards/hfdkb/ac001/keymaps/via/config.h
index 72f334e41c39..e10be51cb015 100644
--- a/keyboards/hfdkb/ac001/keymaps/via/config.h
+++ b/keyboards/hfdkb/ac001/keymaps/via/config.h
@@ -16,6 +16,4 @@
#pragma once
-#include "config_common.h"
-
#define STM32_USB_USE_OTG1 TRUE
diff --git a/keyboards/hfdkb/ac001/rules.mk b/keyboards/hfdkb/ac001/rules.mk
index ccbbb2e9a472..225d64175597 100644
--- a/keyboards/hfdkb/ac001/rules.mk
+++ b/keyboards/hfdkb/ac001/rules.mk
@@ -1,9 +1,3 @@
-# MCU name
-MCU = WB32FQ95
-
-# Bootloader selection
-BOOTLOADER = wb32-dfu
-
# Build Options
# change yes to no to disable
#
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/config.h b/keyboards/hfdkb/keyboard_sw/mk47/config.h
index ad1df5c186ce..a3218aee5e69 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/config.h
+++ b/keyboards/hfdkb/keyboard_sw/mk47/config.h
@@ -16,14 +16,12 @@
#pragma once
-#include "config_common.h"
-
/* Force NKRO on boot up regardless of the setting saved in the EEPROM (uncomment to enable it) */
#define FORCE_NKRO
-/* key matrix size */
-#define MATRIX_ROWS 4
-#define MATRIX_COLS 12
+// /* key matrix size */
+// #define MATRIX_ROWS 4
+// #define MATRIX_COLS 12
/* key matrix pins */
#define MATRIX_ROW_PINS { C6, C7, C8, C9 }
@@ -127,6 +125,6 @@
#define RGB_MATRIX_SPD_STEP 52
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 250 /* The maximum brightness level */
-/* Set debounce time to 1ms */
-#define DEBOUNCE 5
+// /* Set debounce time to 1ms */
+// #define DEBOUNCE 5
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/info.json b/keyboards/hfdkb/keyboard_sw/mk47/info.json
index 1633779e6af1..5a969bef8e54 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/info.json
+++ b/keyboards/hfdkb/keyboard_sw/mk47/info.json
@@ -7,6 +7,8 @@
"pid": "0x0002",
"device_version": "0.0.1"
},
+ "processor": "WB32FQ95",
+ "bootloader": "wb32-dfu",
"layouts": {
"LAYOUT": {
"layout": [
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/keymaps/via/config.h b/keyboards/hfdkb/keyboard_sw/mk47/keymaps/via/config.h
index 5a9ae66052b3..82174d29ca79 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/keymaps/via/config.h
+++ b/keyboards/hfdkb/keyboard_sw/mk47/keymaps/via/config.h
@@ -16,6 +16,4 @@
#pragma once
-#include "config_common.h"
-
#define USB_ENDPOINTS_ARE_REORDERABLE
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/rules.mk b/keyboards/hfdkb/keyboard_sw/mk47/rules.mk
index 7f64d52769d6..8ef0a53f4c69 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/rules.mk
+++ b/keyboards/hfdkb/keyboard_sw/mk47/rules.mk
@@ -1,9 +1,3 @@
-# MCU name
-MCU = WB32FQ95
-
-# Bootloader selection
-BOOTLOADER = wb32-dfu
-
# Build Options
# change yes to no to disable
#
diff --git a/keyboards/hfdkb/monsgeek/m1/config.h b/keyboards/hfdkb/monsgeek/m1/config.h
index 9064eaed4a5e..59f1206a21f9 100644
--- a/keyboards/hfdkb/monsgeek/m1/config.h
+++ b/keyboards/hfdkb/monsgeek/m1/config.h
@@ -16,8 +16,6 @@
#pragma once
-#include "config_common.h"
-
/* Use 5 dynamic keymap layers */
#define DYNAMIC_KEYMAP_LAYER_COUNT 6
@@ -25,9 +23,6 @@
/* Force NKRO on boot up regardless of the setting saved in the EEPROM (uncomment to enable it) */
#define FORCE_NKRO
-/* key matrix size */
-#define MATRIX_ROWS 6
-#define MATRIX_COLS 16
/* key matrix pins */
#define MATRIX_ROW_PINS {B15, C6, C7, C8, C9, A8}
@@ -45,9 +40,6 @@
#define ENCODER_RESOLUTION 2
#define TAP_CODE_DELAY 20
-/* Hold ESC on start up to clear EEPROM and boot into bootloader mode */
-#define BOOTMAGIC_LITE_ROW 0
-#define BOOTMAGIC_LITE_COLUMN 0
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
@@ -140,6 +132,4 @@
#define RGB_MATRIX_SPD_STEP 62
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 /* The maximum brightness level */
-/* Set debounce time to 1ms */
-#define DEBOUNCE 5
diff --git a/keyboards/hfdkb/monsgeek/m1/info.json b/keyboards/hfdkb/monsgeek/m1/info.json
index 6712a3eea39d..53052038bc93 100644
--- a/keyboards/hfdkb/monsgeek/m1/info.json
+++ b/keyboards/hfdkb/monsgeek/m1/info.json
@@ -7,6 +7,8 @@
"pid": "0x0005",
"device_version": "1.1.0"
},
+ "processor": "WB32FQ95",
+ "bootloader": "wb32-dfu",
"layouts": {
"LAYOUT": {
"layout": [
diff --git a/keyboards/hfdkb/monsgeek/m1/keymaps/via/config.h b/keyboards/hfdkb/monsgeek/m1/keymaps/via/config.h
index 5a9ae66052b3..82174d29ca79 100644
--- a/keyboards/hfdkb/monsgeek/m1/keymaps/via/config.h
+++ b/keyboards/hfdkb/monsgeek/m1/keymaps/via/config.h
@@ -16,6 +16,4 @@
#pragma once
-#include "config_common.h"
-
#define USB_ENDPOINTS_ARE_REORDERABLE
diff --git a/keyboards/hfdkb/monsgeek/m1/rules.mk b/keyboards/hfdkb/monsgeek/m1/rules.mk
index c92be12c7776..0eaa1e24c633 100644
--- a/keyboards/hfdkb/monsgeek/m1/rules.mk
+++ b/keyboards/hfdkb/monsgeek/m1/rules.mk
@@ -1,9 +1,3 @@
-# MCU name
-MCU = WB32FQ95
-
-# Bootloader selection
-BOOTLOADER = wb32-dfu
-
# Build Options
# change yes to no to disable
#
From 995f7ee39944245fa29c78874b645dc3cec06e1f Mon Sep 17 00:00:00 2001
From: jonylee1986 <2532487686@qq.com>
Date: Fri, 10 Feb 2023 15:09:26 +0800
Subject: [PATCH 16/79] Update mk47/mcuconf.h
---
keyboards/hfdkb/keyboard_sw/mk47/mcuconf.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/mcuconf.h b/keyboards/hfdkb/keyboard_sw/mk47/mcuconf.h
index 0d16f4f04e46..bebb786824a1 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/mcuconf.h
+++ b/keyboards/hfdkb/keyboard_sw/mk47/mcuconf.h
@@ -20,5 +20,3 @@
#undef WB32_SPI_USE_QSPI
#define WB32_SPI_USE_QSPI TRUE
-#undef WB32_I2C_USE_I2C1
-#define WB32_I2C_USE_I2C1 TRUE
From ae36f0c65d9ebb720e1a01a332682e37d88df81b Mon Sep 17 00:00:00 2001
From: jonylee1986 <2532487686@qq.com>
Date: Fri, 10 Feb 2023 15:10:43 +0800
Subject: [PATCH 17/79] Deleted ac001 keybaord
---
keyboards/hfdkb/ac001/ac001.c | 36 -
keyboards/hfdkb/ac001/ac001.h | 26 -
keyboards/hfdkb/ac001/config.h | 105 ---
keyboards/hfdkb/ac001/halconf.h | 23 -
keyboards/hfdkb/ac001/info.json | 24 -
.../hfdkb/ac001/keymaps/default/keymap.c | 29 -
keyboards/hfdkb/ac001/keymaps/via/config.h | 19 -
keyboards/hfdkb/ac001/keymaps/via/keymap.c | 29 -
keyboards/hfdkb/ac001/keymaps/via/rules.mk | 1 -
keyboards/hfdkb/ac001/mcuconf.h | 24 -
keyboards/hfdkb/ac001/rules.mk | 20 -
keyboards/hfdkb/ac001/src/eeprom_flash.c | 692 ------------------
12 files changed, 1028 deletions(-)
delete mode 100644 keyboards/hfdkb/ac001/ac001.c
delete mode 100644 keyboards/hfdkb/ac001/ac001.h
delete mode 100644 keyboards/hfdkb/ac001/config.h
delete mode 100644 keyboards/hfdkb/ac001/halconf.h
delete mode 100644 keyboards/hfdkb/ac001/info.json
delete mode 100644 keyboards/hfdkb/ac001/keymaps/default/keymap.c
delete mode 100644 keyboards/hfdkb/ac001/keymaps/via/config.h
delete mode 100644 keyboards/hfdkb/ac001/keymaps/via/keymap.c
delete mode 100644 keyboards/hfdkb/ac001/keymaps/via/rules.mk
delete mode 100644 keyboards/hfdkb/ac001/mcuconf.h
delete mode 100644 keyboards/hfdkb/ac001/rules.mk
delete mode 100644 keyboards/hfdkb/ac001/src/eeprom_flash.c
diff --git a/keyboards/hfdkb/ac001/ac001.c b/keyboards/hfdkb/ac001/ac001.c
deleted file mode 100644
index a977f9c80da0..000000000000
--- a/keyboards/hfdkb/ac001/ac001.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Copyright (C) 2022 jonylee@hfd
- *
- * 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 .
- */
-
-#include "ac001.h"
-/*
- 3---------------2
- | | |
- | | |
- 4-------0-------1
-*/
-#ifdef RGB_MATRIX_ENABLE
-led_config_t g_led_config = { {
- // Key Matrix to LED Index
- { 0, 1, 2, 3, 4}
-}, {
- // LED Index to Physical Position
- { 64, 112 }, { 64, 224 }, { 224, 0 }, { 0, 0 }, { 64, 0 },
-
-}, {
- // LED Index to Flag
- 4, 4, 4, 4, 4
-} };
-#endif
diff --git a/keyboards/hfdkb/ac001/ac001.h b/keyboards/hfdkb/ac001/ac001.h
deleted file mode 100644
index 0758584ee8eb..000000000000
--- a/keyboards/hfdkb/ac001/ac001.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Copyright (C) 2022 jonylee@hfd
- *
- * 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 .
- */
-
-#pragma once
-
-#include "quantum.h"
-
-#define LAYOUT( \
- K000, K001, K002, K003, K004 \
-) { \
- { K000, K001, K002, K003, K004 } \
-}
-// clang-format on
diff --git a/keyboards/hfdkb/ac001/config.h b/keyboards/hfdkb/ac001/config.h
deleted file mode 100644
index cc5f2aec5427..000000000000
--- a/keyboards/hfdkb/ac001/config.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/* Copyright (C) 2022 Westberry Technology (ChangZhou) Corp., Ltd
- *
- * 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 .
- */
-
-#pragma once
-/* key matrix pins */
-#define MATRIX_ROW_PINS { B15}
-#define MATRIX_COL_PINS { A5, A6, A7, C4, C5}
-
-/* COL2ROW or ROW2COL */
-#define DIODE_DIRECTION ROW2COL
-
-#define TAP_CODE_DELAY 5
-
-/* ws2812 RGB LED */
-#define RGB_DI_PIN A1
-#define RGB_MATRIX_LED_COUNT 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
-
-/* SPI Config for spi flash*/
-#define SPI_DRIVER SPIDQ
-#define SPI_SCK_PIN B3
-#define SPI_MOSI_PIN B5
-#define SPI_MISO_PIN B4
-#define SPI_MOSI_PAL_MODE 5
-
-#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12
-#define EXTERNAL_FLASH_SIZE (8 * 1024)
-#define EEPROM_SIZE EXTERNAL_FLASH_SIZE
-
-#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
-#define RGB_MATRIX_CENTER {112,32}
-
-#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
-#define RGB_MATRIX_KEYPRESSES
-#define RGB_MATRIX_KEYRELEASES
-
-// RGB Matrix Animation modes. Explicitly enabled
-// For full list of effects, see:
-// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
-// #define ENABLE_RGB_MATRIX_ALPHAS_MODS
-// #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
-// #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
-#define ENABLE_RGB_MATRIX_BREATHING
-// #define ENABLE_RGB_MATRIX_BAND_SAT
-// #define ENABLE_RGB_MATRIX_BAND_VAL
-// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
-// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
-// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
-// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
-#define ENABLE_RGB_MATRIX_CYCLE_ALL
-#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
-//#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
-#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
-//#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
-//#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
-//#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
-//#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
-//#define ENABLE_RGB_MATRIX_DUAL_BEACON
-//#define ENABLE_RGB_MATRIX_RAINBOW_BEACON
-// #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
-//#define ENABLE_RGB_MATRIX_RAINDROPS
-// #define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
-// #define ENABLE_RGB_MATRIX_HUE_BREATHING
-// #define ENABLE_RGB_MATRIX_HUE_PENDULUM
-// #define ENABLE_RGB_MATRIX_HUE_WAVE
-// #define ENABLE_RGB_MATRIX_PIXEL_RAIN
-// #define ENABLE_RGB_MATRIX_PIXEL_FLOW
-// #define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
-// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined
-//#define ENABLE_RGB_MATRIX_TYPING_HEATMAP
-//#define ENABLE_RGB_MATRIX_DIGITAL_RAIN
-// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined
-//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
-//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE
-//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
-//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
-//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
-//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
-//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
-//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
-//#define ENABLE_RGB_MATRIX_SPLASH
-#define ENABLE_RGB_MATRIX_MULTISPLASH
-//#define ENABLE_RGB_MATRIX_SOLID_SPLASH
-//#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
-
-#define USB_SUSPEND_WAKEUP_DELAY 1500 //Wakeup host USB
-
diff --git a/keyboards/hfdkb/ac001/halconf.h b/keyboards/hfdkb/ac001/halconf.h
deleted file mode 100644
index 5179ebf43ab8..000000000000
--- a/keyboards/hfdkb/ac001/halconf.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/* Copyright (C) 2022 Westberry Technology (ChangZhou) Corp., Ltd
- *
- * 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 .
- */
-#pragma once
-
-#define HAL_USE_I2C TRUE
-#define HAL_USE_SPI TRUE
-#define SPI_USE_WAIT TRUE
-#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
-
-#include_next
diff --git a/keyboards/hfdkb/ac001/info.json b/keyboards/hfdkb/ac001/info.json
deleted file mode 100644
index 2b42c7a2cb73..000000000000
--- a/keyboards/hfdkb/ac001/info.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
- "keyboard_name": "ac001",
- "manufacturer": "hfd",
- "url": "",
- "maintainer": "jonylee@hfd",
- "usb": {
- "vid": "0xFFFE",
- "pid": "0x0001",
- "device_version": "0.0.1"
- },
- "processor": "WB32FQ95",
- "bootloader": "wb32-dfu",
-
- "layouts": {
- "LAYOUT": {
- "layout": [
- {"label":"~", "x":0, "y":0},
- {"label":"!", "x":1, "y":0},
- {"label":"3", "x":2, "y":0},
- {"label":"4", "x":3, "y":0},
- {"label":"@", "x":4, "y":0}]
- }
- }
-}
diff --git a/keyboards/hfdkb/ac001/keymaps/default/keymap.c b/keyboards/hfdkb/ac001/keymaps/default/keymap.c
deleted file mode 100644
index 72b9720d5cd9..000000000000
--- a/keyboards/hfdkb/ac001/keymaps/default/keymap.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Copyright (C) 2022 jonylee@hfd
- *
- * 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 .
- */
-
-#include QMK_KEYBOARD_H
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [0] = LAYOUT( /* Base */
- RGB_MOD, KC_LCTL, KC_ENT,KC_NO,KC_NO),
- [1] = LAYOUT(
- RGB_MOD, KC_LCTL, KC_ENT,KC_NO,KC_NO),
- [2] = LAYOUT(
- RGB_MOD, KC_LCTL, KC_ENT,KC_NO,KC_NO),
- [3] = LAYOUT(
- RGB_MOD, KC_LCTL, KC_ENT,KC_NO,KC_NO)
-};
-
diff --git a/keyboards/hfdkb/ac001/keymaps/via/config.h b/keyboards/hfdkb/ac001/keymaps/via/config.h
deleted file mode 100644
index e10be51cb015..000000000000
--- a/keyboards/hfdkb/ac001/keymaps/via/config.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright (C) 2022 jonylee@hfd
- *
- * 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 .
- */
-
-#pragma once
-
-#define STM32_USB_USE_OTG1 TRUE
diff --git a/keyboards/hfdkb/ac001/keymaps/via/keymap.c b/keyboards/hfdkb/ac001/keymaps/via/keymap.c
deleted file mode 100644
index 72b9720d5cd9..000000000000
--- a/keyboards/hfdkb/ac001/keymaps/via/keymap.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Copyright (C) 2022 jonylee@hfd
- *
- * 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 .
- */
-
-#include QMK_KEYBOARD_H
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [0] = LAYOUT( /* Base */
- RGB_MOD, KC_LCTL, KC_ENT,KC_NO,KC_NO),
- [1] = LAYOUT(
- RGB_MOD, KC_LCTL, KC_ENT,KC_NO,KC_NO),
- [2] = LAYOUT(
- RGB_MOD, KC_LCTL, KC_ENT,KC_NO,KC_NO),
- [3] = LAYOUT(
- RGB_MOD, KC_LCTL, KC_ENT,KC_NO,KC_NO)
-};
-
diff --git a/keyboards/hfdkb/ac001/keymaps/via/rules.mk b/keyboards/hfdkb/ac001/keymaps/via/rules.mk
deleted file mode 100644
index 1e5b99807cb7..000000000000
--- a/keyboards/hfdkb/ac001/keymaps/via/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-VIA_ENABLE = yes
diff --git a/keyboards/hfdkb/ac001/mcuconf.h b/keyboards/hfdkb/ac001/mcuconf.h
deleted file mode 100644
index 0d16f4f04e46..000000000000
--- a/keyboards/hfdkb/ac001/mcuconf.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/* Copyright (C) 2022 jonylee@hfd
- *
- * 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 .
- */
-#pragma once
-
-#include_next
-
-#undef WB32_SPI_USE_QSPI
-#define WB32_SPI_USE_QSPI TRUE
-
-#undef WB32_I2C_USE_I2C1
-#define WB32_I2C_USE_I2C1 TRUE
diff --git a/keyboards/hfdkb/ac001/rules.mk b/keyboards/hfdkb/ac001/rules.mk
deleted file mode 100644
index 225d64175597..000000000000
--- a/keyboards/hfdkb/ac001/rules.mk
+++ /dev/null
@@ -1,20 +0,0 @@
-# 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 = yes # Enable N-Key Rollover
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
-RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
-RGB_MATRIX_ENABLE = yes
-RGB_MATRIX_DRIVER = WS2812
-AUDIO_ENABLE = no # Audio output
-ENCODER_ENABLE = no
-FLASH_DRIVER = spi # Enable SPI flash
-EEPROM_DRIVER = custom # Enable SPI flash memory
-
-QUANTUM_LIB_SRC += spi_master.c
-SRC += src/eeprom_flash.c
diff --git a/keyboards/hfdkb/ac001/src/eeprom_flash.c b/keyboards/hfdkb/ac001/src/eeprom_flash.c
deleted file mode 100644
index 0c35e08e5398..000000000000
--- a/keyboards/hfdkb/ac001/src/eeprom_flash.c
+++ /dev/null
@@ -1,692 +0,0 @@
-/* Copyright (C) 2022 jonylee@hfd
- *
- * 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 .
-*/
-
-#include
-#include
-#include "util.h"
-#include "debug.h"
-#include "wait.h"
-#include "timer.h"
-#include "eeprom.h"
-#include "flash_spi.h"
-
-/*
- * We emulate eeprom by writing a snapshot compacted view of eeprom contents,
- * followed by a write log of any change since that snapshot:
- *
- * === SIMULATED EEPROM CONTENTS ===
- *
- * ┌─ Compacted ┬ Write Log ─┐
- * │............│[BYTE][BYTE]│
- * │FFFF....FFFF│[WRD0][WRD1]│
- * │FFFFFFFFFFFF│[WORD][NEXT]│
- * │....FFFFFFFF│[BYTE][WRD0]│
- * ├────────────┼────────────┤
- * └──PAGE_BASE │ │
- * PAGE_LAST─┴─WRITE_BASE │
- * WRITE_LAST ┘
- *
- * Compacted contents are the 1's complement of the actual EEPROM contents.
- * e.g. An 'FFFF' represents a '0000' value.
- *
- * The size of the 'compacted' area is equal to the size of the 'emulated' eeprom.
- * The size of the compacted-area and write log are configurable, and the combined
- * size of Compacted + WriteLog is a multiple EXTERNAL_FLASH_PAGE_SIZE, which is MCU dependent.
- * Simulated Eeprom contents are located at the end of available flash space.
- *
- * The following configuration defines can be set:
- *
- * EXTERNAL_FLASH_PAGE_COUNT # Total number of pages to use for eeprom simulation (Compact + Write log)
- * FEE_DENSITY_BYTES # Size of simulated eeprom. (Defaults to half the space allocated by EXTERNAL_FLASH_PAGE_COUNT)
- * NOTE: The current implementation does not include page swapping,
- * and FEE_DENSITY_BYTES will consume that amount of RAM as a cached view of actual EEPROM contents.
- *
- * The maximum size of FEE_DENSITY_BYTES is currently 16384. The write log size equals
- * EXTERNAL_FLASH_PAGE_COUNT * EXTERNAL_FLASH_PAGE_SIZE - FEE_DENSITY_BYTES.
- * The larger the write log, the less frequently the compacted area needs to be rewritten.
- *
- *
- * *** General Algorithm ***
- *
- * During initialization:
- * The contents of the Compacted-flash area are loaded and the 1's complement value
- * is cached into memory (e.g. 0xFFFF in Flash represents 0x0000 in cache).
- * Write log entries are processed until a 0xFFFF is reached.
- * Each log entry updates a byte or word in the cache.
- *
- * During reads:
- * EEPROM contents are given back directly from the cache in memory.
- *
- * During writes:
- * The contents of the cache is updated first.
- * If the Compacted-flash area corresponding to the write address is unprogrammed, the 1's complement of the value is written directly into Compacted-flash
- * Otherwise:
- * If the write log is full, erase both the Compacted-flash area and the Write log, then write cached contents to the Compacted-flash area.
- * Otherwise a Write log entry is constructed and appended to the next free position in the Write log.
- *
- *
- * *** Write Log Structure ***
- *
- * Write log entries allow for optimized byte writes to addresses below 128. Writing 0 or 1 words are also optimized when word-aligned.
- *
- * === WRITE LOG ENTRY FORMATS ===
- *
- * ╔═══ Byte-Entry ══╗
- * ║0XXXXXXX║YYYYYYYY║
- * ║ └──┬──┘║└──┬───┘║
- * ║ Address║ Value ║
- * ╚════════╩════════╝
- * 0 <= Address < 0x80 (128)
- *
- * ╔ Word-Encoded 0 ╗
- * ║100XXXXXXXXXXXXX║
- * ║ │└─────┬─────┘║
- * ║ │Address >> 1 ║
- * ║ └── Value: 0 ║
- * ╚════════════════╝
- * 0 <= Address <= 0x3FFE (16382)
- *
- * ╔ Word-Encoded 1 ╗
- * ║101XXXXXXXXXXXXX║
- * ║ │└─────┬─────┘║
- * ║ │Address >> 1 ║
- * ║ └── Value: 1 ║
- * ╚════════════════╝
- * 0 <= Address <= 0x3FFE (16382)
- *
- * ╔═══ Reserved ═══╗
- * ║110XXXXXXXXXXXXX║
- * ╚════════════════╝
- *
- * ╔═══════════ Word-Next ═══════════╗
- * ║111XXXXXXXXXXXXX║YYYYYYYYYYYYYYYY║
- * ║ └─────┬─────┘║└───────┬──────┘║
- * ║(Address-128)>>1║ ~Value ║
- * ╚════════════════╩════════════════╝
- * ( 0 <= Address < 0x0080 (128): Reserved)
- * 0x80 <= Address <= 0x3FFE (16382)
- *
- * Write Log entry ranges:
- * 0x0000 ... 0x7FFF - Byte-Entry; address is (Entry & 0x7F00) >> 4; value is (Entry & 0xFF)
- * 0x8000 ... 0x9FFF - Word-Encoded 0; address is (Entry & 0x1FFF) << 1; value is 0
- * 0xA000 ... 0xBFFF - Word-Encoded 1; address is (Entry & 0x1FFF) << 1; value is 1
- * 0xC000 ... 0xDFFF - Reserved
- * 0xE000 ... 0xFFBF - Word-Next; address is (Entry & 0x1FFF) << 1 + 0x80; value is ~(Next_Entry)
- * 0xFFC0 ... 0xFFFE - Reserved
- * 0xFFFF - Unprogrammed
- *
- */
-
-/* These bits are used for optimizing encoding of bytes, 0 and 1 */
-#define FEE_WORD_ENCODING 0x8000
-#define FEE_VALUE_NEXT 0x6000
-#define FEE_VALUE_RESERVED 0x4000
-#define FEE_VALUE_ENCODED 0x2000
-#define FEE_BYTE_RANGE 0x80
-
-/* Addressable range 16KByte: 0 <-> (0x1FFF << 1) */
-#define FEE_ADDRESS_MAX_SIZE 0x4000
-
-/* Flash word value after erase */
-#define FEE_EMPTY_WORD ((uint16_t)0xFFFF)
-
-/* Size of combined compacted eeprom and write log pages */
-#define FEE_DENSITY_MAX_SIZE (EXTERNAL_FLASH_PAGE_COUNT * EXTERNAL_FLASH_PAGE_SIZE)
-
-#ifndef EXTERNAL_FLASH_SIZE_IGNORE_CHECK /* *TODO: Get rid of this check */
-# if FEE_DENSITY_MAX_SIZE > (EXTERNAL_FLASH_SIZE * 1024)
-# pragma message STR(FEE_DENSITY_MAX_SIZE) " > " STR(EXTERNAL_FLASH_SIZE * 1024)
-# error emulated eeprom: FEE_DENSITY_MAX_SIZE is greater than available flash size
-# endif
-#endif
-
-/* Size of emulated eeprom */
-#ifdef FEE_DENSITY_BYTES
-# if (FEE_DENSITY_BYTES > FEE_DENSITY_MAX_SIZE)
-# pragma message STR(FEE_DENSITY_BYTES) " > " STR(FEE_DENSITY_MAX_SIZE)
-# error emulated eeprom: FEE_DENSITY_BYTES exceeds FEE_DENSITY_MAX_SIZE
-# endif
-# if (FEE_DENSITY_BYTES == FEE_DENSITY_MAX_SIZE)
-# pragma message STR(FEE_DENSITY_BYTES) " == " STR(FEE_DENSITY_MAX_SIZE)
-# warning emulated eeprom: FEE_DENSITY_BYTES leaves no room for a write log. This will greatly increase the flash wear rate!
-# endif
-# if FEE_DENSITY_BYTES > FEE_ADDRESS_MAX_SIZE
-# pragma message STR(FEE_DENSITY_BYTES) " > " STR(FEE_ADDRESS_MAX_SIZE)
-# error emulated eeprom: FEE_DENSITY_BYTES is greater than FEE_ADDRESS_MAX_SIZE allows
-# endif
-# if ((FEE_DENSITY_BYTES) % 2) == 1
-# error emulated eeprom: FEE_DENSITY_BYTES must be even
-# endif
-#else
-/* Default to half of allocated space used for emulated eeprom, half for write log */
-# define FEE_DENSITY_BYTES (EXTERNAL_FLASH_PAGE_COUNT * (EXTERNAL_FLASH_PAGE_SIZE >> 1))
-#endif
-
-/* Size of write log */
-#ifdef FEE_WRITE_LOG_BYTES
-# if ((FEE_DENSITY_BYTES + FEE_WRITE_LOG_BYTES) > FEE_DENSITY_MAX_SIZE)
-# pragma message STR(FEE_DENSITY_BYTES) " + " STR(FEE_WRITE_LOG_BYTES) " > " STR(FEE_DENSITY_MAX_SIZE)
-# error emulated eeprom: FEE_WRITE_LOG_BYTES exceeds remaining FEE_DENSITY_MAX_SIZE
-# endif
-# if ((FEE_WRITE_LOG_BYTES) % 2) == 1
-# error emulated eeprom: FEE_WRITE_LOG_BYTES must be even
-# endif
-#else
-/* Default to use all remaining space */
-# define FEE_WRITE_LOG_BYTES (EXTERNAL_FLASH_PAGE_COUNT * EXTERNAL_FLASH_PAGE_SIZE - FEE_DENSITY_BYTES)
-#endif
-
-#define EXTERNAL_FLASH_PAGE_BASE_ADDRESS 0
-/* Start of the emulated eeprom compacted flash area */
-#define FEE_COMPACTED_BASE_ADDRESS EXTERNAL_FLASH_PAGE_BASE_ADDRESS
-/* End of the emulated eeprom compacted flash area */
-#define FEE_COMPACTED_LAST_ADDRESS (FEE_COMPACTED_BASE_ADDRESS + FEE_DENSITY_BYTES)
-/* Start of the emulated eeprom write log */
-#define FEE_WRITE_LOG_BASE_ADDRESS FEE_COMPACTED_LAST_ADDRESS
-/* End of the emulated eeprom write log */
-#define FEE_WRITE_LOG_LAST_ADDRESS (FEE_WRITE_LOG_BASE_ADDRESS + FEE_WRITE_LOG_BYTES)
-
-#if defined(DYNAMIC_KEYMAP_EEPROM_MAX_ADDR) && (DYNAMIC_KEYMAP_EEPROM_MAX_ADDR >= FEE_DENSITY_BYTES)
-# error emulated eeprom: DYNAMIC_KEYMAP_EEPROM_MAX_ADDR is greater than the FEE_DENSITY_BYTES available
-#endif
-
-/* In-memory contents of emulated eeprom for faster access */
-/* *TODO: Implement page swapping */
-uint16_t WordBuf[FEE_DENSITY_BYTES / 2] = {0xFFFF};
-static uint8_t *DataBuf = (uint8_t *)WordBuf;
-
-/* Pointer to the first available slot within the write log */
-static uint16_t *empty_slot;
-
-#define DEBUG_EEPROM_OUTPUT
-
-/*
- * Debug print utils
- */
-
-#if defined(DEBUG_EEPROM_OUTPUT)
-
-# define debug_eeprom debug_enable
-# define eeprom_println(s) println(s)
-# define eeprom_printf(fmt, ...) dprintf(fmt, ##__VA_ARGS__)
-
-#else /* NO_DEBUG */
-
-# define debug_eeprom false
-# define eeprom_println(s)
-# define eeprom_printf(fmt, ...)
-
-#endif /* NO_DEBUG */
-
-void print_eeprom(void) {
-#ifndef NO_DEBUG
- int empty_rows = 0;
- for (uint16_t i = 0; i < FEE_DENSITY_BYTES; i++) {
- if (i % 16 == 0) {
- if (i >= FEE_DENSITY_BYTES - 16) {
- /* Make sure we display the last row */
- empty_rows = 0;
- }
- /* Check if this row is uninitialized */
- ++empty_rows;
- for (uint16_t j = 0; j < 16; j++) {
- if (DataBuf[i + j]) {
- empty_rows = 0;
- break;
- }
- }
- if (empty_rows > 1) {
- /* Repeat empty row */
- if (empty_rows == 2) {
- /* Only display the first repeat empty row */
- println("*");
- }
- i += 15;
- continue;
- }
- xprintf("%04x", i);
- }
- if (i % 8 == 0) print(" ");
-
- xprintf(" %02x", DataBuf[i]);
- if ((i + 1) % 16 == 0) {
- println("");
- }
- }
-#endif
-}
-
-static flash_status_t external_flash_program_half_word(uint32_t addr, uint16_t value) {
- uint8_t *src = (uint8_t *)&value;
-
- return flash_write_block(addr, src, 2);
-}
-
-static uint32_t EEPROM_Init(void) {
- /* Load emulated eeprom contents from compacted flash into memory */
- uint32_t src = (uint32_t)FEE_COMPACTED_BASE_ADDRESS;
- uint16_t *dest = (uint16_t *)DataBuf;
-
- flash_read_block(src, (uint8_t *)dest, FEE_COMPACTED_LAST_ADDRESS - FEE_COMPACTED_BASE_ADDRESS);
-
- for (int i = 0; i < ((FEE_COMPACTED_LAST_ADDRESS - FEE_COMPACTED_BASE_ADDRESS) >> 1); i++, ++dest) {
- *dest = ~*dest;
- }
-
- if (debug_eeprom) {
- println("EEPROM_Init Compacted Pages:");
- print_eeprom();
- println("EEPROM_Init Write Log:");
- }
-
- /* Replay write log */
- uint16_t *log_addr;
- for (log_addr = (uint16_t *)FEE_WRITE_LOG_BASE_ADDRESS; log_addr < (uint16_t *)FEE_WRITE_LOG_LAST_ADDRESS; ++log_addr) {
- uint16_t address;
-
- flash_read_block((uint32_t)log_addr, (uint8_t *)&address, 0x02);
- if (address == FEE_EMPTY_WORD) {
- break;
- }
- /* Check for lowest 128-bytes optimization */
- if (!(address & FEE_WORD_ENCODING)) {
- uint8_t bvalue = (uint8_t)address;
- address >>= 8;
- DataBuf[address] = bvalue;
- eeprom_printf("DataBuf[0x%02x] = 0x%02x;\n", address, bvalue);
- } else {
- uint16_t wvalue;
-
- /* Check if value is in next word */
- if ((address & FEE_VALUE_NEXT) == FEE_VALUE_NEXT) {
- /* Read value from next word */
- if (++log_addr >= (uint16_t *)FEE_WRITE_LOG_LAST_ADDRESS) {
- break;
- }
- flash_read_block((uint32_t)log_addr, (uint8_t *)&wvalue, 0x02);
- wvalue = ~wvalue;
- if (!wvalue) {
- eeprom_printf("Incomplete write at log_addr: 0x%04x;\n", (uint32_t)log_addr);
- /* Possibly incomplete write. Ignore and continue */
- continue;
- }
- address &= 0x1FFF;
- address <<= 1;
- /* Writes to addresses less than 128 are byte log entries */
- address += FEE_BYTE_RANGE;
- } else {
- /* Reserved for future use */
- if (address & FEE_VALUE_RESERVED) {
- eeprom_printf("Reserved encoded value at log_addr: 0x%04x;\n", (uint32_t)log_addr);
- continue;
- }
-
- /* Optimization for 0 or 1 values. */
- wvalue = (address & FEE_VALUE_ENCODED) >> 13;
- address &= 0x1FFF;
- address <<= 1;
- }
- if (address < FEE_DENSITY_BYTES) {
- eeprom_printf("DataBuf[0x%04x] = 0x%04x;\n", address, wvalue);
- *(uint16_t *)(&DataBuf[address]) = wvalue;
- } else {
- eeprom_printf("DataBuf[0x%04x] cannot be set to 0x%04x [BAD ADDRESS]\n", address, wvalue);
- }
- }
- }
-
- empty_slot = log_addr;
-
- if (debug_eeprom) {
- println("EEPROM_Init Final DataBuf:");
- print_eeprom();
- }
-
- return (uint32_t)FEE_DENSITY_BYTES;
-}
-
-/* Clear flash contents (doesn't touch in-memory DataBuf) */
-static void eeprom_clear(void) {
- uint32_t erase_addr = EXTERNAL_FLASH_PAGE_BASE_ADDRESS;
-
- for ( ; erase_addr < (uint32_t)(EXTERNAL_FLASH_SIZE);) {
-
- if (erase_addr % ((uint32_t)(EXTERNAL_FLASH_SECTOR_SIZE)) != 0) {
- eeprom_printf("The external Flash address to be erased is incorrect: 0x%08x\n", (uint32_t)erase_addr);
- break;
- }
- flash_erase_sector(erase_addr);
- erase_addr += (uint32_t)(EXTERNAL_FLASH_SECTOR_SIZE);
- }
-
- empty_slot = (uint16_t *)FEE_WRITE_LOG_BASE_ADDRESS;
- eeprom_printf("eeprom_clear empty_slot: 0x%08x\n", (uint32_t)empty_slot);
-}
-
-/* Erase emulated eeprom */
-void EEPROM_Erase(void) {
- eeprom_println("EEPROM_Erase");
- /* Erase compacted pages and write log */
- eeprom_clear();
- /* re-initialize to reset DataBuf */
- EEPROM_Init();
-}
-
-/* Compact write log */
-static uint8_t eeprom_compact(void) {
- /* Erase compacted pages and write log */
- eeprom_clear();
-
- flash_status_t final_status = FLASH_STATUS_SUCCESS;
-
- /* Write emulated eeprom contents from memory to compacted flash */
- uint16_t *src = (uint16_t *)DataBuf;
- uintptr_t dest = FEE_COMPACTED_BASE_ADDRESS;
- uint16_t value;
- for (; dest < FEE_COMPACTED_LAST_ADDRESS; ++src, dest += 2) {
- value = *src;
- if (value) {
- eeprom_printf("external_flash_program_half_word(0x%04x, 0x%04x)\n", (uint32_t)dest, ~value);
- flash_status_t status = external_flash_program_half_word(dest, ~value);
- if (status != FLASH_STATUS_SUCCESS) final_status = status;
- }
- }
-
- if (debug_eeprom) {
- println("eeprom_compacted:");
- print_eeprom();
- }
-
- return final_status;
-}
-
-static uint8_t eeprom_write_direct_entry(uint16_t Address) {
- /* Check if we can just write this directly to the compacted flash area */
- uint32_t directAddress = FEE_COMPACTED_BASE_ADDRESS + (Address & 0xFFFE);
- uint16_t wvalue;
-
- flash_read_block(directAddress, (uint8_t *)&wvalue, 0x02);
- if (wvalue == FEE_EMPTY_WORD) {
- /* Write the value directly to the compacted area without a log entry */
- wvalue = ~*(uint16_t *)(&DataBuf[Address & 0xFFFE]);
-
- /* Early exit if a write isn't needed */
- if (wvalue == FEE_EMPTY_WORD) return FLASH_STATUS_SUCCESS;
-
- eeprom_printf("external_flash_program_half_word(0x%08x, 0x%04x) [DIRECT]\n", directAddress, wvalue);
- flash_status_t status = external_flash_program_half_word(directAddress, wvalue);
-
- return status;
- }
- return 0;
-}
-
-static uint8_t eeprom_write_log_word_entry(uint16_t Address) {
- flash_status_t final_status = FLASH_STATUS_SUCCESS;
-
- uint16_t value = *(uint16_t *)(&DataBuf[Address]);
- eeprom_printf("eeprom_write_log_word_entry(0x%04x): 0x%04x\n", Address, value);
-
- /* MSB signifies the lowest 128-byte optimization is not in effect */
- uint16_t encoding = FEE_WORD_ENCODING;
- uint8_t entry_size;
- if (value <= 1) {
- encoding |= value << 13;
- entry_size = 2;
- } else {
- encoding |= FEE_VALUE_NEXT;
- entry_size = 4;
- /* Writes to addresses less than 128 are byte log entries */
- Address -= FEE_BYTE_RANGE;
- }
-
- /* if we can't find an empty spot, we must compact emulated eeprom */
- if (empty_slot > (uint16_t *)(FEE_WRITE_LOG_LAST_ADDRESS - entry_size)) {
- /* compact the write log into the compacted flash area */
- return eeprom_compact();
- }
-
- /* Word log writes should be word-aligned. Take back a bit */
- Address >>= 1;
- Address |= encoding;
-
- /* ok we found a place let's write our data */
-
- /* address */
- eeprom_printf("external_flash_program_half_word(0x%08x, 0x%04x)\n", (uint32_t)empty_slot, Address);
- final_status = external_flash_program_half_word((uintptr_t)empty_slot++, Address);
-
- /* value */
- if (encoding == (FEE_WORD_ENCODING | FEE_VALUE_NEXT)) {
- eeprom_printf("external_flash_program_half_word(0x%08x, 0x%04x)\n", (uint32_t)empty_slot, ~value);
- flash_status_t status = external_flash_program_half_word((uintptr_t)empty_slot++, ~value);
- if (status != FLASH_STATUS_SUCCESS) final_status = status;
- }
-
- return final_status;
-}
-
-static uint8_t eeprom_write_log_byte_entry(uint16_t Address) {
- eeprom_printf("eeprom_write_log_byte_entry(0x%04x): 0x%02x\n", Address, DataBuf[Address]);
-
- /* if couldn't find an empty spot, we must compact emulated eeprom */
- if (empty_slot >= (uint16_t *)FEE_WRITE_LOG_LAST_ADDRESS) {
- /* compact the write log into the compacted flash area */
- return eeprom_compact();
- }
-
- /* ok we found a place let's write our data */
-
- /* Pack address and value into the same word */
- uint16_t value = (Address << 8) | DataBuf[Address];
-
- /* write to flash */
- eeprom_printf("external_flash_program_half_word(0x%08x, 0x%04x)\n", (uint32_t)empty_slot, value);
- flash_status_t status = external_flash_program_half_word((uintptr_t)empty_slot++, value);
-
- return status;
-}
-
-flash_status_t EEPROM_WriteDataByte(uint16_t Address, uint8_t DataByte) {
- /* if the address is out-of-bounds, do nothing */
- if (Address >= FEE_DENSITY_BYTES) {
- eeprom_printf("EEPROM_WriteDataByte(0x%04x, 0x%02x) [BAD ADDRESS]\n", Address, DataByte);
- return FLASH_STATUS_BAD_ADDRESS;
- }
-
- /* if the value is the same, don't bother writing it */
- if (DataBuf[Address] == DataByte) {
- eeprom_printf("EEPROM_WriteDataByte(0x%04x, 0x%02x) [SKIP SAME]\n", Address, DataByte);
- return FLASH_STATUS_SUCCESS;
- }
-
- /* keep DataBuf cache in sync */
- DataBuf[Address] = DataByte;
- eeprom_printf("EEPROM_WriteDataByte DataBuf[0x%04x] = 0x%02x\n", Address, DataBuf[Address]);
-
- /* perform the write into flash memory */
- /* First, attempt to write directly into the compacted flash area */
- flash_status_t status = eeprom_write_direct_entry(Address);
- if (!status) {
- /* Otherwise append to the write log */
- if (Address < FEE_BYTE_RANGE) {
- status = eeprom_write_log_byte_entry(Address);
- } else {
- status = eeprom_write_log_word_entry(Address & 0xFFFE);
- }
- }
- if (status != 0 && status != FLASH_STATUS_SUCCESS) {
- eeprom_printf("EEPROM_WriteDataByte [STATUS == %d]\n", status);
- }
- return status;
-}
-
-flash_status_t EEPROM_WriteDataWord(uint16_t Address, uint16_t DataWord) {
- /* if the address is out-of-bounds, do nothing */
- if (Address >= FEE_DENSITY_BYTES) {
- eeprom_printf("EEPROM_WriteDataWord(0x%04x, 0x%04x) [BAD ADDRESS]\n", Address, DataWord);
- return FLASH_STATUS_BAD_ADDRESS;
- }
-
- /* Check for word alignment */
- flash_status_t final_status = FLASH_STATUS_SUCCESS;
- if (Address % 2) {
- final_status = EEPROM_WriteDataByte(Address, DataWord);
- flash_status_t status = EEPROM_WriteDataByte(Address + 1, DataWord >> 8);
- if (status != FLASH_STATUS_SUCCESS) final_status = status;
- if (final_status != 0 && final_status != FLASH_STATUS_SUCCESS) {
- eeprom_printf("EEPROM_WriteDataWord [STATUS == %d]\n", final_status);
- }
- return final_status;
- }
-
- /* if the value is the same, don't bother writing it */
- uint16_t oldValue = *(uint16_t *)(&DataBuf[Address]);
- if (oldValue == DataWord) {
- eeprom_printf("EEPROM_WriteDataWord(0x%04x, 0x%04x) [SKIP SAME]\n", Address, DataWord);
- return FLASH_STATUS_SUCCESS;
- }
-
- /* keep DataBuf cache in sync */
- *(uint16_t *)(&DataBuf[Address]) = DataWord;
- eeprom_printf("EEPROM_WriteDataWord DataBuf[0x%04x] = 0x%04x\n", Address, *(uint16_t *)(&DataBuf[Address]));
-
- /* perform the write into flash memory */
- /* First, attempt to write directly into the compacted flash area */
- final_status = eeprom_write_direct_entry(Address);
- if (!final_status) {
- /* Otherwise append to the write log */
- /* Check if we need to fall back to byte write */
- if (Address < FEE_BYTE_RANGE) {
- final_status = FLASH_STATUS_SUCCESS;
- /* Only write a byte if it has changed */
- if ((uint8_t)oldValue != (uint8_t)DataWord) {
- final_status = eeprom_write_log_byte_entry(Address);
- }
- flash_status_t status = FLASH_STATUS_SUCCESS;
- /* Only write a byte if it has changed */
- if ((oldValue >> 8) != (DataWord >> 8)) {
- status = eeprom_write_log_byte_entry(Address + 1);
- }
- if (status != FLASH_STATUS_SUCCESS) final_status = status;
- } else {
- final_status = eeprom_write_log_word_entry(Address);
- }
- }
- if (final_status != 0 && final_status != FLASH_STATUS_SUCCESS) {
- eeprom_printf("EEPROM_WriteDataWord [STATUS == %d]\n", final_status);
- }
- return final_status;
-}
-
-uint8_t EEPROM_ReadDataByte(uint16_t Address) {
- uint8_t DataByte = 0xFF;
-
- if (Address < FEE_DENSITY_BYTES) {
- DataByte = DataBuf[Address];
- }
-
- eeprom_printf("EEPROM_ReadDataByte(0x%04x): 0x%02x\n", Address, DataByte);
-
- return DataByte;
-}
-
-uint16_t EEPROM_ReadDataWord(uint16_t Address) {
- uint16_t DataWord = 0xFFFF;
-
- if (Address < FEE_DENSITY_BYTES - 1) {
- /* Check word alignment */
- if (Address % 2) {
- DataWord = DataBuf[Address] | (DataBuf[Address + 1] << 8);
- } else {
- DataWord = *(uint16_t *)(&DataBuf[Address]);
- }
- }
-
- eeprom_printf("EEPROM_ReadDataWord(0x%04x): 0x%04x\n", Address, DataWord);
-
- return DataWord;
-}
-
-/*****************************************************************************
- * Bind to eeprom_driver.c
- *******************************************************************************/
-void eeprom_driver_init(void) {
- flash_init();
- EEPROM_Init();
-}
-
-void eeprom_driver_erase(void) { EEPROM_Erase(); }
-
-void eeprom_read_block(void *buf, const void *addr, size_t len) {
- const uint8_t *src = (const uint8_t *)addr;
- uint8_t * dest = (uint8_t *)buf;
-
- /* Check word alignment */
- if (len && (uintptr_t)src % 2) {
- /* Read the unaligned first byte */
- *dest++ = EEPROM_ReadDataByte((const uintptr_t)src++);
- --len;
- }
-
- uint16_t value;
- bool aligned = ((uintptr_t)dest % 2 == 0);
- while (len > 1) {
- value = EEPROM_ReadDataWord((const uintptr_t)((uint16_t *)src));
- if (aligned) {
- *(uint16_t *)dest = value;
- dest += 2;
- } else {
- *dest++ = value;
- *dest++ = value >> 8;
- }
- src += 2;
- len -= 2;
- }
- if (len) {
- *dest = EEPROM_ReadDataByte((const uintptr_t)src);
- }
-}
-
-void eeprom_write_block(const void *buf, void *addr, size_t len) {
- uint8_t * dest = (uint8_t *)addr;
- const uint8_t *src = (const uint8_t *)buf;
-
- /* Check word alignment */
- if (len && (uintptr_t)dest % 2) {
- /* Write the unaligned first byte */
- EEPROM_WriteDataByte((uintptr_t)dest++, *src++);
- --len;
- }
-
- uint16_t value;
- bool aligned = ((uintptr_t)src % 2 == 0);
- while (len > 1) {
- if (aligned) {
- value = *(uint16_t *)src;
- } else {
- value = *(uint8_t *)src | (*(uint8_t *)(src + 1) << 8);
- }
- EEPROM_WriteDataWord((uintptr_t)((uint16_t *)dest), value);
- dest += 2;
- src += 2;
- len -= 2;
- }
-
- if (len) {
- EEPROM_WriteDataByte((uintptr_t)dest, *src);
- }
-}
From a18a794282acfa48ba24e4dc95ad023463423154 Mon Sep 17 00:00:00 2001
From: jonylee1986 <2532487686@qq.com>
Date: Fri, 10 Feb 2023 15:43:45 +0800
Subject: [PATCH 18/79] Deleted m1 keyboard
---
keyboards/hfdkb/monsgeek/m1/config.h | 135 ---------
keyboards/hfdkb/monsgeek/m1/halconf.h | 23 --
keyboards/hfdkb/monsgeek/m1/info.json | 108 -------
.../monsgeek/m1/keymaps/default/config.h | 21 --
.../monsgeek/m1/keymaps/default/keymap.c | 139 ---------
.../hfdkb/monsgeek/m1/keymaps/via/config.h | 19 --
.../hfdkb/monsgeek/m1/keymaps/via/keymap.c | 181 -----------
.../hfdkb/monsgeek/m1/keymaps/via/rules.mk | 2 -
keyboards/hfdkb/monsgeek/m1/m1.c | 283 -----------------
keyboards/hfdkb/monsgeek/m1/m1.h | 39 ---
keyboards/hfdkb/monsgeek/m1/matrix.c | 284 ------------------
keyboards/hfdkb/monsgeek/m1/mcuconf.h | 24 --
.../hfdkb/monsgeek/m1/rgb_matrix_user.inc | 51 ----
keyboards/hfdkb/monsgeek/m1/rules.mk | 22 --
14 files changed, 1331 deletions(-)
delete mode 100644 keyboards/hfdkb/monsgeek/m1/config.h
delete mode 100644 keyboards/hfdkb/monsgeek/m1/halconf.h
delete mode 100644 keyboards/hfdkb/monsgeek/m1/info.json
delete mode 100644 keyboards/hfdkb/monsgeek/m1/keymaps/default/config.h
delete mode 100644 keyboards/hfdkb/monsgeek/m1/keymaps/default/keymap.c
delete mode 100644 keyboards/hfdkb/monsgeek/m1/keymaps/via/config.h
delete mode 100644 keyboards/hfdkb/monsgeek/m1/keymaps/via/keymap.c
delete mode 100644 keyboards/hfdkb/monsgeek/m1/keymaps/via/rules.mk
delete mode 100644 keyboards/hfdkb/monsgeek/m1/m1.c
delete mode 100644 keyboards/hfdkb/monsgeek/m1/m1.h
delete mode 100644 keyboards/hfdkb/monsgeek/m1/matrix.c
delete mode 100644 keyboards/hfdkb/monsgeek/m1/mcuconf.h
delete mode 100644 keyboards/hfdkb/monsgeek/m1/rgb_matrix_user.inc
delete mode 100644 keyboards/hfdkb/monsgeek/m1/rules.mk
diff --git a/keyboards/hfdkb/monsgeek/m1/config.h b/keyboards/hfdkb/monsgeek/m1/config.h
deleted file mode 100644
index 59f1206a21f9..000000000000
--- a/keyboards/hfdkb/monsgeek/m1/config.h
+++ /dev/null
@@ -1,135 +0,0 @@
-/* Copyright (C) 2022 jonylee@hfd
- *
- * 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 .
- */
-
-#pragma once
-
-/* Use 5 dynamic keymap layers */
-#define DYNAMIC_KEYMAP_LAYER_COUNT 6
-
-#define RGB_TRIGGER_ON_KEYDOWN
-/* Force NKRO on boot up regardless of the setting saved in the EEPROM (uncomment to enable it) */
- #define FORCE_NKRO
-
-
-/* key matrix pins */
-#define MATRIX_ROW_PINS {B15, C6, C7, C8, C9, A8}
-#define MATRIX_COL_PINS { C1, C2, C3, A0, A1, A2, A3, A4, A5, A6, A7, C4, C5, B0, B1, B2}
-
-/* COL2ROW or ROW2COL */
-#define DIODE_DIRECTION ROW2COL
-
-/* encode pins */
-
-#define ENCODERS_PAD_A { B14 }
-#define ENCODERS_PAD_B { B13 }
-
-/* encoder resolution */
-#define ENCODER_RESOLUTION 2
-#define TAP_CODE_DELAY 20
-
-
-/* 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
-
-/* SPI Config for spi flash*/
-#define SPI_DRIVER SPIDQ
-#define SPI_SCK_PIN B3
-#define SPI_MOSI_PIN B5
-#define SPI_MISO_PIN B4
-#define SPI_MOSI_PAL_MODE 5
-
-#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12
-#define WEAR_LEVELING_BACKING_SIZE (8 * 1024)
-
-/* I2C Config for LED Driver */
-#define DRIVER_COUNT 2
-#define DRIVER_ADDR_1 0b1110100
-#define DRIVER_ADDR_2 0b1110111
-#define I2C1_SDA_PIN B7
-#define I2C1_SCL_PIN B6
-#define I2C1_SCL_PAL_MODE 4
-#define I2C1_OPMODE OPMODE_I2C
-#define I2C1_CLOCK_SPEED 400000 /* 400000 */
-
-#define DRIVER_1_LED_TOTAL 63
-#define DRIVER_2_LED_TOTAL 21
-#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL+22)
-
-#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
-#define RGB_MATRIX_CENTER {112,32}
-
-#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
-#define RGB_MATRIX_KEYPRESSES
-#define RGB_MATRIX_KEYRELEASES
-
-// RGB Matrix Animation modes. Explicitly enabled
-// For full list of effects, see:
-// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
-// #define ENABLE_RGB_MATRIX_ALPHAS_MODS
-// #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
-// #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
-#define ENABLE_RGB_MATRIX_BREATHING
-// #define ENABLE_RGB_MATRIX_BAND_SAT
-// #define ENABLE_RGB_MATRIX_BAND_VAL
-// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
-// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
-// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
-// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
-#define ENABLE_RGB_MATRIX_CYCLE_ALL
-#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
-#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
-#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
-#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
-#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
-#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
-#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
-#define ENABLE_RGB_MATRIX_DUAL_BEACON
-#define ENABLE_RGB_MATRIX_RAINBOW_BEACON
-// #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
-#define ENABLE_RGB_MATRIX_RAINDROPS
-// #define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
-// #define ENABLE_RGB_MATRIX_HUE_BREATHING
-// #define ENABLE_RGB_MATRIX_HUE_PENDULUM
-// #define ENABLE_RGB_MATRIX_HUE_WAVE
-// #define ENABLE_RGB_MATRIX_PIXEL_RAIN
-// #define ENABLE_RGB_MATRIX_PIXEL_FLOW
-// #define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
-// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined
-#define ENABLE_RGB_MATRIX_TYPING_HEATMAP
-//#define ENABLE_RGB_MATRIX_DIGITAL_RAIN
-// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE
-//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
-//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
-//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
-//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
-//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
-//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
-//#define ENABLE_RGB_MATRIX_SPLASH
-#define ENABLE_RGB_MATRIX_MULTISPLASH
-//#define ENABLE_RGB_MATRIX_SOLID_SPLASH
-//#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
-
-#define RGB_MATRIX_HUE_STEP 62
-#define RGB_MATRIX_SAT_STEP 62
-#define RGB_MATRIX_VAL_STEP 50
-#define RGB_MATRIX_SPD_STEP 62
-#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 /* The maximum brightness level */
-
-
diff --git a/keyboards/hfdkb/monsgeek/m1/halconf.h b/keyboards/hfdkb/monsgeek/m1/halconf.h
deleted file mode 100644
index 2f64e65393a5..000000000000
--- a/keyboards/hfdkb/monsgeek/m1/halconf.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/* Copyright (C) 2022 jonylee@hfd
- *
- * 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 .
- */
-#pragma once
-
-#define HAL_USE_I2C TRUE
-#define HAL_USE_SPI TRUE
-#define SPI_USE_WAIT TRUE
-#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
-
-#include_next
diff --git a/keyboards/hfdkb/monsgeek/m1/info.json b/keyboards/hfdkb/monsgeek/m1/info.json
deleted file mode 100644
index 53052038bc93..000000000000
--- a/keyboards/hfdkb/monsgeek/m1/info.json
+++ /dev/null
@@ -1,108 +0,0 @@
-{
- "keyboard_name": "MonsGeek Keyboard",
- "manufacturer": "www.hfd.cn",
- "maintainer": "hfd",
- "usb": {
- "vid": "0xFFFE",
- "pid": "0x0005",
- "device_version": "1.1.0"
- },
- "processor": "WB32FQ95",
- "bootloader": "wb32-dfu",
- "layouts": {
- "LAYOUT": {
- "layout": [
- { "label": "Esc", "x": 0, "y": 0 },
- { "label": "F1", "x": 2, "y": 0 },
- { "label": "F2", "x": 3, "y": 0 },
- { "label": "F3", "x": 4, "y": 0 },
- { "label": "F4", "x": 5, "y": 0 },
- { "label": "F5", "x": 6.5, "y": 0 },
- { "label": "F6", "x": 7.5, "y": 0 },
- { "label": "F7", "x": 8.5, "y": 0 },
- { "label": "F8", "x": 9.5, "y": 0 },
- { "label": "F9", "x": 11, "y": 0 },
- { "label": "F10", "x": 12, "y": 0 },
- { "label": "F11", "x": 13, "y": 0 },
- { "label": "F12", "x": 14, "y": 0 },
- { "label": "PrtSc", "x": 15.25, "y": 0 },
- { "label": "PrtSc", "x": 15.25, "y": 0 },
-
- { "label": "~", "x": 0, "y": 1.25 },
- { "label": "!", "x": 1, "y": 1.25 },
- { "label": "@", "x": 2, "y": 1.25 },
- { "label": "#", "x": 3, "y": 1.25 },
- { "label": "$", "x": 4, "y": 1.25 },
- { "label": "%", "x": 5, "y": 1.25 },
- { "label": "^", "x": 6, "y": 1.25 },
- { "label": "&", "x": 7, "y": 1.25 },
- { "label": "*", "x": 8, "y": 1.25 },
- { "label": "(", "x": 9, "y": 1.25 },
- { "label": ")", "x": 10, "y": 1.25 },
- { "label": "_", "x": 11, "y": 1.25 },
- { "label": "+", "x": 12, "y": 1.25 },
- { "label": "Bksp", "x": 14, "y": 1.25 },
- { "label": "Insert", "x": 15.25, "y": 1.25 },
-
- { "label": "Tab", "x": 0, "y": 2.25, "w": 1.5 },
- { "label": "Q", "x": 1.5, "y": 2.25 },
- { "label": "W", "x": 2.5, "y": 2.25 },
- { "label": "E", "x": 3.5, "y": 2.25 },
- { "label": "R", "x": 4.5, "y": 2.25 },
- { "label": "T", "x": 5.5, "y": 2.25 },
- { "label": "Y", "x": 6.5, "y": 2.25 },
- { "label": "U", "x": 7.5, "y": 2.25 },
- { "label": "I", "x": 8.5, "y": 2.25 },
- { "label": "O", "x": 9.5, "y": 2.25 },
- { "label": "P", "x": 10.5, "y": 2.25 },
- { "label": "{", "x": 11.5, "y": 2.25 },
- { "label": "}", "x": 12.5, "y": 2.25 },
- { "label": "|", "x": 13.5, "y": 2.25, "w": 1.5 },
- { "label": "Delete", "x": 15.25, "y": 2.25 },
-
- { "label": "Caps Lock", "x": 0, "y": 3.25, "w": 1.75 },
- { "label": "A", "x": 1.75, "y": 3.25 },
- { "label": "S", "x": 2.75, "y": 3.25 },
- { "label": "D", "x": 3.75, "y": 3.25 },
- { "label": "F", "x": 4.75, "y": 3.25 },
- { "label": "G", "x": 5.75, "y": 3.25 },
- { "label": "H", "x": 6.75, "y": 3.25 },
- { "label": "J", "x": 7.75, "y": 3.25 },
- { "label": "K", "x": 8.75, "y": 3.25 },
- { "label": "L", "x": 9.75, "y": 3.25 },
- { "label": ":", "x": 10.75, "y": 3.25 },
- { "label": "\"", "x": 11.75, "y": 3.25 },
- { "label": ":", "x": 10.75, "y": 3.25 },
- { "label": "Enter", "x": 13.75, "y": 3.25, "w": 1.25 },
- { "label": "End", "x": 16.25, "y": 2.25 },
-
- { "label": "Shift", "x": 0, "y": 4.25, "w": 1.25 },
- { "label": "Z", "x": 2.25, "y": 4.25 },
- { "label": "X", "x": 3.25, "y": 4.25 },
- { "label": "C", "x": 4.25, "y": 4.25 },
- { "label": "V", "x": 5.25, "y": 4.25 },
- { "label": "B", "x": 6.25, "y": 4.25 },
- { "label": "N", "x": 7.25, "y": 4.25 },
- { "label": "M", "x": 8.25, "y": 4.25 },
- { "label": "<", "x": 9.25, "y": 4.25 },
- { "label": ">", "x": 10.25, "y": 4.25 },
- { "label": "?", "x": 11.25, "y": 4.25 },
- { "label": ":", "x": 10.75, "y": 3.25 },
- { "label": "Shift", "x": 12.25, "y": 4.25, "w": 1.75 },
- { "label": "Up", "x": 16.25, "y": 4.25 },
- { "label": "Up", "x": 16.25, "y": 4.25 },
-
- { "label": "Ctrl", "x": 0, "y": 5.25, "w": 1.25 },
- { "label": "Win", "x": 1.25, "y": 5.25, "w": 1.25 },
- { "label": "Alt", "x": 2.5, "y": 5.25, "w": 1.25 },
- { "label": "Space", "x": 3.75, "y": 5.25, "w": 6.25 },
- { "label": "Alt", "x": 10, "y": 5.25, "w": 1.25 },
- { "label": "Menu", "x": 12.5, "y": 5.25, "w": 1.25 },
- { "label": "Ctrl", "x": 13.75, "y": 5.25, "w": 1.25 },
- { "label": "Left", "x": 15.25, "y": 5.25 },
- { "label": "Down", "x": 16.25, "y": 5.25 },
- { "label": "Right", "x": 17.25, "y": 5.25 }
- ]
- }
- }
-}
diff --git a/keyboards/hfdkb/monsgeek/m1/keymaps/default/config.h b/keyboards/hfdkb/monsgeek/m1/keymaps/default/config.h
deleted file mode 100644
index 5a9ae66052b3..000000000000
--- a/keyboards/hfdkb/monsgeek/m1/keymaps/default/config.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* Copyright (C) 2022 jonylee@hfd
- *
- * 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 .
- */
-
-#pragma once
-
-#include "config_common.h"
-
-#define USB_ENDPOINTS_ARE_REORDERABLE
diff --git a/keyboards/hfdkb/monsgeek/m1/keymaps/default/keymap.c b/keyboards/hfdkb/monsgeek/m1/keymaps/default/keymap.c
deleted file mode 100644
index ed8c41ab9f04..000000000000
--- a/keyboards/hfdkb/monsgeek/m1/keymaps/default/keymap.c
+++ /dev/null
@@ -1,139 +0,0 @@
-/* Copyright (C) 2022 jonylee@hfd
- *
- * 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 .
- */
-
-#include QMK_KEYBOARD_H
-
-static uint16_t map_current_time = 0;
-static bool pwron_flag = false;
-
-enum __layers {
- WIN_B,
- WIN_WASD,
- WIN_FN,
- MAC_B,
- MAC_WASD,
- MAC_FN
-};
-enum custom_keycodes {
- KC_MISSION_CONTROL = SAFE_RANGE,
- KC_LAUNCHPAD,
- KC_RESET
-};
-
-#define KC_TASK LGUI(KC_TAB)
-#define KC_FLXP LGUI(KC_E)
-#define KC_MCTL KC_MISSION_CONTROL
-#define KC_LPAD KC_LAUNCHPAD
-
-// clang-format off
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
- [WIN_B] = LAYOUT( /* Base */
- KC_ESC, 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_DEL, KC_MUTE,
- KC_GRV, 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_HOME,
- 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_BSLS, KC_PGUP,
- KC_CAPS, 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_PGDN,
- 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_END,
- KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(WIN_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
-
- [WIN_WASD] = LAYOUT( /* Base */
- KC_ESC, 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_DEL, KC_MUTE,
- KC_GRV, 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_HOME,
- KC_TAB, KC_Q, KC_UP, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
- KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
- 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_W, KC_END,
- KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(WIN_FN), KC_RCTL, KC_A, KC_S, KC_D),
-
-
- [WIN_FN] = LAYOUT( /* FN */
- KC_ESC, KC_MYCM, KC_MAIL, KC_WSCH, KC_WHOM,KC_MSEL,KC_MPLY,KC_MPRV,KC_MNXT,KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, RGB_MOD,
- KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, RGB_SPD, RGB_SPI, KC_BSPC, KC_HOME,
- KC_TAB, KC_Q, TG(WIN_WASD), KC_E, KC_R, KC_T, KC_Y, KC_U, KC_INS, TO(MAC_B), KC_PSCR, KC_LBRC, KC_RBRC, RGB_MOD, KC_PGUP,
- KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, RGB_TOG, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
- KC_LSFT, KC_Z, KC_X, KC_CALC, KC_V, KC_B, KC_N, KC_MUTE, KC_VOLD,KC_VOLU, KC_SLSH, KC_RSFT, RGB_VAI, KC_END,
- KC_LCTL, MAGIC_TOGGLE_GUI, KC_LALT, KC_SPC, KC_RALT, MO(WIN_FN), KC_RCTL, RGB_SAD, RGB_VAD, RGB_SAI),
-
- [MAC_B] = LAYOUT( /* Base */
- KC_ESC, 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_DEL, KC_MUTE,
- KC_GRV, 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_HOME,
- 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_BSLS, KC_PGUP,
- KC_CAPS, 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_PGDN,
- 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_END,
- KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(MAC_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
-
- [MAC_WASD] = LAYOUT( /* Base */
- KC_ESC, 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_DEL, KC_MUTE,
- KC_GRV, 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_HOME,
- KC_TAB, KC_Q, KC_UP, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
- KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
- 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_W, KC_END,
- KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(MAC_FN), KC_RCTL, KC_A, KC_S, KC_D),
-
- [MAC_FN] = LAYOUT( /* FN */
- KC_ESC, KC_BRID, KC_BRIU, KC_MCTL, KC_LPAD, KC_F5, KC_F6, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_DEL, RGB_MOD,
- KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, RGB_SPD, RGB_SPI, KC_BSPC, KC_HOME,
- KC_TAB, KC_Q, TG(MAC_WASD), KC_E, KC_R, KC_T, KC_Y, KC_U, KC_INS, TO(WIN_B), KC_PSCR, KC_LBRC, KC_RBRC, RGB_MOD, KC_PGUP,
- KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, RGB_TOG, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
- KC_LSFT, KC_Z, KC_X, KC_CALC, KC_V, KC_B, KC_N, KC_MUTE, KC_VOLD,KC_VOLU, KC_SLSH, KC_RSFT, RGB_VAI, KC_END,
- KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(MAC_FN), KC_RCTL, RGB_SAD, RGB_VAD, RGB_SAI)
-};
-// clang-format on
-
-#ifdef RGB_MATRIX_ENABLE
-bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {
- if (!rgb_matrix_indicators_advanced_user(led_min, led_max)) {
- return false;
- }
- if(pwron_flag == false){
- map_current_time = timer_read();
- if(map_current_time<3000){
- map_current_time++;
- for (uint8_t i = led_min; i < led_max; i++) {
- rgb_matrix_set_color(i, 150, 150, 150);
- }
- }
- if(map_current_time >= 3000)
- pwron_flag = true;
- }
-
- else{
- // caps lock cyan
- if (host_keyboard_led_state().caps_lock) {
- RGB_MATRIX_INDICATOR_SET_COLOR(44, 255, 255, 255);
- }
-
- if(keymap_config.no_gui)
- {
- RGB_MATRIX_INDICATOR_SET_COLOR(73, 255, 255, 255);
- }
-
- }
-
- return true;
-}
-#endif
-
-#if defined(ENCODER_MAP_ENABLE)
-const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
- [WIN_B] = { ENCODER_CCW_CW(KC_VOLU, KC_VOLD) },
- [WIN_WASD] = { ENCODER_CCW_CW(KC_VOLU, KC_VOLD) },
- [WIN_FN] = { ENCODER_CCW_CW(RGB_VAI, RGB_VAD) },
- [MAC_B] = { ENCODER_CCW_CW(KC_VOLU, KC_VOLD) },
- [MAC_WASD] = { ENCODER_CCW_CW(KC_VOLU, KC_VOLD) },
- [MAC_FN] = { ENCODER_CCW_CW(RGB_VAI, RGB_VAD) }
-};
-#endif
-
diff --git a/keyboards/hfdkb/monsgeek/m1/keymaps/via/config.h b/keyboards/hfdkb/monsgeek/m1/keymaps/via/config.h
deleted file mode 100644
index 82174d29ca79..000000000000
--- a/keyboards/hfdkb/monsgeek/m1/keymaps/via/config.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright (C) 2022 jonylee@hfd
- *
- * 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 .
- */
-
-#pragma once
-
-#define USB_ENDPOINTS_ARE_REORDERABLE
diff --git a/keyboards/hfdkb/monsgeek/m1/keymaps/via/keymap.c b/keyboards/hfdkb/monsgeek/m1/keymaps/via/keymap.c
deleted file mode 100644
index ad3fa3280dbc..000000000000
--- a/keyboards/hfdkb/monsgeek/m1/keymaps/via/keymap.c
+++ /dev/null
@@ -1,181 +0,0 @@
-/* Copyright (C) 2022 jonylee@hfd
- *
- * 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 .
- */
-
-#include QMK_KEYBOARD_H
-
-static uint16_t map_current_time = 0;
-static bool pwron_flag = false;
-
-enum __layers {
- WIN_B,
- WIN_WASD,
- WIN_FN,
- MAC_B,
- MAC_WASD,
- MAC_FN
-};
-enum custom_keycodes {
- KC_MISSION_CONTROL = SAFE_RANGE,
- KC_LAUNCHPAD,
- KC_RESET
-};
-
-#define KC_TASK LGUI(KC_TAB)
-#define KC_FLXP LGUI(KC_E)
-#define KC_MCTL KC_MISSION_CONTROL
-#define KC_LPAD KC_LAUNCHPAD
-
-// clang-format off
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
- [WIN_B] = LAYOUT( /* Base */
- KC_ESC, 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_DEL, KC_MUTE,
- KC_GRV, 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_HOME,
- 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_BSLS, KC_PGUP,
- KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_PGDN,
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NUBS, KC_RSFT, KC_UP, KC_END,
- KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(WIN_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
-
- [WIN_WASD] = LAYOUT( /* Base */
- KC_ESC, 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_DEL, KC_MUTE,
- KC_GRV, 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_HOME,
- KC_TAB, KC_Q, KC_UP, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
- KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_PGDN,
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NUBS, KC_RSFT, KC_W, KC_END,
- KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(WIN_FN), KC_RCTL, KC_A, KC_S, KC_D),
-
-
- [WIN_FN] = LAYOUT( /* FN */
- KC_ESC, KC_MYCM, KC_MAIL, KC_WSCH, KC_WHOM,KC_MSEL,KC_MPLY,KC_MPRV,KC_MNXT,KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, RGB_MOD,
- KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, RGB_SPD, RGB_SPI, KC_BSPC, KC_HOME,
- KC_TAB, KC_Q, TG(WIN_WASD), KC_E, KC_R, KC_T, KC_Y, KC_U, KC_INS, DF(MAC_B), KC_PSCR, KC_LBRC, KC_RBRC, RGB_MOD, KC_PGUP,
- KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, RGB_TOG, KC_SCLN, KC_QUOT, RGB_MOD, KC_ENT, KC_PGDN,
- KC_LSFT, KC_Z, KC_X, KC_CALC, KC_V, KC_B, KC_N, KC_MUTE, KC_VOLD,KC_VOLU, KC_SLSH, KC_NUBS, KC_RSFT, RGB_VAI, KC_END,
- KC_LCTL, MAGIC_TOGGLE_GUI, KC_LALT, KC_SPC, KC_RALT, MO(WIN_FN), KC_RCTL, RGB_SAD, RGB_VAD, RGB_SAI),
-
- [MAC_B] = LAYOUT( /* Base */
- KC_ESC, KC_BRID, KC_BRIU, KC_MCTL, KC_LPAD, KC_F5, KC_F6, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_DEL, KC_MUTE,
- KC_GRV, 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_HOME,
- 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_BSLS, KC_PGUP,
- KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_PGDN,
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_NUBS, KC_RSFT, KC_UP, KC_END,
- KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(MAC_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
-
- [MAC_WASD] = LAYOUT( /* Base */
- KC_ESC, KC_BRID, KC_BRIU, KC_MCTL, KC_LPAD, KC_F5, KC_F6, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_DEL, KC_MUTE,
- KC_GRV, 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_HOME,
- KC_TAB, KC_Q, KC_UP, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
- KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_PGDN,
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_NUBS, KC_RSFT, KC_W, KC_END,
- KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(MAC_FN), KC_RCTL, KC_A, KC_S, KC_D),
-
- [MAC_FN] = LAYOUT( /* FN */
- KC_ESC, 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_DEL, RGB_MOD,
- KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, RGB_SPD, RGB_SPI, KC_BSPC, KC_HOME,
- KC_TAB, KC_Q, TG(MAC_WASD), KC_E, KC_R, KC_T, KC_Y, KC_U, KC_INS, DF(WIN_B), KC_PSCR, KC_LBRC, KC_RBRC, RGB_MOD, KC_PGUP,
- KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, RGB_TOG, KC_SCLN, KC_QUOT, RGB_MOD, KC_ENT, KC_PGDN,
- KC_LSFT, KC_Z, KC_X, KC_CALC, KC_V, KC_B, KC_N, KC_MUTE, KC_VOLD,KC_VOLU, KC_SLSH, KC_NUBS, KC_RSFT, RGB_VAI, KC_END,
- KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(MAC_FN), KC_RCTL, RGB_SAD, RGB_VAD, RGB_SAI)
-};
-// clang-format on
-
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- switch (keycode) {
- case KC_MISSION_CONTROL:
- if (record->event.pressed) {
- host_consumer_send(0x29F);
- } else {
- host_consumer_send(0);
- }
- return false; // Skip all further processing of this key
- case KC_LAUNCHPAD:
- if (record->event.pressed) {
- host_consumer_send(0x2A0);
- } else {
- host_consumer_send(0);
- }
- return false; // Skip all further processing of this key
-#ifdef VIA_ENABLE
- case KC_RESET: {
- if (record->event.pressed) {
-
- #include "via.h"
- via_eeprom_set_valid(false);
- eeconfig_init_via();
-
- }
- return false;
- }
-#endif
- }
- return true;
-}
-
-#if CONSOLE_ENABLE
-void keyboard_post_init_user(void) {
- // Customise these values to desired behaviour
- debug_enable=true;
-// debug_matrix=true;
-//debug_keyboard=true;
-//debug_mouse=true;
-}
-#endif
-
-#ifdef RGB_MATRIX_ENABLE
-bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {
- if (!rgb_matrix_indicators_advanced_user(led_min, led_max)) {
- return false;
- }
- if(pwron_flag == false){
- map_current_time = timer_read();
- if(map_current_time<3000){
- map_current_time++;
- for (uint8_t i = led_min; i < led_max; i++) {
- rgb_matrix_set_color(i, 150, 150, 150);
- }
- }
- if(map_current_time >= 3000)
- pwron_flag = true;
- }
-
- else{
- // caps lock cyan
- if (host_keyboard_led_state().caps_lock) {
- RGB_MATRIX_INDICATOR_SET_COLOR(44, 255, 255, 255);
- }
-
- if(keymap_config.no_gui)
- {
- RGB_MATRIX_INDICATOR_SET_COLOR(75, 255, 255, 255);
- }
-
- }
-
- return true;
-}
-#endif
-
-#if defined(ENCODER_MAP_ENABLE)
-const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
- [WIN_B] = { ENCODER_CCW_CW(KC_VOLU, KC_VOLD) },
- [WIN_WASD] = { ENCODER_CCW_CW(KC_VOLU, KC_VOLD) },
- [WIN_FN] = { ENCODER_CCW_CW(RGB_VAI, RGB_VAD) },
- [MAC_B] = { ENCODER_CCW_CW(KC_VOLU, KC_VOLD) },
- [MAC_WASD] = { ENCODER_CCW_CW(KC_VOLU, KC_VOLD) },
- [MAC_FN] = { ENCODER_CCW_CW(RGB_VAI, RGB_VAD) }
-};
-#endif
-
diff --git a/keyboards/hfdkb/monsgeek/m1/keymaps/via/rules.mk b/keyboards/hfdkb/monsgeek/m1/keymaps/via/rules.mk
deleted file mode 100644
index 4253f570f0bb..000000000000
--- a/keyboards/hfdkb/monsgeek/m1/keymaps/via/rules.mk
+++ /dev/null
@@ -1,2 +0,0 @@
-VIA_ENABLE = yes
-ENCODER_MAP_ENABLE = yes
\ No newline at end of file
diff --git a/keyboards/hfdkb/monsgeek/m1/m1.c b/keyboards/hfdkb/monsgeek/m1/m1.c
deleted file mode 100644
index ed2e0a7bb957..000000000000
--- a/keyboards/hfdkb/monsgeek/m1/m1.c
+++ /dev/null
@@ -1,283 +0,0 @@
-/* Copyright (C) 2022 jonylee@hfd
- *
- * 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 .
- */
-
-#include "m1.h"
-
-#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
- * driver
- * | R location
- * | | G location
- * | | | B location
- * | | | | */
- {1, A_1, B_1, C_1},
- {1, A_2, B_2, C_2},
- {1, A_3, B_3, C_3},
- {1, A_4, B_4, C_4},
- {1, A_5, B_5, C_5},
- {1, A_6, B_6, C_6},
- {1, A_7, B_7, C_7},
- {1, A_8, B_8, C_8},
- {1, A_9, B_9, C_9},
- {1, A_10, B_10, C_10},
- {1, A_11, B_11, C_11},
- {1, A_12, B_12, C_12},
- {1, A_13, B_13, C_13},
- {1, A_14, B_14, C_14},
-
- {0, A_1, B_1, C_1},
- {0, A_2, B_2, C_2},
- {0, A_3, B_3, C_3},
- {0, A_4, B_4, C_4},
- {0, A_5, B_5, C_5},
- {0, A_6, B_6, C_6},
- {0, A_7, B_7, C_7},
- {0, A_8, B_8, C_8},
- {0, A_9, B_9, C_9},
- {0, A_10, B_10, C_10},
- {0, A_11, B_11, C_11},
- {0, A_12, B_12, C_12},
- {0, A_13, B_13, C_13},
- {0, A_14, B_14, C_14},
- {1, D_1, E_1, F_1},
-
- {0, D_1, E_1, F_1},
- {0, D_2, E_2, F_2},
- {0, D_3, E_3, F_3},
- {0, D_4, E_4, F_4},
- {0, D_5, E_5, F_5},
- {0, D_6, E_6, F_6},
- {0, D_7, E_7, F_7},
- {0, D_8, E_8, F_8},
- {0, D_9, E_9, F_9},
- {0, D_10, E_10, F_10},
- {0, D_11, E_11, F_11},
- {0, D_12, E_12, F_12},
- {0, D_13, E_13, F_13},
- {0, D_14, E_14, F_14},
- {1, D_2, E_2, F_2},
-
- {0, G_1, H_1, I_1},
- {0, G_2, H_2, I_2},
- {0, G_3, H_3, I_3},
- {0, G_4, H_4, I_4},
- {0, G_5, H_5, I_5},
- {0, G_6, H_6, I_6},
- {0, G_7, H_7, I_7},
- {0, G_8, H_8, I_8},
- {0, G_9, H_9, I_9},
- {0, G_10, H_10, I_10},
- {0, G_11, H_11, I_11},
- {0, G_12, H_12, I_12},
- {0, A_15, B_15, C_15},
- {0, G_13, H_13, I_13},
- {1, D_3, E_3, F_3},
-
- {0, J_1, K_1, L_1},
- {0, A_16, B_16, C_16},
- {0, J_2, K_2, L_2},
- {0, J_3, K_3, L_3},
- {0, J_4, K_4, L_4},
- {0, J_5, K_5, L_5},
- {0, J_6, K_6, L_6},
- {0, J_7, K_7, L_7},
- {0, J_8, K_8, L_8},
- {0, J_9, K_9, L_9},
- {0, J_10, K_10, L_10},
- {0, J_11, K_11, L_11},
- {0, J_12, K_12, L_12},
- {1, D_7, E_7, F_7},
- {1, D_4, E_4, F_4},
-
- {0, J_13, K_13, L_13},
- {0, J_14, K_14, L_14},
- {0, J_15, K_15, L_15},
- {0, J_16, K_16, L_16},
-
- {0, G_14, H_14, I_14},
- {0, G_15, H_15, I_15},
- {0, G_16, H_16, I_16},
-
- {0, D_15, E_15, F_15},
- {1, D_6, E_6, F_6},
- {1, D_5, E_5, F_5},
-
- {1, G_1, H_1, I_1},
- {1, G_2, H_2, I_2},
- {1, G_3, H_3, I_3},
- {1, G_4, H_4, I_4},
- {1, G_5, H_5, I_5},
- {1, G_6, H_6, I_6},
- {1, G_7, H_7, I_7},
- {1, G_8, H_8, I_8},
- {1, G_9, H_9, I_9},
- {1, G_10, H_10, I_10},
- {1, G_11, H_11, I_11},
-
- {1, J_1, K_1, L_1},
- {1, J_2, K_2, L_2},
- {1, J_3, K_3, L_3},
- {1, J_4, K_4, L_4},
- {1, J_5, K_5, L_5},
- {1, J_6, K_6, L_6},
- {1, J_7, K_7, L_7},
- {1, J_8, K_8, L_8},
- {1, J_9, K_9, L_9},
- {1, J_10, K_10, L_10},
- {1, J_11, K_11, L_11},
-};
-
-led_config_t g_led_config = {
- {
- { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, NO_LED, NO_LED},
- { 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, NO_LED, 28},
- { 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, NO_LED, 43},
- { 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, NO_LED, 58},
- { 59, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 60, NO_LED, 71, 72, 73},
- { 74, 75, 76, NO_LED, NO_LED, 77, NO_LED, NO_LED, NO_LED, 78, 79, 80, NO_LED, 81, 82, 83}
- },
- {
- { 0, 0}, // 0
- { 14, 0}, // 1
- { 29, 0}, // 2
- { 44, 0}, // 3
- { 59, 0}, // 4
- { 74, 0}, // 5
- { 89, 0}, // 6
- {104, 0}, // 7
- {119, 0}, // 8
- {134, 0}, // 9
- {149, 0}, // 10
- {164, 0}, // 11
- {179, 0}, // 12
- {194, 0}, // 13
-
- { 0, 12}, // 14
- { 14, 12}, // 15
- { 28, 12}, // 16
- { 42, 12}, // 17
- { 56, 12}, // 18
- { 70, 12}, // 19
- { 84, 12}, // 20
- { 98, 12}, // 21
- {112, 12}, // 22
- {126, 12}, // 23
- {140, 12}, // 24
- {154, 12}, // 25
- {168, 12}, // 26
- {182, 12}, // 27
- {224, 12}, // 28
-
- { 0, 25}, // 29
- { 14, 25}, // 30
- { 28, 25}, // 31
- { 42, 25}, // 32
- { 56, 25}, // 33
- { 70, 25}, // 34
- { 84, 25}, // 35
- { 98, 25}, // 36
- {112, 25}, // 37
- {126, 25}, // 38
- {140, 25}, // 39
- {154, 25}, // 40
- {168, 25}, // 41
- {182, 25}, // 42
- {224, 25}, // 43
-
- { 0, 38}, // 44
- { 28, 38}, // 45
- { 42, 38}, // 46
- { 56, 38}, // 47
- { 70, 38}, // 48
- { 84, 38}, // 49
- { 98, 38}, // 50
- {112, 38}, // 51
- {126, 38}, // 52
- {140, 38}, // 53
- {154, 38}, // 54
- {168, 38}, // 55
- {182, 38}, // 56
- {196, 38}, // 57
- {224, 38}, // 57
-
- { 0, 51}, // 58
- { 14, 51}, // 59
- { 28, 51}, // 59
- { 37, 51}, // 60
- { 56, 51}, // 61
- { 74, 51}, // 62
- { 93, 51}, // 63
- {112, 51}, // 64
- {130, 51}, // 65
- {149, 51}, // 66
- {168, 51}, // 67
- {186, 51}, // 68
- {200, 51}, // 69
- {214, 51}, // 70
- {224, 51}, // 71
-
- { 0, 64}, // 72
- { 18, 64}, // 73
- { 37, 64}, // 74
- { 92, 64}, // 75
- {140, 64}, // 76
- {154, 64}, // 77
- {168, 64}, // 78
- {196, 64}, // 80
- {210, 64}, // 81
- {224, 64}, // 82
-
- {0, 0}, // 68 LED 1
- {0, 6}, // 69 LED 2
- {0, 13}, // 70 LED 3
- {0, 19}, // 71 LED 4
- {0, 25}, // 72 LED 5
- {0, 32}, // 73 LED 6
- {0, 38}, // 74 LED 7
- {0, 45}, // 75 LED 8
- {0, 51}, // 73 LED 9
- {0, 57}, // 74 LED 10
- {0, 64}, // 75 LED 11
-
- {224, 0 }, // 78 LED 12
- {224, 6 }, // 79 LED 13
- {224, 13}, // 80 LED 14
- {224, 19}, // 81 LED 15
- {224, 25}, // 82 LED 16
- {224, 32}, // 83 LED 17
- {224, 38}, // 84 LED 18
- {224, 45}, // 82 LED 19
- {224, 51}, // 83 LED 20
- {224, 57}, // 84 LED 21
- {224, 64} // 85 LED 22
- },
- {
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
- }
-};
-
-#endif
-
-
-
diff --git a/keyboards/hfdkb/monsgeek/m1/m1.h b/keyboards/hfdkb/monsgeek/m1/m1.h
deleted file mode 100644
index ebd2bfe85d13..000000000000
--- a/keyboards/hfdkb/monsgeek/m1/m1.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Copyright (C) 2022 jonylee@hfd
- *
- * 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 .
- */
-
-#pragma once
-
-#include "quantum.h"
-
-#define LAYOUT(\
- K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K015, \
- K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115, \
- K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \
- K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K315, \
- K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, K415, \
- K500, K501, K502, K505, K509, K510, K511, K513, K514, K515 \
-) { \
- { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015 }, \
- { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO, K115 }, \
- { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO, K215 }, \
- { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, K315 }, \
- { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, K415 }, \
- { K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, K509, K510, K511, KC_NO, K513, K514, K515 } \
-}
-// clang-format on
-
-
-
diff --git a/keyboards/hfdkb/monsgeek/m1/matrix.c b/keyboards/hfdkb/monsgeek/m1/matrix.c
deleted file mode 100644
index e7d50132f799..000000000000
--- a/keyboards/hfdkb/monsgeek/m1/matrix.c
+++ /dev/null
@@ -1,284 +0,0 @@
-/* Copyright (C) 2022 jonylee@hfd
- *
- * 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 .
- */
-#include "eeconfig.h"
-#include "quantum.h"
-
-enum __layers {
- WIN_B,
- WIN_WASD,
- WIN_FN,
- MAC_B,
- MAC_WASD,
- MAC_FN
-};
-
-enum colors { WHITE, RED, GREEN, BLUE };
-enum colors led_color_status = WHITE;
-
-static bool fn_make_flag = false;
-static bool Lkey_flag = false;
-static bool reset_glint_flag = false;
-static bool while_test_flag = false;
-static bool alarm_flag = false;
-static uint16_t current_time = 0;
-static uint8_t glint_cnt = 0;
-static uint16_t scancode = 0;
-static uint8_t alarm_cnt = 0;
-
-HSV hsv;
-
-void led_test(uint8_t color);
-void clear_eeprom(void);
-
-bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
-
-dprintf("keycode = 0x%X,TG(WIN_B) = 0x%X,TG(MAC_B) = 0x%X\r\n",keycode,TG(WIN_B),TG(MAC_B));
-// uint8_t s = rgblight_get_sat();
- // uint8_t v = rgblight_get_val();
-
- switch (keycode) {
- case MO(WIN_FN):
- case MO(MAC_FN):
- fn_make_flag = false;
- if (record->event.pressed) {
- fn_make_flag = true;
- }
- return true;
- case KC_GRV:
- if (fn_make_flag && record->event.pressed) {
- Lkey_flag = true;
- current_time = timer_read();
- scancode = KC_GRV;
- return false;
- } else {
- Lkey_flag = 0;
- }
- return true;
- case KC_LCTL:
- if (fn_make_flag && record->event.pressed) {
-
- if(while_test_flag)
- {
- while_test_flag = false;
- rgb_matrix_init();
- }
- else
- {
- Lkey_flag = true;
- current_time = timer_read();
- scancode = KC_LCTL;
- }
- return false;
- } else {
- Lkey_flag = 0;
- }
- return true;
- case DF(WIN_B):
- if ((fn_make_flag && record->event.pressed)&&(alarm_flag == 0)) {
- alarm_flag = true;
- rgb_matrix_toggle_noeeprom();
- current_time = timer_read();
- set_single_persistent_default_layer(WIN_B);
- return false;
- }
- return true;
- case DF(MAC_B):
- if ((fn_make_flag && record->event.pressed)&&(alarm_flag == 0)) {
- alarm_flag = true;
- rgb_matrix_toggle_noeeprom();
- current_time = timer_read();
- set_single_persistent_default_layer(MAC_B);
- return false;
- }
- return true;
- case TG(WIN_WASD):
- if ((fn_make_flag && record->event.pressed)&&(alarm_flag == 0)) {
- alarm_flag = true;
- rgb_matrix_toggle_noeeprom();
- current_time = timer_read();
- // set_single_persistent_default_layer(WIN_WASD);
- return false;
- }
- return true;
- case TG(MAC_WASD):
- if ((fn_make_flag && record->event.pressed)&&(alarm_flag == 0)) {
- alarm_flag = true;
- rgb_matrix_toggle_noeeprom();
- current_time = timer_read();
-// set_single_persistent_default_layer(MAC_WASD);
- return false;
- }
- return true;
- case MAGIC_TOGGLE_GUI:
- if ((fn_make_flag && record->event.pressed)&&(alarm_flag == 0)) {
- alarm_flag = true;
- rgb_matrix_toggle_noeeprom();
- current_time = timer_read();
- }
- return true;
- case RGB_VAI:
- if ((fn_make_flag && record->event.pressed)&&(alarm_flag == 0)) {
- if(rgblight_get_val()<180){
- alarm_cnt = 2;
- }
- }
- return true;
- case RGB_VAD:
- if ((fn_make_flag && record->event.pressed)&&(alarm_flag == 0)) {
- if(rgblight_get_val()>10){
- alarm_cnt = 2;
- }
- }
- return true;
- case RGB_SAI:
- if ((fn_make_flag && record->event.pressed)&&(alarm_flag == 0)) {
- if(rgblight_get_sat()<240){
- alarm_cnt = 2;
- }
- }
- return true;
- case RGB_SAD:
- if ((fn_make_flag && record->event.pressed)&&(alarm_flag == 0)) {
- if(rgblight_get_sat()>10){
- alarm_cnt = 2;
- }
- }
- return true;
- default:
- return process_record_user(keycode, record);
- }
-}
-
-void matrix_scan_kb(void) {
- if(Lkey_flag){
- if(scancode == KC_GRV){
- if (timer_elapsed(current_time) >= 3000) {
- Lkey_flag = false;
- clear_eeprom();
-
- current_time = timer_read();
- reset_glint_flag = true;
- glint_cnt = 0;
- rgb_matrix_mode_noeeprom(RGB_MATRIX_SOLID_COLOR);
- rgb_matrix_sethsv_noeeprom(HSV_OFF);
- }
- }
- else if(scancode == KC_LCTL){
- if (timer_elapsed(current_time) >= 3000) {
- Lkey_flag = false;
- clear_eeprom();
-
- while_test_flag = true;
- glint_cnt = 0;
- rgb_matrix_mode_noeeprom(RGB_MATRIX_SOLID_COLOR);
- rgb_matrix_sethsv_noeeprom(HSV_WHITE);
- }
- }
- }
- else if(reset_glint_flag){
- if ((timer_elapsed(current_time)) >= 300) {
- current_time = timer_read();
- if (((glint_cnt++) & 0x01 )== 0) {
- rgb_matrix_sethsv_noeeprom(HSV_WHITE);
- } else {
- rgb_matrix_sethsv_noeeprom(HSV_OFF);
- }
- if (glint_cnt >= 3) {
- glint_cnt = 0;
- reset_glint_flag = false;
- rgb_matrix_init();
- }
- }
-
- }
- else if(while_test_flag){
- if ((timer_elapsed(current_time)) >= 1000) {
- current_time = timer_read();
- if ((glint_cnt%4) == 0) {
- rgb_matrix_sethsv_noeeprom(HSV_RED);
- } else if ((glint_cnt%4)== 1) {
- rgb_matrix_sethsv_noeeprom(HSV_GREEN);
- } else if ((glint_cnt%4)== 2) {
- rgb_matrix_sethsv_noeeprom(HSV_BLUE);
- } else if ((glint_cnt%4)== 3) {
- rgb_matrix_sethsv_noeeprom(HSV_WHITE);
- }
- glint_cnt++;
- if(glint_cnt>=30)
- {
- glint_cnt = 0;
- while_test_flag = false;
- rgb_matrix_init();
- }
- }
- }
- else if(alarm_cnt != 0)
- {
- alarm_cnt--;
- if(alarm_cnt == 0){
- alarm_flag = true;
- rgb_matrix_toggle_noeeprom();
- current_time = timer_read();
- }
- }
- else if(alarm_flag){
- if ((timer_elapsed(current_time)) >= 200) {
- rgb_matrix_toggle_noeeprom();
- alarm_flag = 0;
- }
- }
-}
-
-
-void led_test(uint8_t color) {
- rgb_matrix_mode_noeeprom(RGB_MATRIX_SOLID_COLOR);
-
- switch (color) {
- case WHITE:
- rgb_matrix_sethsv_noeeprom(HSV_WHITE);
- break;
-
- case RED:
- rgb_matrix_sethsv_noeeprom(HSV_RED);
- break;
-
- case GREEN:
- rgb_matrix_sethsv_noeeprom(HSV_GREEN);
- break;
-
- case BLUE:
- rgb_matrix_sethsv_noeeprom(HSV_BLUE);
- break;
- }
-}
-
-void clear_eeprom(void) {
- layer_state_t default_layer_temp = default_layer_state;
- eeconfig_init();
- default_layer_set(default_layer_temp);
-
- #ifdef VIA_ENABLE
- // This resets the layout options
- via_set_layout_options(VIA_EEPROM_LAYOUT_OPTIONS_DEFAULT);
- // This resets the keymaps in EEPROM to what is in flash.
- dynamic_keymap_reset();
- // This resets the macros in EEPROM to nothing.
- dynamic_keymap_macro_reset();
- #endif
-
- rgb_matrix_enable_noeeprom();
-}
-
diff --git a/keyboards/hfdkb/monsgeek/m1/mcuconf.h b/keyboards/hfdkb/monsgeek/m1/mcuconf.h
deleted file mode 100644
index 0d16f4f04e46..000000000000
--- a/keyboards/hfdkb/monsgeek/m1/mcuconf.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/* Copyright (C) 2022 jonylee@hfd
- *
- * 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 .
- */
-#pragma once
-
-#include_next
-
-#undef WB32_SPI_USE_QSPI
-#define WB32_SPI_USE_QSPI TRUE
-
-#undef WB32_I2C_USE_I2C1
-#define WB32_I2C_USE_I2C1 TRUE
diff --git a/keyboards/hfdkb/monsgeek/m1/rgb_matrix_user.inc b/keyboards/hfdkb/monsgeek/m1/rgb_matrix_user.inc
deleted file mode 100644
index 56e2bd31cbbd..000000000000
--- a/keyboards/hfdkb/monsgeek/m1/rgb_matrix_user.inc
+++ /dev/null
@@ -1,51 +0,0 @@
-// !!! DO NOT ADD #pragma once !!! //
-
-// Step 1.
-// Declare custom effects using the RGB_MATRIX_EFFECT macro
-// (note the lack of semicolon after the macro!)
-
-RGB_MATRIX_EFFECT(turn_off_rgb)
-RGB_MATRIX_EFFECT(kb_reset_rgb)
-
-// Step 2.
-// Define effects inside the `RGB_MATRIX_CUSTOM_EFFECT_IMPLS` ifdef block
-
-#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-
-// e.g: A simple effect, self-contained within a single method
-static bool turn_off_rgb(effect_params_t *params) {
- RGB_MATRIX_USE_LIMITS(led_min, led_max);
- for (uint8_t i = led_min; i < led_max; i++) {
- rgb_matrix_set_color(i, 0x00, 0x00, 0x00);
- }
- return rgb_matrix_check_finished_leds(led_max);
-}
-
-// e.g: A more complex effect, relying on external methods and state, with
-// dedicated init and run methods
-static uint8_t some_global_state;
-static void kb_reset_rgb_init(effect_params_t* params) {
- some_global_state = 0;
-}
-static bool kb_reset_rgb_run(effect_params_t* params) {
- RGB_MATRIX_USE_LIMITS(led_min, led_max);
- some_global_state++;
- if(some_global_state&0x01){
- for (uint8_t i = led_min; i < led_max; i++)
- rgb_matrix_set_color(i, 0, 0, 0);
- }
- else{
- for (uint8_t i = led_min; i < led_max; i++)
- rgb_matrix_set_color(i, 0xc0, 0xc0, 0xc0);
- }
- if(some_global_state>=7)
- rgb_matrix_init();
- return rgb_matrix_check_finished_leds(led_max);
-}
-
-static bool kb_reset_rgb(effect_params_t* params) {
- if (params->init) kb_reset_rgb_init(params);
- return kb_reset_rgb_run(params);
-}
-
-#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
diff --git a/keyboards/hfdkb/monsgeek/m1/rules.mk b/keyboards/hfdkb/monsgeek/m1/rules.mk
deleted file mode 100644
index 0eaa1e24c633..000000000000
--- a/keyboards/hfdkb/monsgeek/m1/rules.mk
+++ /dev/null
@@ -1,22 +0,0 @@
-# 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
-KEYBOARD_SHARED_EP = no
-NKRO_ENABLE = yes # Enable N-Key Rollover
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
-RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
-AUDIO_ENABLE = no # Audio output
-ENCODER_ENABLE = yes
-RGB_MATRIX_ENABLE = yes
-RGB_MATRIX_DRIVER = IS31FL3733
-EEPROM_DRIVER = wear_leveling
-WEAR_LEVELING_DRIVER = spi_flash
-#RGB_MATRIX_CUSTOM_USER = yes #Add turnoff LED
-
-SRC += matrix.c
-
From 426550bdf71cde2dbe8b0a9338e63aa2899cae3d Mon Sep 17 00:00:00 2001
From: jonylee1986 <2532487686@qq.com>
Date: Fri, 10 Feb 2023 15:54:49 +0800
Subject: [PATCH 19/79] Update mcuconf.h
---
keyboards/hfdkb/keyboard_sw/mk47/mcuconf.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/mcuconf.h b/keyboards/hfdkb/keyboard_sw/mk47/mcuconf.h
index bebb786824a1..89f34b9be5c2 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/mcuconf.h
+++ b/keyboards/hfdkb/keyboard_sw/mk47/mcuconf.h
@@ -17,6 +17,9 @@
#include_next
+#undef WB32_I2C_USE_I2C1
+#define WB32_I2C_USE_I2C1 TRUE
+
#undef WB32_SPI_USE_QSPI
#define WB32_SPI_USE_QSPI TRUE
From f99fc298e0395393c064d236a2a27c08248e5c34 Mon Sep 17 00:00:00 2001
From: jonylee1986 <2532487686@qq.com>
Date: Fri, 10 Feb 2023 15:58:29 +0800
Subject: [PATCH 20/79] Update mk47 keyboard default keymap
---
keyboards/hfdkb/keyboard_sw/mk47/keymaps/default/keymap.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/keymaps/default/keymap.c b/keyboards/hfdkb/keyboard_sw/mk47/keymaps/default/keymap.c
index fac94ae1054f..c1aa718a8dbb 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/keymaps/default/keymap.c
+++ b/keyboards/hfdkb/keyboard_sw/mk47/keymaps/default/keymap.c
@@ -56,10 +56,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// clang-format on
#ifdef RGB_MATRIX_ENABLE
-void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
+bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {
+ if (!rgb_matrix_indicators_advanced_user(led_min, led_max)) {
+ return false;
+ }
// caps lock cyan
if (host_keyboard_led_state().caps_lock) {
- RGB_MATRIX_INDICATOR_SET_COLOR(50, 255, 255, 255);
+ RGB_MATRIX_INDICATOR_SET_COLOR(12, 255, 255, 255);
}
+ return true;
}
#endif
From 7fcf1ab1fcdf9a0a4ff22dedfa6dc57cf47263e0 Mon Sep 17 00:00:00 2001
From: "jonylee@hfd" <108282809+jonylee1986@users.noreply.github.com>
Date: Fri, 10 Feb 2023 18:02:15 +0800
Subject: [PATCH 21/79] Update keyboards/hfdkb/keyboard_sw/mk47/config.h
Co-authored-by: Drashna Jaelre
---
keyboards/hfdkb/keyboard_sw/mk47/config.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/config.h b/keyboards/hfdkb/keyboard_sw/mk47/config.h
index a3218aee5e69..9be344577222 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/config.h
+++ b/keyboards/hfdkb/keyboard_sw/mk47/config.h
@@ -29,9 +29,6 @@
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION ROW2COL
-/* Hold ESC on start up to clear EEPROM and boot into bootloader mode */
-#define BOOTMAGIC_LITE_ROW 0
-#define BOOTMAGIC_LITE_COLUMN 0
#define TAP_CODE_DELAY 5
From 099488ef200480fe0ffae1378a20ae76dfb255f2 Mon Sep 17 00:00:00 2001
From: "jonylee@hfd" <108282809+jonylee1986@users.noreply.github.com>
Date: Fri, 10 Feb 2023 18:02:23 +0800
Subject: [PATCH 22/79] Update
keyboards/hfdkb/keyboard_sw/mk47/keymaps/default/keymap.c
Co-authored-by: Drashna Jaelre
---
keyboards/hfdkb/keyboard_sw/mk47/keymaps/default/keymap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/keymaps/default/keymap.c b/keyboards/hfdkb/keyboard_sw/mk47/keymaps/default/keymap.c
index c1aa718a8dbb..2df8ff6f98ef 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/keymaps/default/keymap.c
+++ b/keyboards/hfdkb/keyboard_sw/mk47/keymaps/default/keymap.c
@@ -17,7 +17,7 @@
#include QMK_KEYBOARD_H
enum custom_keycodes {
- KC_MISSION_CONTROL = SAFE_RANGE,
+ KC_MISSION_CONTROL = QK_USER,
KC_LAUNCHPAD
};
From 84c8ad7b0a170db275c316a6ec3f3d5af4a0fb6d Mon Sep 17 00:00:00 2001
From: "jonylee@hfd" <108282809+jonylee1986@users.noreply.github.com>
Date: Fri, 10 Feb 2023 18:02:40 +0800
Subject: [PATCH 23/79] Update
keyboards/hfdkb/keyboard_sw/mk47/keymaps/default/keymap.c
Co-authored-by: Drashna Jaelre
---
.../hfdkb/keyboard_sw/mk47/keymaps/default/keymap.c | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/keymaps/default/keymap.c b/keyboards/hfdkb/keyboard_sw/mk47/keymaps/default/keymap.c
index 2df8ff6f98ef..ac68a9af0e78 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/keymaps/default/keymap.c
+++ b/keyboards/hfdkb/keyboard_sw/mk47/keymaps/default/keymap.c
@@ -55,15 +55,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
// clang-format on
-#ifdef RGB_MATRIX_ENABLE
-bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {
- if (!rgb_matrix_indicators_advanced_user(led_min, led_max)) {
- return false;
- }
- // caps lock cyan
- if (host_keyboard_led_state().caps_lock) {
- RGB_MATRIX_INDICATOR_SET_COLOR(12, 255, 255, 255);
- }
- return true;
-}
-#endif
From ad5cf365bb56b7dda0321783c60481d4ef27f731 Mon Sep 17 00:00:00 2001
From: "jonylee@hfd" <108282809+jonylee1986@users.noreply.github.com>
Date: Fri, 10 Feb 2023 18:03:43 +0800
Subject: [PATCH 24/79] Update
keyboards/hfdkb/keyboard_sw/mk47/keymaps/via/keymap.c
Co-authored-by: Drashna Jaelre
---
.../hfdkb/keyboard_sw/mk47/keymaps/via/keymap.c | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/keymaps/via/keymap.c b/keyboards/hfdkb/keyboard_sw/mk47/keymaps/via/keymap.c
index 945c70e0f486..b87b915f1d47 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/keymaps/via/keymap.c
+++ b/keyboards/hfdkb/keyboard_sw/mk47/keymaps/via/keymap.c
@@ -55,15 +55,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
// clang-format on
-#ifdef RGB_MATRIX_ENABLE
-bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {
- if (!rgb_matrix_indicators_advanced_user(led_min, led_max)) {
- return false;
- }
- // caps lock cyan
- if (host_keyboard_led_state().caps_lock) {
- RGB_MATRIX_INDICATOR_SET_COLOR(12, 255, 255, 255);
- }
- return true;
-}
-#endif
From 7e6ca200fd00bbaa93cc06e8551f9387cd3ade52 Mon Sep 17 00:00:00 2001
From: "jonylee@hfd" <108282809+jonylee1986@users.noreply.github.com>
Date: Fri, 10 Feb 2023 18:03:49 +0800
Subject: [PATCH 25/79] Update keyboards/hfdkb/keyboard_sw/mk47/mk47.c
Co-authored-by: Drashna Jaelre
---
keyboards/hfdkb/keyboard_sw/mk47/mk47.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/mk47.c b/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
index 21d82ffcff9c..2a37f7c28316 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
+++ b/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
@@ -168,3 +168,15 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
}
+#ifdef RGB_MATRIX_ENABLE
+bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {
+ if (!rgb_matrix_indicators_advanced_user(led_min, led_max)) {
+ return false;
+ }
+ // caps lock cyan
+ if (host_keyboard_led_state().caps_lock) {
+ RGB_MATRIX_INDICATOR_SET_COLOR(12, 255, 255, 255);
+ }
+ return true;
+}
+#endif
From 1df217523556c373c13c046ae816b90dc66bfc94 Mon Sep 17 00:00:00 2001
From: "jonylee@hfd" <108282809+jonylee1986@users.noreply.github.com>
Date: Fri, 10 Feb 2023 18:04:08 +0800
Subject: [PATCH 26/79] Update keyboards/hfdkb/keyboard_sw/mk47/mk47.c
Co-authored-by: Drashna Jaelre
---
keyboards/hfdkb/keyboard_sw/mk47/mk47.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/mk47.c b/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
index 2a37f7c28316..f51ac59cc85a 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
+++ b/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
@@ -150,7 +150,10 @@ enum custom_keycodes {
};
#endif
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
+ if (!process_record_user(keycode, record)) {
+ return false;
+ }
switch (keycode) {
#ifdef VIA_ENABLE
case KC_RESET: {
From 950d329a37cc2f658fc680ddd954611874998cb8 Mon Sep 17 00:00:00 2001
From: "jonylee@hfd" <108282809+jonylee1986@users.noreply.github.com>
Date: Fri, 10 Feb 2023 18:04:17 +0800
Subject: [PATCH 27/79] Update keyboards/hfdkb/keyboard_sw/mk47/matrix.c
Co-authored-by: Drashna Jaelre
---
keyboards/hfdkb/keyboard_sw/mk47/matrix.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/matrix.c b/keyboards/hfdkb/keyboard_sw/mk47/matrix.c
index a8ab288542a7..06cebe945368 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/matrix.c
+++ b/keyboards/hfdkb/keyboard_sw/mk47/matrix.c
@@ -75,7 +75,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
}
}
-void matrix_scan_kb(void) {
+void housekeeping_task_kb(void) {
if(Lkey_flag){
if(scancode == KC_DEL)
{
From 68d69fd8a6ff291f0571774e083eba85b4ac149a Mon Sep 17 00:00:00 2001
From: jonylee1986 <2532487686@qq.com>
Date: Sat, 11 Feb 2023 10:46:13 +0800
Subject: [PATCH 28/79] =?UTF-8?q?The=20invalid=20=20file=20=EF=BC=88config?=
=?UTF-8?q?.=20h=EF=BC=89in=20the=20keymap=20folder=20has=20been=20deleted?=
=?UTF-8?q?.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
keyboards/hfdkb/keyboard_sw/mk47/config.h | 6 ------
.../keyboard_sw/mk47/keymaps/via/config.h | 19 -------------------
2 files changed, 25 deletions(-)
delete mode 100644 keyboards/hfdkb/keyboard_sw/mk47/keymaps/via/config.h
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/config.h b/keyboards/hfdkb/keyboard_sw/mk47/config.h
index a3218aee5e69..abdc70390b1c 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/config.h
+++ b/keyboards/hfdkb/keyboard_sw/mk47/config.h
@@ -19,10 +19,6 @@
/* Force NKRO on boot up regardless of the setting saved in the EEPROM (uncomment to enable it) */
#define FORCE_NKRO
-// /* key matrix size */
-// #define MATRIX_ROWS 4
-// #define MATRIX_COLS 12
-
/* key matrix pins */
#define MATRIX_ROW_PINS { C6, C7, C8, C9 }
#define MATRIX_COL_PINS { C1, C2, C3, A0, A1, A2, A3, A4, A5, A6, A7, C4 }
@@ -125,6 +121,4 @@
#define RGB_MATRIX_SPD_STEP 52
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 250 /* The maximum brightness level */
-// /* Set debounce time to 1ms */
-// #define DEBOUNCE 5
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/keymaps/via/config.h b/keyboards/hfdkb/keyboard_sw/mk47/keymaps/via/config.h
deleted file mode 100644
index 82174d29ca79..000000000000
--- a/keyboards/hfdkb/keyboard_sw/mk47/keymaps/via/config.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright (C) 2022 jonylee@hfd
- *
- * 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 .
- */
-
-#pragma once
-
-#define USB_ENDPOINTS_ARE_REORDERABLE
From 2c650601918769f87e1223855c9a09b085cb2a93 Mon Sep 17 00:00:00 2001
From: jonylee1986 <2532487686@qq.com>
Date: Sat, 11 Feb 2023 11:48:18 +0800
Subject: [PATCH 29/79] Integrate 'process_record_kb' into the 'matrix. c' file
---
keyboards/hfdkb/keyboard_sw/mk47/matrix.c | 18 ++++++++++++++-
keyboards/hfdkb/keyboard_sw/mk47/mk47.c | 27 -----------------------
2 files changed, 17 insertions(+), 28 deletions(-)
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/matrix.c b/keyboards/hfdkb/keyboard_sw/mk47/matrix.c
index 06cebe945368..70079820e24e 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/matrix.c
+++ b/keyboards/hfdkb/keyboard_sw/mk47/matrix.c
@@ -16,6 +16,11 @@
#include "eeconfig.h"
#include "quantum.h"
+#ifdef VIA_ENABLE
+enum custom_keycodes {
+ KC_RESET = USER00,
+};
+#endif
enum colors { WHITE, RED, GREEN, BLUE };
enum colors led_color_status = WHITE;
@@ -70,7 +75,18 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
Lkey_flag = 0;
}
return true;
- default:
+#ifdef VIA_ENABLE
+ case KC_RESET: {
+ if (record->event.pressed) {
+
+ #include "via.h"
+ via_eeprom_set_valid(false);
+ eeconfig_init_via();
+ }
+ return false;
+ }
+#endif
+ default:
return process_record_user(keycode, record);
}
}
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/mk47.c b/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
index f51ac59cc85a..f29f2a81bb67 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
+++ b/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
@@ -144,33 +144,6 @@ led_config_t g_led_config = {
#endif
-#ifdef VIA_ENABLE
-enum custom_keycodes {
- KC_RESET = USER00,
-};
-#endif
-
-bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
- if (!process_record_user(keycode, record)) {
- return false;
- }
- switch (keycode) {
-#ifdef VIA_ENABLE
- case KC_RESET: {
- if (record->event.pressed) {
-
- #include "via.h"
- via_eeprom_set_valid(false);
- eeconfig_init_via();
- }
- return false;
- }
-#endif
- default:
- return true; // Process all other keycodes normally
- }
-}
-
#ifdef RGB_MATRIX_ENABLE
bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {
if (!rgb_matrix_indicators_advanced_user(led_min, led_max)) {
From 24386106ef8606c8087e24527b6191a9c04bde52 Mon Sep 17 00:00:00 2001
From: jonylee1986 <2532487686@qq.com>
Date: Mon, 13 Feb 2023 15:29:49 +0800
Subject: [PATCH 30/79] Some unused custom key values have been deleted
---
keyboards/hfdkb/keyboard_sw/mk47/keymaps/via/keymap.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/keymaps/via/keymap.c b/keyboards/hfdkb/keyboard_sw/mk47/keymaps/via/keymap.c
index b87b915f1d47..03ea5b89ec33 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/keymaps/via/keymap.c
+++ b/keyboards/hfdkb/keyboard_sw/mk47/keymaps/via/keymap.c
@@ -16,16 +16,6 @@
#include QMK_KEYBOARD_H
-enum custom_keycodes {
- KC_MISSION_CONTROL = SAFE_RANGE,
- KC_LAUNCHPAD
-};
-
-#define KC_TASK LGUI(KC_TAB)
-#define KC_FLXP LGUI(KC_E)
-#define KC_MCTL KC_MISSION_CONTROL
-#define KC_LPAD KC_LAUNCHPAD
-
// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
From caefadae2137f9fff0f5d223481623b5730e7778 Mon Sep 17 00:00:00 2001
From: jonylee1986 <2532487686@qq.com>
Date: Mon, 13 Feb 2023 15:50:28 +0800
Subject: [PATCH 31/79] deleted matrix.c
---
keyboards/hfdkb/keyboard_sw/mk47/matrix.c | 199 ----------------------
keyboards/hfdkb/keyboard_sw/mk47/mk47.c | 181 ++++++++++++++++++++
keyboards/hfdkb/keyboard_sw/mk47/rules.mk | 2 -
3 files changed, 181 insertions(+), 201 deletions(-)
delete mode 100644 keyboards/hfdkb/keyboard_sw/mk47/matrix.c
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/matrix.c b/keyboards/hfdkb/keyboard_sw/mk47/matrix.c
deleted file mode 100644
index 70079820e24e..000000000000
--- a/keyboards/hfdkb/keyboard_sw/mk47/matrix.c
+++ /dev/null
@@ -1,199 +0,0 @@
-/* Copyright (C) 2022 jonylee@hfd
- *
- * 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 .
- */
-#include "eeconfig.h"
-#include "quantum.h"
-
-#ifdef VIA_ENABLE
-enum custom_keycodes {
- KC_RESET = USER00,
-};
-#endif
-
-enum colors { WHITE, RED, GREEN, BLUE };
-enum colors led_color_status = WHITE;
-
-static bool fn_make_flag = false;
-static bool Lkey_flag = false;
-static bool reset_glint_flag = false;
-static bool while_test_flag = false;
-static uint16_t current_time = 0;
-static uint8_t glint_cnt = 0;
-static uint16_t scancode = 0;
-
-HSV hsv;
-
-void led_test(uint8_t color);
-void clear_eeprom(void);
-
-bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
- switch (keycode) {
- case MO(1):
- fn_make_flag = false;
- if (record->event.pressed) {
- fn_make_flag = true;
- }
- return true;
- case KC_DEL:
- if (fn_make_flag && record->event.pressed) {
- Lkey_flag = true;
- current_time = timer_read();
- scancode = KC_DEL;
- return false;
- } else {
- Lkey_flag = 0;
- }
- return true;
- case KC_SPC:
- if (fn_make_flag && record->event.pressed) {
-
- if(while_test_flag)
- {
- while_test_flag = false;
- rgb_matrix_init();
- }
- else
- {
- Lkey_flag = true;
- current_time = timer_read();
- scancode = KC_SPC;
- }
- return false;
- } else {
- Lkey_flag = 0;
- }
- return true;
-#ifdef VIA_ENABLE
- case KC_RESET: {
- if (record->event.pressed) {
-
- #include "via.h"
- via_eeprom_set_valid(false);
- eeconfig_init_via();
- }
- return false;
- }
-#endif
- default:
- return process_record_user(keycode, record);
- }
-}
-
-void housekeeping_task_kb(void) {
- if(Lkey_flag){
- if(scancode == KC_DEL)
- {
- if (timer_elapsed(current_time) >= 5000) {
- Lkey_flag = false;
- clear_eeprom();
-
- current_time = timer_read();
- reset_glint_flag = true;
- glint_cnt = 0;
- rgb_matrix_mode_noeeprom(RGB_MATRIX_SOLID_COLOR);
- rgb_matrix_sethsv_noeeprom(HSV_OFF);
- }
- }
- else if(scancode == KC_SPC)
- {
- if (timer_elapsed(current_time) >= 3000) {
- Lkey_flag = false;
- clear_eeprom();
-
- while_test_flag = true;
- glint_cnt = 0;
- rgb_matrix_mode_noeeprom(RGB_MATRIX_SOLID_COLOR);
- rgb_matrix_sethsv_noeeprom(HSV_RED);
- }
- }
- }
- else if(reset_glint_flag)
- {
- if ((timer_elapsed(current_time)) >= 300) {
- current_time = timer_read();
- if (((glint_cnt++) & 0x01 )== 0) {
- rgb_matrix_sethsv_noeeprom(HSV_WHITE);
- } else {
- rgb_matrix_sethsv_noeeprom(HSV_OFF);
- }
- if (glint_cnt >= 3) {
- glint_cnt = 0;
- reset_glint_flag = false;
- rgb_matrix_init();
- }
- }
-
- }
- else if(while_test_flag){
- if ((timer_elapsed(current_time)) >= 1500) {
- current_time = timer_read();
- if ((glint_cnt%3) == 0) {
- rgb_matrix_sethsv_noeeprom(HSV_RED);
- } else if ((glint_cnt%3)== 1) {
- rgb_matrix_sethsv_noeeprom(HSV_GREEN);
- } else if ((glint_cnt%3)== 2) {
- rgb_matrix_sethsv_noeeprom(HSV_BLUE);
- }
- glint_cnt++;
- if(glint_cnt>=30)
- {
- glint_cnt = 0;
- while_test_flag = false;
- rgb_matrix_init();
- }
- }
- }
-}
-
-
-void led_test(uint8_t color) {
- rgb_matrix_mode_noeeprom(RGB_MATRIX_SOLID_COLOR);
-
- switch (color) {
- case WHITE:
- rgb_matrix_sethsv_noeeprom(HSV_WHITE);
- break;
-
- case RED:
- rgb_matrix_sethsv_noeeprom(HSV_RED);
- break;
-
- case GREEN:
- rgb_matrix_sethsv_noeeprom(HSV_GREEN);
- break;
-
- case BLUE:
- rgb_matrix_sethsv_noeeprom(HSV_BLUE);
- break;
- }
-}
-
-void clear_eeprom(void) {
- layer_state_t default_layer_temp = default_layer_state;
- eeconfig_init();
- default_layer_set(default_layer_temp);
-
- #ifdef VIA_ENABLE
- // This resets the layout options
- via_set_layout_options(VIA_EEPROM_LAYOUT_OPTIONS_DEFAULT);
- // This resets the keymaps in EEPROM to what is in flash.
- dynamic_keymap_reset();
- // This resets the macros in EEPROM to nothing.
- dynamic_keymap_macro_reset();
- #endif
-
- rgb_matrix_enable_noeeprom();
-}
-
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/mk47.c b/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
index f29f2a81bb67..0a922963df26 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
+++ b/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
@@ -156,3 +156,184 @@ bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {
return true;
}
#endif
+
+#ifdef VIA_ENABLE
+enum custom_keycodes {
+ KC_RESET = USER00,
+};
+#endif
+
+enum colors { WHITE, RED, GREEN, BLUE };
+enum colors led_color_status = WHITE;
+
+static bool fn_make_flag = false;
+static bool Lkey_flag = false;
+static bool reset_glint_flag = false;
+static bool while_test_flag = false;
+static uint16_t current_time = 0;
+static uint8_t glint_cnt = 0;
+static uint16_t scancode = 0;
+
+HSV hsv;
+
+void led_test(uint8_t color);
+void clear_eeprom(void);
+
+bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case MO(1):
+ fn_make_flag = false;
+ if (record->event.pressed) {
+ fn_make_flag = true;
+ }
+ return true;
+ case KC_DEL:
+ if (fn_make_flag && record->event.pressed) {
+ Lkey_flag = true;
+ current_time = timer_read();
+ scancode = KC_DEL;
+ return false;
+ } else {
+ Lkey_flag = 0;
+ }
+ return true;
+ case KC_SPC:
+ if (fn_make_flag && record->event.pressed) {
+
+ if(while_test_flag)
+ {
+ while_test_flag = false;
+ rgb_matrix_init();
+ }
+ else
+ {
+ Lkey_flag = true;
+ current_time = timer_read();
+ scancode = KC_SPC;
+ }
+ return false;
+ } else {
+ Lkey_flag = 0;
+ }
+ return true;
+#ifdef VIA_ENABLE
+ case KC_RESET: {
+ if (record->event.pressed) {
+
+ #include "via.h"
+ via_eeprom_set_valid(false);
+ eeconfig_init_via();
+ }
+ return false;
+ }
+#endif
+ default:
+ return process_record_user(keycode, record);
+ }
+}
+
+void housekeeping_task_kb(void) {
+ if(Lkey_flag){
+ if(scancode == KC_DEL)
+ {
+ if (timer_elapsed(current_time) >= 5000) {
+ Lkey_flag = false;
+ clear_eeprom();
+
+ current_time = timer_read();
+ reset_glint_flag = true;
+ glint_cnt = 0;
+ rgb_matrix_mode_noeeprom(RGB_MATRIX_SOLID_COLOR);
+ rgb_matrix_sethsv_noeeprom(HSV_OFF);
+ }
+ }
+ else if(scancode == KC_SPC)
+ {
+ if (timer_elapsed(current_time) >= 3000) {
+ Lkey_flag = false;
+ clear_eeprom();
+
+ while_test_flag = true;
+ glint_cnt = 0;
+ rgb_matrix_mode_noeeprom(RGB_MATRIX_SOLID_COLOR);
+ rgb_matrix_sethsv_noeeprom(HSV_RED);
+ }
+ }
+ }
+ else if(reset_glint_flag)
+ {
+ if ((timer_elapsed(current_time)) >= 300) {
+ current_time = timer_read();
+ if (((glint_cnt++) & 0x01 )== 0) {
+ rgb_matrix_sethsv_noeeprom(HSV_WHITE);
+ } else {
+ rgb_matrix_sethsv_noeeprom(HSV_OFF);
+ }
+ if (glint_cnt >= 3) {
+ glint_cnt = 0;
+ reset_glint_flag = false;
+ rgb_matrix_init();
+ }
+ }
+
+ }
+ else if(while_test_flag){
+ if ((timer_elapsed(current_time)) >= 1500) {
+ current_time = timer_read();
+ if ((glint_cnt%3) == 0) {
+ rgb_matrix_sethsv_noeeprom(HSV_RED);
+ } else if ((glint_cnt%3)== 1) {
+ rgb_matrix_sethsv_noeeprom(HSV_GREEN);
+ } else if ((glint_cnt%3)== 2) {
+ rgb_matrix_sethsv_noeeprom(HSV_BLUE);
+ }
+ glint_cnt++;
+ if(glint_cnt>=30)
+ {
+ glint_cnt = 0;
+ while_test_flag = false;
+ rgb_matrix_init();
+ }
+ }
+ }
+}
+
+
+void led_test(uint8_t color) {
+ rgb_matrix_mode_noeeprom(RGB_MATRIX_SOLID_COLOR);
+
+ switch (color) {
+ case WHITE:
+ rgb_matrix_sethsv_noeeprom(HSV_WHITE);
+ break;
+
+ case RED:
+ rgb_matrix_sethsv_noeeprom(HSV_RED);
+ break;
+
+ case GREEN:
+ rgb_matrix_sethsv_noeeprom(HSV_GREEN);
+ break;
+
+ case BLUE:
+ rgb_matrix_sethsv_noeeprom(HSV_BLUE);
+ break;
+ }
+}
+
+void clear_eeprom(void) {
+ layer_state_t default_layer_temp = default_layer_state;
+ eeconfig_init();
+ default_layer_set(default_layer_temp);
+
+ #ifdef VIA_ENABLE
+ // This resets the layout options
+ via_set_layout_options(VIA_EEPROM_LAYOUT_OPTIONS_DEFAULT);
+ // This resets the keymaps in EEPROM to what is in flash.
+ dynamic_keymap_reset();
+ // This resets the macros in EEPROM to nothing.
+ dynamic_keymap_macro_reset();
+ #endif
+
+ rgb_matrix_enable_noeeprom();
+}
\ No newline at end of file
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/rules.mk b/keyboards/hfdkb/keyboard_sw/mk47/rules.mk
index 8ef0a53f4c69..8745373968cf 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/rules.mk
+++ b/keyboards/hfdkb/keyboard_sw/mk47/rules.mk
@@ -15,5 +15,3 @@ RGB_MATRIX_ENABLE = yes
RGB_MATRIX_DRIVER = IS31FL3733
EEPROM_DRIVER = wear_leveling
WEAR_LEVELING_DRIVER = spi_flash
-
-SRC += matrix.c
From 0dc1903a2ac7d8e8939736f30c0b93a2e46e3378 Mon Sep 17 00:00:00 2001
From: jonylee1986 <2532487686@qq.com>
Date: Mon, 13 Feb 2023 16:04:55 +0800
Subject: [PATCH 32/79] Deleted redundant macro definitions
---
keyboards/hfdkb/keyboard_sw/mk47/config.h | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/config.h b/keyboards/hfdkb/keyboard_sw/mk47/config.h
index 1ad26b0e92cb..8ad5458fc5c4 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/config.h
+++ b/keyboards/hfdkb/keyboard_sw/mk47/config.h
@@ -52,9 +52,8 @@
#define I2C1_OPMODE OPMODE_I2C
#define I2C1_CLOCK_SPEED 400000 /* 400000 */
-#define DRIVER_1_LED_TOTAL 47
-#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
-#define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL
+#define DRIVER_LED_TOTAL 47
+#define RGB_MATRIX_LED_COUNT 47
#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_CENTER {112,32}
From d9ccccb3216c3efcde15df182650927d5b44abe3 Mon Sep 17 00:00:00 2001
From: "jonylee@hfd" <108282809+jonylee1986@users.noreply.github.com>
Date: Fri, 17 Feb 2023 10:59:34 +0800
Subject: [PATCH 33/79] Update config.h
---
keyboards/hfdkb/keyboard_sw/mk47/config.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/config.h b/keyboards/hfdkb/keyboard_sw/mk47/config.h
index 8ad5458fc5c4..9a6136682c20 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/config.h
+++ b/keyboards/hfdkb/keyboard_sw/mk47/config.h
@@ -52,7 +52,6 @@
#define I2C1_OPMODE OPMODE_I2C
#define I2C1_CLOCK_SPEED 400000 /* 400000 */
-#define DRIVER_LED_TOTAL 47
#define RGB_MATRIX_LED_COUNT 47
#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
From 76006fd53b4da37c8a2c15261a868cc21da5cde7 Mon Sep 17 00:00:00 2001
From: "jonylee@hfd" <108282809+jonylee1986@users.noreply.github.com>
Date: Fri, 17 Feb 2023 11:43:12 +0800
Subject: [PATCH 34/79] Update mk47.c
Removed all references to DRIVER_LED_TOTAL
---
keyboards/hfdkb/keyboard_sw/mk47/mk47.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/mk47.c b/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
index 0a922963df26..1394a8b41081 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
+++ b/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
@@ -17,7 +17,7 @@
#include "mk47.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = {
+const is31_led PROGMEM g_is31_leds[47] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
@@ -336,4 +336,4 @@ void clear_eeprom(void) {
#endif
rgb_matrix_enable_noeeprom();
-}
\ No newline at end of file
+}
From 2e94d51552df366913830dd9088d6801df9957de Mon Sep 17 00:00:00 2001
From: "jonylee@hfd" <108282809+jonylee1986@users.noreply.github.com>
Date: Fri, 17 Feb 2023 11:47:58 +0800
Subject: [PATCH 35/79] Update keyboards/hfdkb/keyboard_sw/mk47/mk47.c
Co-authored-by: Ryan
---
keyboards/hfdkb/keyboard_sw/mk47/mk47.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/mk47.c b/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
index 1394a8b41081..12b522ace846 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
+++ b/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
@@ -17,7 +17,7 @@
#include "mk47.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[47] = {
+const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
From c2fadd416eb2d91806b53068896ec5e78f064f77 Mon Sep 17 00:00:00 2001
From: jonylee1986 <2532487686@qq.com>
Date: Tue, 21 Feb 2023 14:29:08 +0800
Subject: [PATCH 36/79] add readme.md
---
keyboards/hfdkb/keyboard_sw/mk47/mk47.c | 61 ++++++++++------------
keyboards/hfdkb/keyboard_sw/mk47/readme.md | 15 ++++++
2 files changed, 42 insertions(+), 34 deletions(-)
create mode 100644 keyboards/hfdkb/keyboard_sw/mk47/readme.md
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/mk47.c b/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
index 12b522ace846..8cb7a7400bd1 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
+++ b/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
@@ -163,7 +163,12 @@ enum custom_keycodes {
};
#endif
-enum colors { WHITE, RED, GREEN, BLUE };
+enum colors {
+ WHITE,
+ RED,
+ GREEN,
+ BLUE
+};
enum colors led_color_status = WHITE;
static bool fn_make_flag = false;
@@ -180,12 +185,12 @@ void led_test(uint8_t color);
void clear_eeprom(void);
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
+ if (!process_record_user(keycode, record)) {
+ return false;
+ }
switch (keycode) {
case MO(1):
- fn_make_flag = false;
- if (record->event.pressed) {
- fn_make_flag = true;
- }
+ fn_make_flag = record->event.pressed;
return true;
case KC_DEL:
if (fn_make_flag && record->event.pressed) {
@@ -199,17 +204,13 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
return true;
case KC_SPC:
if (fn_make_flag && record->event.pressed) {
-
- if(while_test_flag)
- {
+ if (while_test_flag) {
while_test_flag = false;
rgb_matrix_init();
- }
- else
- {
- Lkey_flag = true;
- current_time = timer_read();
- scancode = KC_SPC;
+ } else {
+ Lkey_flag = true;
+ current_time = timer_read();
+ scancode = KC_SPC;
}
return false;
} else {
@@ -218,12 +219,11 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
return true;
#ifdef VIA_ENABLE
case KC_RESET: {
- if (record->event.pressed) {
-
- #include "via.h"
- via_eeprom_set_valid(false);
- eeconfig_init_via();
- }
+ if (record->event.pressed) {
+# include "via.h"
+ via_eeprom_set_valid(false);
+ eeconfig_init_via();
+ }
return false;
}
#endif
@@ -233,9 +233,8 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
}
void housekeeping_task_kb(void) {
- if(Lkey_flag){
- if(scancode == KC_DEL)
- {
+ if (Lkey_flag) {
+ if (scancode == KC_DEL) {
if (timer_elapsed(current_time) >= 5000) {
Lkey_flag = false;
clear_eeprom();
@@ -246,9 +245,7 @@ void housekeeping_task_kb(void) {
rgb_matrix_mode_noeeprom(RGB_MATRIX_SOLID_COLOR);
rgb_matrix_sethsv_noeeprom(HSV_OFF);
}
- }
- else if(scancode == KC_SPC)
- {
+ } else if (scancode == KC_SPC) {
if (timer_elapsed(current_time) >= 3000) {
Lkey_flag = false;
clear_eeprom();
@@ -259,9 +256,7 @@ void housekeeping_task_kb(void) {
rgb_matrix_sethsv_noeeprom(HSV_RED);
}
}
- }
- else if(reset_glint_flag)
- {
+ } else if (reset_glint_flag) {
if ((timer_elapsed(current_time)) >= 300) {
current_time = timer_read();
if (((glint_cnt++) & 0x01 )== 0) {
@@ -276,8 +271,7 @@ void housekeeping_task_kb(void) {
}
}
- }
- else if(while_test_flag){
+ } else if (while_test_flag) {
if ((timer_elapsed(current_time)) >= 1500) {
current_time = timer_read();
if ((glint_cnt%3) == 0) {
@@ -288,9 +282,8 @@ void housekeeping_task_kb(void) {
rgb_matrix_sethsv_noeeprom(HSV_BLUE);
}
glint_cnt++;
- if(glint_cnt>=30)
- {
- glint_cnt = 0;
+ if (glint_cnt >= 30) {
+ glint_cnt = 0;
while_test_flag = false;
rgb_matrix_init();
}
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/readme.md b/keyboards/hfdkb/keyboard_sw/mk47/readme.md
new file mode 100644
index 000000000000..5249b932e685
--- /dev/null
+++ b/keyboards/hfdkb/keyboard_sw/mk47/readme.md
@@ -0,0 +1,15 @@
+# mk47
+
+A customizable 40% keyboard.
+
+* Keyboard Maintainer: [jonylee@hfd](https://github.com/jonylee1986)
+* Hardware Supported: mk47
+
+Make example for this keyboard (after setting up your build environment):
+
+ make hfdkb/keyboard_sw/mk47:default
+
+
+**Reset Key**: Hold down the key located at *K01*, which programmed as *Esc* while plugging in the keyboard.
+
+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).
\ No newline at end of file
From 86a7051c61080078d6d33828aa894a52926f7a27 Mon Sep 17 00:00:00 2001
From: "jonylee@hfd" <108282809+jonylee1986@users.noreply.github.com>
Date: Tue, 21 Feb 2023 16:15:43 +0800
Subject: [PATCH 37/79] Update keyboards/hfdkb/keyboard_sw/mk47/mk47.c
Co-authored-by: jack <0x6a73@protonmail.com>
---
keyboards/hfdkb/keyboard_sw/mk47/mk47.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/mk47.c b/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
index 8cb7a7400bd1..b1500e4b434e 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
+++ b/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
@@ -220,7 +220,6 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
#ifdef VIA_ENABLE
case KC_RESET: {
if (record->event.pressed) {
-# include "via.h"
via_eeprom_set_valid(false);
eeconfig_init_via();
}
From 064b7ef9943f9eee4ff2c0f07dbebf51da7f1049 Mon Sep 17 00:00:00 2001
From: "jonylee@hfd" <108282809+jonylee1986@users.noreply.github.com>
Date: Tue, 21 Feb 2023 16:15:50 +0800
Subject: [PATCH 38/79] Update keyboards/hfdkb/keyboard_sw/mk47/mk47.h
Co-authored-by: jack <0x6a73@protonmail.com>
---
keyboards/hfdkb/keyboard_sw/mk47/mk47.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/mk47.h b/keyboards/hfdkb/keyboard_sw/mk47/mk47.h
index 8075340b1995..1d0e351b036b 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/mk47.h
+++ b/keyboards/hfdkb/keyboard_sw/mk47/mk47.h
@@ -18,6 +18,9 @@
#include "quantum.h"
+void led_test(uint8_t color);
+void clear_eeprom(void);
+
#define LAYOUT( \
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \
From d762a247c3d00d63f61b7a4ff5d6423e7fc62571 Mon Sep 17 00:00:00 2001
From: "jonylee@hfd" <108282809+jonylee1986@users.noreply.github.com>
Date: Tue, 21 Feb 2023 16:16:05 +0800
Subject: [PATCH 39/79] Update keyboards/hfdkb/keyboard_sw/mk47/mk47.c
Co-authored-by: jack <0x6a73@protonmail.com>
---
keyboards/hfdkb/keyboard_sw/mk47/mk47.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/mk47.c b/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
index b1500e4b434e..7f96071f6013 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
+++ b/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
@@ -181,9 +181,6 @@ static uint16_t scancode = 0;
HSV hsv;
-void led_test(uint8_t color);
-void clear_eeprom(void);
-
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
if (!process_record_user(keycode, record)) {
return false;
From e1b4fa8bf1a3e8103d38d3067ee301446d9ad00f Mon Sep 17 00:00:00 2001
From: "jonylee@hfd" <108282809+jonylee1986@users.noreply.github.com>
Date: Tue, 21 Feb 2023 16:16:14 +0800
Subject: [PATCH 40/79] Update keyboards/hfdkb/keyboard_sw/mk47/readme.md
Co-authored-by: jack <0x6a73@protonmail.com>
---
keyboards/hfdkb/keyboard_sw/mk47/readme.md | 3 +++
1 file changed, 3 insertions(+)
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/readme.md b/keyboards/hfdkb/keyboard_sw/mk47/readme.md
index 5249b932e685..31d74a4d4a77 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/readme.md
+++ b/keyboards/hfdkb/keyboard_sw/mk47/readme.md
@@ -9,6 +9,9 @@ Make example for this keyboard (after setting up your build environment):
make hfdkb/keyboard_sw/mk47:default
+Flashing example for this keyboard:
+
+ make hfdkb/keyboard_sw/mk47:default:flash
**Reset Key**: Hold down the key located at *K01*, which programmed as *Esc* while plugging in the keyboard.
From 3e64f5a9d0467ceee8b313dfee572a280fe8cc8b Mon Sep 17 00:00:00 2001
From: "jonylee@hfd" <108282809+jonylee1986@users.noreply.github.com>
Date: Tue, 21 Feb 2023 16:16:26 +0800
Subject: [PATCH 41/79] Update keyboards/hfdkb/keyboard_sw/mk47/readme.md
Co-authored-by: jack <0x6a73@protonmail.com>
---
keyboards/hfdkb/keyboard_sw/mk47/readme.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/readme.md b/keyboards/hfdkb/keyboard_sw/mk47/readme.md
index 31d74a4d4a77..8fc353bed462 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/readme.md
+++ b/keyboards/hfdkb/keyboard_sw/mk47/readme.md
@@ -3,7 +3,7 @@
A customizable 40% keyboard.
* Keyboard Maintainer: [jonylee@hfd](https://github.com/jonylee1986)
-* Hardware Supported: mk47
+* Hardware Supported: mk47 PCB w/ WB32FQ95
Make example for this keyboard (after setting up your build environment):
From 340e18741973c88fcfa5c11ee9fda0b2a3454149 Mon Sep 17 00:00:00 2001
From: jonylee1986 <2532487686@qq.com>
Date: Tue, 21 Feb 2023 16:58:19 +0800
Subject: [PATCH 42/79] override the behavior of the keycodes to control RGB
---
keyboards/hfdkb/keyboard_sw/mk47/config.h | 5 +--
keyboards/hfdkb/keyboard_sw/mk47/mk47.c | 55 ++++++++++++++++++++++-
keyboards/hfdkb/keyboard_sw/mk47/mk47.h | 1 +
3 files changed, 55 insertions(+), 6 deletions(-)
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/config.h b/keyboards/hfdkb/keyboard_sw/mk47/config.h
index 9a6136682c20..7cc45741b2f0 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/config.h
+++ b/keyboards/hfdkb/keyboard_sw/mk47/config.h
@@ -110,10 +110,7 @@
//#define ENABLE_RGB_MATRIX_SOLID_SPLASH
//#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
-#define RGB_MATRIX_HUE_STEP 25
-#define RGB_MATRIX_SAT_STEP 25
-#define RGB_MATRIX_VAL_STEP 50
-#define RGB_MATRIX_SPD_STEP 52
+#define RGB_MATRIX_DEFAULT_SPD UINT8_MAX/2
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 250 /* The maximum brightness level */
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/mk47.c b/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
index 7f96071f6013..e093b6509f07 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
+++ b/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
@@ -149,10 +149,10 @@ bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {
if (!rgb_matrix_indicators_advanced_user(led_min, led_max)) {
return false;
}
- // caps lock cyan
if (host_keyboard_led_state().caps_lock) {
- RGB_MATRIX_INDICATOR_SET_COLOR(12, 255, 255, 255);
+ RGB_MATRIX_INDICATOR_SET_COLOR(12, 255, 0, 0);
}
+
return true;
}
#endif
@@ -178,6 +178,7 @@ static bool while_test_flag = false;
static uint16_t current_time = 0;
static uint8_t glint_cnt = 0;
static uint16_t scancode = 0;
+static uint8_t RGB_HSV_level;
HSV hsv;
@@ -214,6 +215,52 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
Lkey_flag = 0;
}
return true;
+ case RGB_VAI:
+ if ((fn_make_flag && record->event.pressed)) {
+ if ((RGB_HSV_level = (uint8_t)rgb_matrix_get_val() / (RGB_MATRIX_MAXIMUM_BRIGHTNESS / 4)) < 4) {
+ RGB_HSV_level++;
+ rgb_matrix_config.hsv.v = (uint8_t)(RGB_MATRIX_MAXIMUM_BRIGHTNESS / 4) * RGB_HSV_level;
+ }
+ rgb_hsv_updata_user();
+ }
+ return false;
+ case RGB_VAD:
+ if ((fn_make_flag && record->event.pressed)) {
+ if ((RGB_HSV_level = (uint8_t)rgb_matrix_get_val() / (RGB_MATRIX_MAXIMUM_BRIGHTNESS / 4)) > 0) {
+ RGB_HSV_level--;
+ rgb_matrix_config.hsv.v = (uint8_t)(RGB_MATRIX_MAXIMUM_BRIGHTNESS / 4) * RGB_HSV_level;
+ }
+ rgb_hsv_updata_user();
+ }
+ return false;
+ case RGB_HUI:
+ if ((fn_make_flag && record->event.pressed)) {
+ if ((RGB_HSV_level = (uint8_t)rgb_matrix_get_hue() / (UINT8_MAX / 9)) < 9) {
+ RGB_HSV_level++;
+ }else{
+ RGB_HSV_level = 1;
+ }
+ rgb_matrix_config.hsv.h = (uint8_t)(UINT8_MAX / 9) * RGB_HSV_level;
+ rgb_hsv_updata_user();
+ }
+ return false;
+
+ case RGB_SPI:
+ if ((fn_make_flag && record->event.pressed)) {
+ if ((RGB_HSV_level = (uint8_t)rgb_matrix_get_speed() / (UINT8_MAX / 5)) < 5) {
+ RGB_HSV_level++;
+ rgb_matrix_set_speed((uint8_t)(UINT8_MAX / 5) * RGB_HSV_level);
+ }
+ }
+ return false;
+ case RGB_SPD:
+ if ((fn_make_flag && record->event.pressed)) {
+ if ((RGB_HSV_level = (uint8_t)rgb_matrix_get_speed() / (UINT8_MAX / 5)) > 0) {
+ RGB_HSV_level--;
+ rgb_matrix_set_speed((uint8_t)(UINT8_MAX / 5) * RGB_HSV_level);
+ }
+ }
+ return false;
#ifdef VIA_ENABLE
case KC_RESET: {
if (record->event.pressed) {
@@ -326,3 +373,7 @@ void clear_eeprom(void) {
rgb_matrix_enable_noeeprom();
}
+
+void rgb_hsv_updata_user(void) {
+ rgb_matrix_sethsv(rgb_matrix_config.hsv.h, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v);
+}
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/mk47.h b/keyboards/hfdkb/keyboard_sw/mk47/mk47.h
index 1d0e351b036b..4a3770ee2b34 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/mk47.h
+++ b/keyboards/hfdkb/keyboard_sw/mk47/mk47.h
@@ -20,6 +20,7 @@
void led_test(uint8_t color);
void clear_eeprom(void);
+void rgb_hsv_updata_user(void);
#define LAYOUT( \
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \
From 605ed7f9e61e2963fdaad3470c5bba518a5dd064 Mon Sep 17 00:00:00 2001
From: "jonylee@hfd" <108282809+jonylee1986@users.noreply.github.com>
Date: Tue, 7 Mar 2023 14:34:45 +0800
Subject: [PATCH 43/79] Update keyboards/hfdkb/keyboard_sw/mk47/mk47.c
Co-authored-by: Drashna Jaelre
---
keyboards/hfdkb/keyboard_sw/mk47/mk47.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/mk47.c b/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
index e093b6509f07..33a70a60e7b4 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
+++ b/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
@@ -262,7 +262,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
}
return false;
#ifdef VIA_ENABLE
- case KC_RESET: {
+ case QK_KB: {
if (record->event.pressed) {
via_eeprom_set_valid(false);
eeconfig_init_via();
From 5ff6aea03ac83b25a079d992fcbd9a60a9d67c09 Mon Sep 17 00:00:00 2001
From: jonylee1986 <2532487686@qq.com>
Date: Tue, 7 Mar 2023 15:13:27 +0800
Subject: [PATCH 44/79] update mk47.c mk47.h default/keymap.c
---
.../hfdkb/keyboard_sw/mk47/keymaps/default/keymap.c | 7 -------
keyboards/hfdkb/keyboard_sw/mk47/mk47.c | 13 -------------
keyboards/hfdkb/keyboard_sw/mk47/mk47.h | 9 +++++++++
3 files changed, 9 insertions(+), 20 deletions(-)
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/keymaps/default/keymap.c b/keyboards/hfdkb/keyboard_sw/mk47/keymaps/default/keymap.c
index ac68a9af0e78..8298d2511ad3 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/keymaps/default/keymap.c
+++ b/keyboards/hfdkb/keyboard_sw/mk47/keymaps/default/keymap.c
@@ -16,15 +16,8 @@
#include QMK_KEYBOARD_H
-enum custom_keycodes {
- KC_MISSION_CONTROL = QK_USER,
- KC_LAUNCHPAD
-};
-
#define KC_TASK LGUI(KC_TAB)
#define KC_FLXP LGUI(KC_E)
-#define KC_MCTL KC_MISSION_CONTROL
-#define KC_LPAD KC_LAUNCHPAD
// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/mk47.c b/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
index 33a70a60e7b4..541c7cdde179 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
+++ b/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
@@ -157,19 +157,6 @@ bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {
}
#endif
-#ifdef VIA_ENABLE
-enum custom_keycodes {
- KC_RESET = USER00,
-};
-#endif
-
-enum colors {
- WHITE,
- RED,
- GREEN,
- BLUE
-};
-enum colors led_color_status = WHITE;
static bool fn_make_flag = false;
static bool Lkey_flag = false;
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/mk47.h b/keyboards/hfdkb/keyboard_sw/mk47/mk47.h
index 4a3770ee2b34..63138ba9d237 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/mk47.h
+++ b/keyboards/hfdkb/keyboard_sw/mk47/mk47.h
@@ -18,6 +18,15 @@
#include "quantum.h"
+
+enum colors {
+ WHITE,
+ RED,
+ GREEN,
+ BLUE
+};
+enum colors led_color_status = WHITE;
+
void led_test(uint8_t color);
void clear_eeprom(void);
void rgb_hsv_updata_user(void);
From 40bc92219b526f10825881d817238626026a08d1 Mon Sep 17 00:00:00 2001
From: jonylee1986 <2532487686@qq.com>
Date: Tue, 7 Mar 2023 16:04:47 +0800
Subject: [PATCH 45/79] reset mk47.c
---
keyboards/hfdkb/keyboard_sw/mk47/mk47.c | 8 +++++++-
keyboards/hfdkb/keyboard_sw/mk47/mk47.h | 9 ---------
2 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/mk47.c b/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
index 541c7cdde179..bf6c3a66e678 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
+++ b/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
@@ -156,7 +156,13 @@ bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {
return true;
}
#endif
-
+enum colors {
+ WHITE,
+ RED,
+ GREEN,
+ BLUE
+};
+enum colors led_color_status = WHITE;
static bool fn_make_flag = false;
static bool Lkey_flag = false;
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/mk47.h b/keyboards/hfdkb/keyboard_sw/mk47/mk47.h
index 63138ba9d237..4a3770ee2b34 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/mk47.h
+++ b/keyboards/hfdkb/keyboard_sw/mk47/mk47.h
@@ -18,15 +18,6 @@
#include "quantum.h"
-
-enum colors {
- WHITE,
- RED,
- GREEN,
- BLUE
-};
-enum colors led_color_status = WHITE;
-
void led_test(uint8_t color);
void clear_eeprom(void);
void rgb_hsv_updata_user(void);
From eb046628431e8ad9085d197d6c5006f2bbaa15a8 Mon Sep 17 00:00:00 2001
From: jonylee1986 <2532487686@qq.com>
Date: Wed, 8 Mar 2023 11:23:27 +0800
Subject: [PATCH 46/79] update mk47.h
---
keyboards/hfdkb/keyboard_sw/mk47/mk47.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/mk47.h b/keyboards/hfdkb/keyboard_sw/mk47/mk47.h
index 4a3770ee2b34..7fa211086ed4 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/mk47.h
+++ b/keyboards/hfdkb/keyboard_sw/mk47/mk47.h
@@ -17,7 +17,7 @@
#pragma once
#include "quantum.h"
-
+enum colors;
void led_test(uint8_t color);
void clear_eeprom(void);
void rgb_hsv_updata_user(void);
From c7aa326b074f0444d1a454ea4ae0f13ec2fd5ec0 Mon Sep 17 00:00:00 2001
From: "jonylee@hfd" <108282809+jonylee1986@users.noreply.github.com>
Date: Wed, 8 Mar 2023 18:20:29 +0800
Subject: [PATCH 47/79] Update keyboards/hfdkb/keyboard_sw/mk47/mk47.c
Co-authored-by: Drashna Jaelre
---
keyboards/hfdkb/keyboard_sw/mk47/mk47.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/mk47.c b/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
index bf6c3a66e678..effab445e25c 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
+++ b/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
@@ -264,7 +264,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
}
#endif
default:
- return process_record_user(keycode, record);
+ return true;
}
}
From c0fcae5cbc7ee43bff3e2fc1c2c1353ea296da05 Mon Sep 17 00:00:00 2001
From: "jonylee@hfd" <108282809+jonylee1986@users.noreply.github.com>
Date: Wed, 8 Mar 2023 18:21:56 +0800
Subject: [PATCH 48/79] Update mk47.c
---
keyboards/hfdkb/keyboard_sw/mk47/mk47.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/mk47.c b/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
index effab445e25c..845068d8b98c 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
+++ b/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
@@ -254,15 +254,6 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
}
}
return false;
-#ifdef VIA_ENABLE
- case QK_KB: {
- if (record->event.pressed) {
- via_eeprom_set_valid(false);
- eeconfig_init_via();
- }
- return false;
- }
-#endif
default:
return true;
}
From bd7e7f5fd5a6ad5aa4228239fac892045edb821f Mon Sep 17 00:00:00 2001
From: jonylee1986 <2532487686@qq.com>
Date: Mon, 13 Mar 2023 14:10:06 +0800
Subject: [PATCH 49/79] update config.h,info.json,mk47.c delete mk47.h
---
keyboards/hfdkb/keyboard_sw/mk47/config.h | 9 +-
keyboards/hfdkb/keyboard_sw/mk47/info.json | 102 +++++++++++----------
keyboards/hfdkb/keyboard_sw/mk47/mk47.c | 12 +--
keyboards/hfdkb/keyboard_sw/mk47/mk47.h | 39 --------
4 files changed, 60 insertions(+), 102 deletions(-)
delete mode 100644 keyboards/hfdkb/keyboard_sw/mk47/mk47.h
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/config.h b/keyboards/hfdkb/keyboard_sw/mk47/config.h
index 7cc45741b2f0..594bffaa46f0 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/config.h
+++ b/keyboards/hfdkb/keyboard_sw/mk47/config.h
@@ -18,14 +18,7 @@
/* Force NKRO on boot up regardless of the setting saved in the EEPROM (uncomment to enable it) */
#define FORCE_NKRO
-
-/* key matrix pins */
-#define MATRIX_ROW_PINS { C6, C7, C8, C9 }
-#define MATRIX_COL_PINS { C1, C2, C3, A0, A1, A2, A3, A4, A5, A6, A7, C4 }
-/* COL2ROW or ROW2COL */
-#define DIODE_DIRECTION ROW2COL
-
-
+
#define TAP_CODE_DELAY 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/info.json b/keyboards/hfdkb/keyboard_sw/mk47/info.json
index 5a969bef8e54..dc89467aa314 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/info.json
+++ b/keyboards/hfdkb/keyboard_sw/mk47/info.json
@@ -9,61 +9,65 @@
},
"processor": "WB32FQ95",
"bootloader": "wb32-dfu",
+ "matrix_pins": {
+ "cols": ["C1","C2","C3","A0","A1","A2","A3","A4","A5","A6","A7","C4"],
+ "rows": ["C6", "C7", "C8", "C9"]
+ },
+ "diode_direction": "ROW2COL",
"layouts": {
"LAYOUT": {
"layout": [
- { "label": "Esc", "x": 0, "y": 0 },
- { "label": "F1", "x": 2, "y": 0 },
- { "label": "F2", "x": 3, "y": 0 },
- { "label": "F3", "x": 4, "y": 0 },
- { "label": "F4", "x": 5, "y": 0 },
- { "label": "F5", "x": 6.5, "y": 0 },
- { "label": "F6", "x": 7.5, "y": 0 },
- { "label": "F7", "x": 8.5, "y": 0 },
- { "label": "F8", "x": 9.5, "y": 0 },
- { "label": "F9", "x": 11, "y": 0 },
- { "label": "F10", "x": 12, "y": 0 },
- { "label": "F11", "x": 13, "y": 0 },
- { "label": "F12", "x": 14, "y": 0 },
- { "label": "PrtSc", "x": 15.25, "y": 0 },
- { "label": "Scroll Lock", "x": 16.25, "y": 0 },
- { "label": "Pause", "x": 17.25, "y": 0 },
-
- { "label": "~", "x": 0, "y": 1.25 },
- { "label": "!", "x": 1, "y": 1.25 },
- { "label": "@", "x": 2, "y": 1.25 },
- { "label": "#", "x": 3, "y": 1.25 },
- { "label": "$", "x": 4, "y": 1.25 },
- { "label": "%", "x": 5, "y": 1.25 },
- { "label": "^", "x": 6, "y": 1.25 },
- { "label": "&", "x": 7, "y": 1.25 },
- { "label": "*", "x": 8, "y": 1.25 },
- { "label": "(", "x": 9, "y": 1.25 },
- { "label": ")", "x": 10, "y": 1.25 },
- { "label": "_", "x": 11, "y": 1.25 },
- { "label": "+", "x": 12, "y": 1.25 },
- { "label": "Bksp", "x": 14, "y": 1.25 },
- { "label": "Insert", "x": 15.25, "y": 1.25 },
- { "label": "Home", "x": 16.25, "y": 1.25 },
- { "label": "PgUp", "x": 17.25, "y": 1.25 },
+ { "label": "Esc", "matrix": [0, 0],"x": 0, "y": 0 },
+ { "label": "Q", "matrix": [0, 1], "x": 1, "y": 0 },
+ { "label": "W", "matrix": [0, 2], "x": 2, "y": 0 },
+ { "label": "E", "matrix": [0, 3], "x": 3, "y": 0 },
+ { "label": "R", "matrix": [0, 4], "x": 4, "y": 0 },
+ { "label": "T", "matrix": [0, 5], "x": 5, "y": 0 },
+ { "label": "Y", "matrix": [0, 6], "x": 6, "y": 0 },
+ { "label": "U", "matrix": [0, 7], "x": 7, "y": 0 },
+ { "label": "I", "matrix": [0, 8], "x": 8, "y": 0 },
+ { "label": "O", "matrix": [0, 9], "x": 9, "y": 0 },
+ { "label": "P", "matrix": [0, 10], "x": 10, "y": 0 },
+ { "label": "BackSpace", "matrix": [0, 11], "x": 11, "y": 0 },
- { "label": "Tab", "x": 0, "y": 2.25, "w": 1.5 },
- { "label": "Q", "x": 1.5, "y": 2.25 },
- { "label": "W", "x": 2.5, "y": 2.25 },
- { "label": "E", "x": 3.5, "y": 2.25 },
- { "label": "R", "x": 4.5, "y": 2.25 },
- { "label": "T", "x": 5.5, "y": 2.25 },
- { "label": "Y", "x": 6.5, "y": 2.25 },
- { "label": "U", "x": 7.5, "y": 2.25 },
- { "label": "I", "x": 8.5, "y": 2.25 },
- { "label": "O", "x": 9.5, "y": 2.25 },
- { "label": "P", "x": 10.5, "y": 2.25 },
- { "label": "{", "x": 11.5, "y": 2.25 },
- { "label": "}", "x": 12.5, "y": 2.25 },
+
+ { "label": "Tab", "matrix": [1, 0], "x": 0, "y": 1 },
+ { "label": "A", "matrix": [1, 1], "x": 1, "y": 1 },
+ { "label": "S", "matrix": [1, 2], "x": 2, "y": 1 },
+ { "label": "D", "matrix": [1, 3], "x": 3, "y": 1 },
+ { "label": "F", "matrix": [1, 4], "x": 4, "y": 1 },
+ { "label": "G", "matrix": [1, 5], "x": 5, "y": 1 },
+ { "label": "H", "matrix": [1, 6], "x": 6, "y": 1 },
+ { "label": "J", "matrix": [1, 7], "x": 7, "y": 1 },
+ { "label": "K", "matrix": [1, 8], "x": 8, "y": 1 },
+ { "label": "L", "matrix": [1, 9], "x": 9, "y": 1 },
+ { "label": ":", "matrix": [1, 10], "x": 10, "y": 1 },
+ { "label": "Enter", "matrix": [1, 11], "x": 11, "y": 1 },
+ { "label": "Shift", "matrix": [2, 0], "x": 0, "y": 2 },
+ { "label": "Z", "matrix": [2, 1], "x": 1, "y": 2 },
+ { "label": "X", "matrix": [2, 2], "x": 2, "y": 2 },
+ { "label": "C", "matrix": [2, 3], "x": 3, "y": 2 },
+ { "label": "V", "matrix": [2, 4], "x": 4, "y": 2 },
+ { "label": "B", "matrix": [2, 5], "x": 5, "y": 2 },
+ { "label": "N", "matrix": [2, 6], "x": 6, "y": 2 },
+ { "label": "M", "matrix": [2, 7], "x": 7, "y": 2 },
+ { "label": "<", "matrix": [2, 8], "x": 8, "y": 2 },
+ { "label": ">", "matrix": [2, 9], "x": 9, "y": 2 },
+ { "label": "Up", "matrix": [2, 10], "x": 10, "y": 2 },
+ { "label": "?", "matrix": [2, 11], "x": 11, "y": 2 },
-
- { "label": "|", "x": 13.5, "y": 2.25, "w": 1.5 }
+ { "label": "Ctrl", "matrix": [3, 0], "x": 0, "y": 3 },
+ { "label": "Win", "matrix": [3, 1],"x": 1, "y": 3 },
+ { "label": "Alt", "matrix": [3, 2],"x": 2, "y": 3 },
+ { "label": "Hyper", "matrix": [3, 3], "x": 3, "y": 3 },
+ { "label": "Lower", "matrix": [3, 4], "x": 4, "y": 3 },
+ { "label": "Space", "matrix": [3, 5], "w": 2, "x": 5, "y": 3 },
+ { "label": "Ralse", "matrix": [3, 7], "x": 7, "y": 3 },
+ { "label": "Fn", "matrix": [3, 8], "x": 8, "y": 3 },
+ { "label": "Left", "matrix": [3, 9], "x": 9, "y": 3 },
+ { "label": "Down", "matrix": [3, 10], "x": 10, "y": 3 },
+ { "label": "Right", "matrix": [3, 11], "x": 11, "y": 3 }
]
}
}
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/mk47.c b/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
index 845068d8b98c..a32066a79259 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
+++ b/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
@@ -14,7 +14,7 @@
* along with this program. If not, see .
*/
-#include "mk47.h"
+#include "quantum.h"
#ifdef RGB_MATRIX_ENABLE
const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
@@ -209,7 +209,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
}
return true;
case RGB_VAI:
- if ((fn_make_flag && record->event.pressed)) {
+ if (record->event.pressed) {
if ((RGB_HSV_level = (uint8_t)rgb_matrix_get_val() / (RGB_MATRIX_MAXIMUM_BRIGHTNESS / 4)) < 4) {
RGB_HSV_level++;
rgb_matrix_config.hsv.v = (uint8_t)(RGB_MATRIX_MAXIMUM_BRIGHTNESS / 4) * RGB_HSV_level;
@@ -218,7 +218,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
}
return false;
case RGB_VAD:
- if ((fn_make_flag && record->event.pressed)) {
+ if (record->event.pressed) {
if ((RGB_HSV_level = (uint8_t)rgb_matrix_get_val() / (RGB_MATRIX_MAXIMUM_BRIGHTNESS / 4)) > 0) {
RGB_HSV_level--;
rgb_matrix_config.hsv.v = (uint8_t)(RGB_MATRIX_MAXIMUM_BRIGHTNESS / 4) * RGB_HSV_level;
@@ -227,7 +227,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
}
return false;
case RGB_HUI:
- if ((fn_make_flag && record->event.pressed)) {
+ if (record->event.pressed) {
if ((RGB_HSV_level = (uint8_t)rgb_matrix_get_hue() / (UINT8_MAX / 9)) < 9) {
RGB_HSV_level++;
}else{
@@ -239,7 +239,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
return false;
case RGB_SPI:
- if ((fn_make_flag && record->event.pressed)) {
+ if (record->event.pressed) {
if ((RGB_HSV_level = (uint8_t)rgb_matrix_get_speed() / (UINT8_MAX / 5)) < 5) {
RGB_HSV_level++;
rgb_matrix_set_speed((uint8_t)(UINT8_MAX / 5) * RGB_HSV_level);
@@ -247,7 +247,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
}
return false;
case RGB_SPD:
- if ((fn_make_flag && record->event.pressed)) {
+ if (record->event.pressed) {
if ((RGB_HSV_level = (uint8_t)rgb_matrix_get_speed() / (UINT8_MAX / 5)) > 0) {
RGB_HSV_level--;
rgb_matrix_set_speed((uint8_t)(UINT8_MAX / 5) * RGB_HSV_level);
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/mk47.h b/keyboards/hfdkb/keyboard_sw/mk47/mk47.h
deleted file mode 100644
index 7fa211086ed4..000000000000
--- a/keyboards/hfdkb/keyboard_sw/mk47/mk47.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Copyright (C) 2022 jonylee@hfd
- *
- * 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 .
- */
-
-#pragma once
-
-#include "quantum.h"
-enum colors;
-void led_test(uint8_t color);
-void clear_eeprom(void);
-void rgb_hsv_updata_user(void);
-
-#define LAYOUT( \
- K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \
- K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \
- K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \
- K300, K301, K302, K303, K304, K305, K307, K308, K309, K310, K311 \
-) { \
- { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \
- { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111 }, \
- { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \
- { K300, K301, K302, K303, K304, K305, KC_NO, K307, K308, K309, K310, K311 } \
-}
-// clang-format on
-
-
-
From b3619c945d5d42d4b21b97189b184c2561a873f2 Mon Sep 17 00:00:00 2001
From: jonylee1986 <2532487686@qq.com>
Date: Mon, 13 Mar 2023 14:14:44 +0800
Subject: [PATCH 50/79] update mk47.c
---
keyboards/hfdkb/keyboard_sw/mk47/mk47.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/mk47.c b/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
index a32066a79259..198c2f5ec739 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
+++ b/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
@@ -15,7 +15,6 @@
*/
#include "quantum.h"
-
#ifdef RGB_MATRIX_ENABLE
const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
@@ -174,6 +173,9 @@ static uint16_t scancode = 0;
static uint8_t RGB_HSV_level;
HSV hsv;
+void led_test(uint8_t color);
+void clear_eeprom(void);
+void rgb_hsv_updata_user(void);
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
if (!process_record_user(keycode, record)) {
From 2deb91876cf2b108d746f987475dd808adf6d012 Mon Sep 17 00:00:00 2001
From: "jonylee@hfd" <108282809+jonylee1986@users.noreply.github.com>
Date: Wed, 22 Mar 2023 16:02:46 +0800
Subject: [PATCH 51/79] Update mk47.c
Add #ifndef DISABLE_MK4_KEYCODES
---
keyboards/hfdkb/keyboard_sw/mk47/mk47.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/mk47.c b/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
index 198c2f5ec739..d2ca85712667 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
+++ b/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
@@ -163,14 +163,17 @@ enum colors {
};
enum colors led_color_status = WHITE;
-static bool fn_make_flag = false;
static bool Lkey_flag = false;
static bool reset_glint_flag = false;
static bool while_test_flag = false;
static uint16_t current_time = 0;
static uint8_t glint_cnt = 0;
static uint16_t scancode = 0;
+
+#ifndef DISABLE_MK4_KEYCODES
+static bool fn_make_flag = false;
static uint8_t RGB_HSV_level;
+#endif
HSV hsv;
void led_test(uint8_t color);
@@ -182,6 +185,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
return false;
}
switch (keycode) {
+#ifndef DISABLE_MK4_KEYCODES
case MO(1):
fn_make_flag = record->event.pressed;
return true;
@@ -256,7 +260,8 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
}
}
return false;
- default:
+#endif
+ default:
return true;
}
}
From 7092c0cd353d10d02556ad6fc99167d144937d0c Mon Sep 17 00:00:00 2001
From: "jonylee@hfd" <108282809+jonylee1986@users.noreply.github.com>
Date: Wed, 22 Mar 2023 16:04:55 +0800
Subject: [PATCH 52/79] Update mk47.c
---
keyboards/hfdkb/keyboard_sw/mk47/mk47.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/mk47.c b/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
index d2ca85712667..1f6c04c756d0 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
+++ b/keyboards/hfdkb/keyboard_sw/mk47/mk47.c
@@ -170,7 +170,7 @@ static uint16_t current_time = 0;
static uint8_t glint_cnt = 0;
static uint16_t scancode = 0;
-#ifndef DISABLE_MK4_KEYCODES
+#ifndef DISABLE_MK47_KEYCODES
static bool fn_make_flag = false;
static uint8_t RGB_HSV_level;
#endif
@@ -185,7 +185,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
return false;
}
switch (keycode) {
-#ifndef DISABLE_MK4_KEYCODES
+#ifndef DISABLE_MK47_KEYCODES
case MO(1):
fn_make_flag = record->event.pressed;
return true;
From fe2a67cd47561c61975bd46956494cdb3d686309 Mon Sep 17 00:00:00 2001
From: "jonylee@hfd" <108282809+jonylee1986@users.noreply.github.com>
Date: Wed, 22 Mar 2023 16:06:50 +0800
Subject: [PATCH 53/79] Update config.h
---
keyboards/hfdkb/keyboard_sw/mk47/config.h | 29 +----------------------
1 file changed, 1 insertion(+), 28 deletions(-)
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/config.h b/keyboards/hfdkb/keyboard_sw/mk47/config.h
index 594bffaa46f0..a3f05d14b95a 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/config.h
+++ b/keyboards/hfdkb/keyboard_sw/mk47/config.h
@@ -57,16 +57,7 @@
// RGB Matrix Animation modes. Explicitly enabled
// For full list of effects, see:
// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
-// #define ENABLE_RGB_MATRIX_ALPHAS_MODS
-// #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
-// #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
#define ENABLE_RGB_MATRIX_BREATHING
-// #define ENABLE_RGB_MATRIX_BAND_SAT
-// #define ENABLE_RGB_MATRIX_BAND_VAL
-// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
-// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
-// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
-// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
#define ENABLE_RGB_MATRIX_CYCLE_ALL
#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
@@ -77,33 +68,15 @@
#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
#define ENABLE_RGB_MATRIX_DUAL_BEACON
#define ENABLE_RGB_MATRIX_RAINBOW_BEACON
-// #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
#define ENABLE_RGB_MATRIX_RAINDROPS
-// #define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
-// #define ENABLE_RGB_MATRIX_HUE_BREATHING
-// #define ENABLE_RGB_MATRIX_HUE_PENDULUM
-// #define ENABLE_RGB_MATRIX_HUE_WAVE
-// #define ENABLE_RGB_MATRIX_PIXEL_RAIN
-// #define ENABLE_RGB_MATRIX_PIXEL_FLOW
-// #define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined
#define ENABLE_RGB_MATRIX_TYPING_HEATMAP
-//#define ENABLE_RGB_MATRIX_DIGITAL_RAIN
// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE
-//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
-//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
-//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
-//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
-//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
-//#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
-//#define ENABLE_RGB_MATRIX_SPLASH
#define ENABLE_RGB_MATRIX_MULTISPLASH
-//#define ENABLE_RGB_MATRIX_SOLID_SPLASH
-//#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
-#define RGB_MATRIX_DEFAULT_SPD UINT8_MAX/2
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 250 /* The maximum brightness level */
+//#define DISABLE_MK47_KEYCODES /*If you need to change or restore the default QMK button function, please open it*/
From 05b5eee5a44b7f169fa109dae9146c568d22f2af Mon Sep 17 00:00:00 2001
From: "jonylee@hfd" <108282809+jonylee1986@users.noreply.github.com>
Date: Thu, 23 Mar 2023 14:04:39 +0800
Subject: [PATCH 54/79] Update readme.md
---
keyboards/hfdkb/keyboard_sw/mk47/readme.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/readme.md b/keyboards/hfdkb/keyboard_sw/mk47/readme.md
index 8fc353bed462..6f91a3d63bf0 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/readme.md
+++ b/keyboards/hfdkb/keyboard_sw/mk47/readme.md
@@ -13,6 +13,6 @@ Flashing example for this keyboard:
make hfdkb/keyboard_sw/mk47:default:flash
-**Reset Key**: Hold down the key located at *K01*, which programmed as *Esc* while plugging in the keyboard.
+**Reset Key**: Hold down the key located at *K00*, which programmed as *Esc* while plugging in the keyboard.
-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).
\ No newline at end of file
+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).
From aa0ef55e42f55ceffd95b0884c36b4b50680d602 Mon Sep 17 00:00:00 2001
From: "jonylee@hfd" <108282809+jonylee1986@users.noreply.github.com>
Date: Thu, 23 Mar 2023 14:15:35 +0800
Subject: [PATCH 55/79] Update keymap.c
---
keyboards/hfdkb/keyboard_sw/mk47/keymaps/default/keymap.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/keymaps/default/keymap.c b/keyboards/hfdkb/keyboard_sw/mk47/keymaps/default/keymap.c
index 8298d2511ad3..1f61f0768ab5 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/keymaps/default/keymap.c
+++ b/keyboards/hfdkb/keyboard_sw/mk47/keymaps/default/keymap.c
@@ -16,9 +16,6 @@
#include QMK_KEYBOARD_H
-#define KC_TASK LGUI(KC_TAB)
-#define KC_FLXP LGUI(KC_E)
-
// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
From 4917d0d123bd94e8bd22355270478637479e34c4 Mon Sep 17 00:00:00 2001
From: "jonylee@hfd" <108282809+jonylee1986@users.noreply.github.com>
Date: Thu, 23 Mar 2023 17:25:47 +0800
Subject: [PATCH 56/79] Update info.json
---
keyboards/hfdkb/keyboard_sw/mk47/info.json | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/info.json b/keyboards/hfdkb/keyboard_sw/mk47/info.json
index dc89467aa314..8cc54c5a7333 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/info.json
+++ b/keyboards/hfdkb/keyboard_sw/mk47/info.json
@@ -9,6 +9,19 @@
},
"processor": "WB32FQ95",
"bootloader": "wb32-dfu",
+ "features": {
+ "bootmagic": true,
+ "mousekey": false,
+ "extrakey": true,
+ "console": false,
+ "command": false,
+ "nkro": true,
+ "rgblight": false,
+ "backlight": false,
+ "audio": false,
+ "encoder": false,
+ "rgb_matrix": true
+ },
"matrix_pins": {
"cols": ["C1","C2","C3","A0","A1","A2","A3","A4","A5","A6","A7","C4"],
"rows": ["C6", "C7", "C8", "C9"]
From 86649248c061849e8d7a9817a4054e13bcc2c962 Mon Sep 17 00:00:00 2001
From: "jonylee@hfd" <108282809+jonylee1986@users.noreply.github.com>
Date: Thu, 23 Mar 2023 17:26:26 +0800
Subject: [PATCH 57/79] Update rules.mk
---
keyboards/hfdkb/keyboard_sw/mk47/rules.mk | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/rules.mk b/keyboards/hfdkb/keyboard_sw/mk47/rules.mk
index 8745373968cf..27cf6396ee23 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/rules.mk
+++ b/keyboards/hfdkb/keyboard_sw/mk47/rules.mk
@@ -1,17 +1,6 @@
# 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 = yes # Enable N-Key Rollover
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
-RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
-AUDIO_ENABLE = no # Audio output
-ENCODER_ENABLE = no
-RGB_MATRIX_ENABLE = yes
RGB_MATRIX_DRIVER = IS31FL3733
EEPROM_DRIVER = wear_leveling
WEAR_LEVELING_DRIVER = spi_flash
From 206777da2ad2443df54d49fabdf477d523793c21 Mon Sep 17 00:00:00 2001
From: "jonylee@hfd" <108282809+jonylee1986@users.noreply.github.com>
Date: Fri, 24 Mar 2023 09:20:22 +0800
Subject: [PATCH 58/79] Update keyboards/hfdkb/keyboard_sw/mk47/config.h
Co-authored-by: Joel Challis
---
keyboards/hfdkb/keyboard_sw/mk47/config.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/config.h b/keyboards/hfdkb/keyboard_sw/mk47/config.h
index a3f05d14b95a..373d220947ae 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/config.h
+++ b/keyboards/hfdkb/keyboard_sw/mk47/config.h
@@ -48,7 +48,6 @@
#define RGB_MATRIX_LED_COUNT 47
#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
-#define RGB_MATRIX_CENTER {112,32}
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_MATRIX_KEYPRESSES
From 7587887b3d291258d607602e8a7d5ed3368f9fec Mon Sep 17 00:00:00 2001
From: "jonylee@hfd" <108282809+jonylee1986@users.noreply.github.com>
Date: Fri, 24 Mar 2023 09:21:20 +0800
Subject: [PATCH 59/79] Update keyboards/hfdkb/keyboard_sw/mk47/info.json
Co-authored-by: Joel Challis
---
keyboards/hfdkb/keyboard_sw/mk47/info.json | 4 ----
1 file changed, 4 deletions(-)
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/info.json b/keyboards/hfdkb/keyboard_sw/mk47/info.json
index 8cc54c5a7333..cd2587c4129e 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/info.json
+++ b/keyboards/hfdkb/keyboard_sw/mk47/info.json
@@ -16,10 +16,6 @@
"console": false,
"command": false,
"nkro": true,
- "rgblight": false,
- "backlight": false,
- "audio": false,
- "encoder": false,
"rgb_matrix": true
},
"matrix_pins": {
From 696a49d3d9713966ff57e16fda23e804bb75d7bf Mon Sep 17 00:00:00 2001
From: "jonylee@hfd" <108282809+jonylee1986@users.noreply.github.com>
Date: Fri, 24 Mar 2023 10:20:52 +0800
Subject: [PATCH 60/79] Update keyboards/hfdkb/keyboard_sw/mk47/config.h
Co-authored-by: Joel Challis
---
keyboards/hfdkb/keyboard_sw/mk47/config.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/config.h b/keyboards/hfdkb/keyboard_sw/mk47/config.h
index 373d220947ae..29292a98ddc1 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/config.h
+++ b/keyboards/hfdkb/keyboard_sw/mk47/config.h
@@ -75,7 +75,5 @@
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE
#define ENABLE_RGB_MATRIX_MULTISPLASH
-#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 250 /* The maximum brightness level */
-
//#define DISABLE_MK47_KEYCODES /*If you need to change or restore the default QMK button function, please open it*/
From 49f6a50cd34500121374b0465dbd35839560328e Mon Sep 17 00:00:00 2001
From: "jonylee@hfd" <108282809+jonylee1986@users.noreply.github.com>
Date: Fri, 24 Mar 2023 10:28:35 +0800
Subject: [PATCH 61/79] Update config.h
---
keyboards/hfdkb/keyboard_sw/mk47/config.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/config.h b/keyboards/hfdkb/keyboard_sw/mk47/config.h
index 29292a98ddc1..5f6aba9e6acd 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/config.h
+++ b/keyboards/hfdkb/keyboard_sw/mk47/config.h
@@ -75,5 +75,7 @@
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE
#define ENABLE_RGB_MATRIX_MULTISPLASH
+#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 /* The maximum brightness level */
+
//#define DISABLE_MK47_KEYCODES /*If you need to change or restore the default QMK button function, please open it*/
From c413192d0f851f62a34cc3ece099855aa118f863 Mon Sep 17 00:00:00 2001
From: "jonylee@hfd" <108282809+jonylee1986@users.noreply.github.com>
Date: Thu, 30 Mar 2023 09:45:46 +0800
Subject: [PATCH 62/79] Update readme.md
---
keyboards/hfdkb/keyboard_sw/mk47/readme.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/readme.md b/keyboards/hfdkb/keyboard_sw/mk47/readme.md
index 6f91a3d63bf0..5f7131079155 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/readme.md
+++ b/keyboards/hfdkb/keyboard_sw/mk47/readme.md
@@ -3,7 +3,7 @@
A customizable 40% keyboard.
* Keyboard Maintainer: [jonylee@hfd](https://github.com/jonylee1986)
-* Hardware Supported: mk47 PCB w/ WB32FQ95
+* Hardware Supported: mk47
Make example for this keyboard (after setting up your build environment):
From 10a7af910fa7f5782773b757a52159f318c5b0a6 Mon Sep 17 00:00:00 2001
From: "jonylee@hfd" <108282809+jonylee1986@users.noreply.github.com>
Date: Fri, 31 Mar 2023 14:21:55 +0800
Subject: [PATCH 63/79] Update info.json
"manufacturer": "http://www.hfdic.com/",
---
keyboards/hfdkb/keyboard_sw/mk47/info.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/info.json b/keyboards/hfdkb/keyboard_sw/mk47/info.json
index cd2587c4129e..78607207fd70 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/info.json
+++ b/keyboards/hfdkb/keyboard_sw/mk47/info.json
@@ -1,6 +1,6 @@
{
"keyboard_name": "MK47",
- "manufacturer": "www.hfd.cn",
+ "manufacturer": "http://www.hfdic.com/",
"maintainer": "hfd",
"usb": {
"vid": "0xFFFE",
From abe21011365e112d84d660748efa57a0c84b743c Mon Sep 17 00:00:00 2001
From: jonylee1986 <2532487686@qq.com>
Date: Sat, 1 Apr 2023 11:08:25 +0800
Subject: [PATCH 64/79] Rename the folder "hfdkb" to "Inland"
---
keyboards/{hfdkb => inland}/keyboard_sw/mk47/config.h | 0
keyboards/{hfdkb => inland}/keyboard_sw/mk47/halconf.h | 0
keyboards/{hfdkb => inland}/keyboard_sw/mk47/info.json | 2 +-
.../keyboard_sw/mk47/keymaps/default/keymap.c | 0
.../{hfdkb => inland}/keyboard_sw/mk47/keymaps/via/keymap.c | 0
.../{hfdkb => inland}/keyboard_sw/mk47/keymaps/via/rules.mk | 0
keyboards/{hfdkb => inland}/keyboard_sw/mk47/mcuconf.h | 0
keyboards/{hfdkb => inland}/keyboard_sw/mk47/mk47.c | 0
keyboards/{hfdkb => inland}/keyboard_sw/mk47/readme.md | 4 ++--
keyboards/{hfdkb => inland}/keyboard_sw/mk47/rules.mk | 0
10 files changed, 3 insertions(+), 3 deletions(-)
rename keyboards/{hfdkb => inland}/keyboard_sw/mk47/config.h (100%)
rename keyboards/{hfdkb => inland}/keyboard_sw/mk47/halconf.h (100%)
rename keyboards/{hfdkb => inland}/keyboard_sw/mk47/info.json (98%)
rename keyboards/{hfdkb => inland}/keyboard_sw/mk47/keymaps/default/keymap.c (100%)
rename keyboards/{hfdkb => inland}/keyboard_sw/mk47/keymaps/via/keymap.c (100%)
rename keyboards/{hfdkb => inland}/keyboard_sw/mk47/keymaps/via/rules.mk (100%)
rename keyboards/{hfdkb => inland}/keyboard_sw/mk47/mcuconf.h (100%)
rename keyboards/{hfdkb => inland}/keyboard_sw/mk47/mk47.c (100%)
rename keyboards/{hfdkb => inland}/keyboard_sw/mk47/readme.md (87%)
rename keyboards/{hfdkb => inland}/keyboard_sw/mk47/rules.mk (100%)
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/config.h b/keyboards/inland/keyboard_sw/mk47/config.h
similarity index 100%
rename from keyboards/hfdkb/keyboard_sw/mk47/config.h
rename to keyboards/inland/keyboard_sw/mk47/config.h
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/halconf.h b/keyboards/inland/keyboard_sw/mk47/halconf.h
similarity index 100%
rename from keyboards/hfdkb/keyboard_sw/mk47/halconf.h
rename to keyboards/inland/keyboard_sw/mk47/halconf.h
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/info.json b/keyboards/inland/keyboard_sw/mk47/info.json
similarity index 98%
rename from keyboards/hfdkb/keyboard_sw/mk47/info.json
rename to keyboards/inland/keyboard_sw/mk47/info.json
index 78607207fd70..3c6c8452b2a9 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/info.json
+++ b/keyboards/inland/keyboard_sw/mk47/info.json
@@ -1,6 +1,6 @@
{
"keyboard_name": "MK47",
- "manufacturer": "http://www.hfdic.com/",
+ "manufacturer": "https://www.microcenter.com",
"maintainer": "hfd",
"usb": {
"vid": "0xFFFE",
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/keymaps/default/keymap.c b/keyboards/inland/keyboard_sw/mk47/keymaps/default/keymap.c
similarity index 100%
rename from keyboards/hfdkb/keyboard_sw/mk47/keymaps/default/keymap.c
rename to keyboards/inland/keyboard_sw/mk47/keymaps/default/keymap.c
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/keymaps/via/keymap.c b/keyboards/inland/keyboard_sw/mk47/keymaps/via/keymap.c
similarity index 100%
rename from keyboards/hfdkb/keyboard_sw/mk47/keymaps/via/keymap.c
rename to keyboards/inland/keyboard_sw/mk47/keymaps/via/keymap.c
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/keymaps/via/rules.mk b/keyboards/inland/keyboard_sw/mk47/keymaps/via/rules.mk
similarity index 100%
rename from keyboards/hfdkb/keyboard_sw/mk47/keymaps/via/rules.mk
rename to keyboards/inland/keyboard_sw/mk47/keymaps/via/rules.mk
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/mcuconf.h b/keyboards/inland/keyboard_sw/mk47/mcuconf.h
similarity index 100%
rename from keyboards/hfdkb/keyboard_sw/mk47/mcuconf.h
rename to keyboards/inland/keyboard_sw/mk47/mcuconf.h
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/mk47.c b/keyboards/inland/keyboard_sw/mk47/mk47.c
similarity index 100%
rename from keyboards/hfdkb/keyboard_sw/mk47/mk47.c
rename to keyboards/inland/keyboard_sw/mk47/mk47.c
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/readme.md b/keyboards/inland/keyboard_sw/mk47/readme.md
similarity index 87%
rename from keyboards/hfdkb/keyboard_sw/mk47/readme.md
rename to keyboards/inland/keyboard_sw/mk47/readme.md
index 5f7131079155..ee3ced891552 100644
--- a/keyboards/hfdkb/keyboard_sw/mk47/readme.md
+++ b/keyboards/inland/keyboard_sw/mk47/readme.md
@@ -7,11 +7,11 @@ A customizable 40% keyboard.
Make example for this keyboard (after setting up your build environment):
- make hfdkb/keyboard_sw/mk47:default
+ make inland/keyboard_sw/mk47:default
Flashing example for this keyboard:
- make hfdkb/keyboard_sw/mk47:default:flash
+ make inland/keyboard_sw/mk47:default:flash
**Reset Key**: Hold down the key located at *K00*, which programmed as *Esc* while plugging in the keyboard.
diff --git a/keyboards/hfdkb/keyboard_sw/mk47/rules.mk b/keyboards/inland/keyboard_sw/mk47/rules.mk
similarity index 100%
rename from keyboards/hfdkb/keyboard_sw/mk47/rules.mk
rename to keyboards/inland/keyboard_sw/mk47/rules.mk
From cb882183821b9ccdf8d1f17a7340d9ef91fc5d4b Mon Sep 17 00:00:00 2001
From: "jonylee@hfd" <108282809+jonylee1986@users.noreply.github.com>
Date: Mon, 3 Apr 2023 09:42:23 +0800
Subject: [PATCH 65/79] Update info.json
---
keyboards/inland/keyboard_sw/mk47/info.json | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/keyboards/inland/keyboard_sw/mk47/info.json b/keyboards/inland/keyboard_sw/mk47/info.json
index 3c6c8452b2a9..a20d43a1529f 100644
--- a/keyboards/inland/keyboard_sw/mk47/info.json
+++ b/keyboards/inland/keyboard_sw/mk47/info.json
@@ -1,7 +1,8 @@
{
"keyboard_name": "MK47",
- "manufacturer": "https://www.microcenter.com",
- "maintainer": "hfd",
+ "manufacturer": "Inland",
+ "maintainer": "jonylee@hfd",
+ "url":"",
"usb": {
"vid": "0xFFFE",
"pid": "0x0002",
From 4fb690a4c2a8be9a59833d7441c18590622c33b1 Mon Sep 17 00:00:00 2001
From: jonylee1986 <2532487686@qq.com>
Date: Mon, 3 Apr 2023 10:14:27 +0800
Subject: [PATCH 66/79] =?UTF-8?q?delete=20=E2=80=9Ckeyboard=5Fsw=E2=80=9D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
keyboards/inland/{keyboard_sw => }/mk47/config.h | 0
keyboards/inland/{keyboard_sw => }/mk47/halconf.h | 0
keyboards/inland/{keyboard_sw => }/mk47/info.json | 0
.../inland/{keyboard_sw => }/mk47/keymaps/default/keymap.c | 0
keyboards/inland/{keyboard_sw => }/mk47/keymaps/via/keymap.c | 0
keyboards/inland/{keyboard_sw => }/mk47/keymaps/via/rules.mk | 0
keyboards/inland/{keyboard_sw => }/mk47/mcuconf.h | 0
keyboards/inland/{keyboard_sw => }/mk47/mk47.c | 0
keyboards/inland/{keyboard_sw => }/mk47/readme.md | 5 +++--
keyboards/inland/{keyboard_sw => }/mk47/rules.mk | 0
10 files changed, 3 insertions(+), 2 deletions(-)
rename keyboards/inland/{keyboard_sw => }/mk47/config.h (100%)
rename keyboards/inland/{keyboard_sw => }/mk47/halconf.h (100%)
rename keyboards/inland/{keyboard_sw => }/mk47/info.json (100%)
rename keyboards/inland/{keyboard_sw => }/mk47/keymaps/default/keymap.c (100%)
rename keyboards/inland/{keyboard_sw => }/mk47/keymaps/via/keymap.c (100%)
rename keyboards/inland/{keyboard_sw => }/mk47/keymaps/via/rules.mk (100%)
rename keyboards/inland/{keyboard_sw => }/mk47/mcuconf.h (100%)
rename keyboards/inland/{keyboard_sw => }/mk47/mk47.c (100%)
rename keyboards/inland/{keyboard_sw => }/mk47/readme.md (75%)
rename keyboards/inland/{keyboard_sw => }/mk47/rules.mk (100%)
diff --git a/keyboards/inland/keyboard_sw/mk47/config.h b/keyboards/inland/mk47/config.h
similarity index 100%
rename from keyboards/inland/keyboard_sw/mk47/config.h
rename to keyboards/inland/mk47/config.h
diff --git a/keyboards/inland/keyboard_sw/mk47/halconf.h b/keyboards/inland/mk47/halconf.h
similarity index 100%
rename from keyboards/inland/keyboard_sw/mk47/halconf.h
rename to keyboards/inland/mk47/halconf.h
diff --git a/keyboards/inland/keyboard_sw/mk47/info.json b/keyboards/inland/mk47/info.json
similarity index 100%
rename from keyboards/inland/keyboard_sw/mk47/info.json
rename to keyboards/inland/mk47/info.json
diff --git a/keyboards/inland/keyboard_sw/mk47/keymaps/default/keymap.c b/keyboards/inland/mk47/keymaps/default/keymap.c
similarity index 100%
rename from keyboards/inland/keyboard_sw/mk47/keymaps/default/keymap.c
rename to keyboards/inland/mk47/keymaps/default/keymap.c
diff --git a/keyboards/inland/keyboard_sw/mk47/keymaps/via/keymap.c b/keyboards/inland/mk47/keymaps/via/keymap.c
similarity index 100%
rename from keyboards/inland/keyboard_sw/mk47/keymaps/via/keymap.c
rename to keyboards/inland/mk47/keymaps/via/keymap.c
diff --git a/keyboards/inland/keyboard_sw/mk47/keymaps/via/rules.mk b/keyboards/inland/mk47/keymaps/via/rules.mk
similarity index 100%
rename from keyboards/inland/keyboard_sw/mk47/keymaps/via/rules.mk
rename to keyboards/inland/mk47/keymaps/via/rules.mk
diff --git a/keyboards/inland/keyboard_sw/mk47/mcuconf.h b/keyboards/inland/mk47/mcuconf.h
similarity index 100%
rename from keyboards/inland/keyboard_sw/mk47/mcuconf.h
rename to keyboards/inland/mk47/mcuconf.h
diff --git a/keyboards/inland/keyboard_sw/mk47/mk47.c b/keyboards/inland/mk47/mk47.c
similarity index 100%
rename from keyboards/inland/keyboard_sw/mk47/mk47.c
rename to keyboards/inland/mk47/mk47.c
diff --git a/keyboards/inland/keyboard_sw/mk47/readme.md b/keyboards/inland/mk47/readme.md
similarity index 75%
rename from keyboards/inland/keyboard_sw/mk47/readme.md
rename to keyboards/inland/mk47/readme.md
index ee3ced891552..2b5c971b0a46 100644
--- a/keyboards/inland/keyboard_sw/mk47/readme.md
+++ b/keyboards/inland/mk47/readme.md
@@ -4,14 +4,15 @@ A customizable 40% keyboard.
* Keyboard Maintainer: [jonylee@hfd](https://github.com/jonylee1986)
* Hardware Supported: mk47
+* Hardware Availability: [Inland](https://www.microcenter.com/product/661264/inland-47-keys-hot-swappable-rgb-wired-mechanical-keyboard,)
Make example for this keyboard (after setting up your build environment):
- make inland/keyboard_sw/mk47:default
+ make inland/mk47:default
Flashing example for this keyboard:
- make inland/keyboard_sw/mk47:default:flash
+ make inland/mk47:default:flash
**Reset Key**: Hold down the key located at *K00*, which programmed as *Esc* while plugging in the keyboard.
diff --git a/keyboards/inland/keyboard_sw/mk47/rules.mk b/keyboards/inland/mk47/rules.mk
similarity index 100%
rename from keyboards/inland/keyboard_sw/mk47/rules.mk
rename to keyboards/inland/mk47/rules.mk
From 8ca31d07b3e425ecbae3c94e64b66b3393da066f Mon Sep 17 00:00:00 2001
From: jonylee1986 <2532487686@qq.com>
Date: Tue, 25 Apr 2023 10:57:49 +0800
Subject: [PATCH 67/79] update config.h
---
keyboards/inland/mk47/config.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/keyboards/inland/mk47/config.h b/keyboards/inland/mk47/config.h
index 5f6aba9e6acd..a864f6723446 100644
--- a/keyboards/inland/mk47/config.h
+++ b/keyboards/inland/mk47/config.h
@@ -39,9 +39,6 @@
/* I2C Config for LED Driver */
#define DRIVER_COUNT 1
#define DRIVER_ADDR_1 0b1110100
-#define I2C1_SDA_PIN B7
-#define I2C1_SCL_PIN B6
-#define I2C1_SCL_PAL_MODE 4
#define I2C1_OPMODE OPMODE_I2C
#define I2C1_CLOCK_SPEED 400000 /* 400000 */
From 881bd74b2e5c48d549413f7c5937da77418d6eb8 Mon Sep 17 00:00:00 2001
From: Joy
Date: Tue, 16 May 2023 21:23:11 +0800
Subject: [PATCH 68/79] Move config to info
---
keyboards/inland/mk47/config.h | 42 ++--------
keyboards/inland/mk47/halconf.h | 2 +-
keyboards/inland/mk47/info.json | 83 ++++++++++++++++++-
.../inland/mk47/keymaps/default/keymap.c | 34 ++++----
keyboards/inland/mk47/keymaps/via/keymap.c | 34 ++++----
keyboards/inland/mk47/mcuconf.h | 2 +-
keyboards/inland/mk47/mk47.c | 82 ++----------------
keyboards/inland/mk47/rules.mk | 4 -
8 files changed, 128 insertions(+), 155 deletions(-)
diff --git a/keyboards/inland/mk47/config.h b/keyboards/inland/mk47/config.h
index a864f6723446..ed8155ce8c4e 100644
--- a/keyboards/inland/mk47/config.h
+++ b/keyboards/inland/mk47/config.h
@@ -16,16 +16,8 @@
#pragma once
-/* Force NKRO on boot up regardless of the setting saved in the EEPROM (uncomment to enable it) */
- #define FORCE_NKRO
-
#define TAP_CODE_DELAY 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
-
/* SPI Config for spi flash*/
#define SPI_DRIVER SPIDQ
#define SPI_SCK_PIN B3
@@ -40,39 +32,15 @@
#define DRIVER_COUNT 1
#define DRIVER_ADDR_1 0b1110100
#define I2C1_OPMODE OPMODE_I2C
-#define I2C1_CLOCK_SPEED 400000 /* 400000 */
-
-#define RGB_MATRIX_LED_COUNT 47
+#define I2C1_CLOCK_SPEED 400000
-#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
+#define RGB_MATRIX_LED_COUNT 47
+#define RGB_DISABLE_WHEN_USB_SUSPENDED
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_KEYRELEASES
-// RGB Matrix Animation modes. Explicitly enabled
-// For full list of effects, see:
-// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
-#define ENABLE_RGB_MATRIX_BREATHING
-#define ENABLE_RGB_MATRIX_CYCLE_ALL
-#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
-#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
-#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
-#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
-#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
-#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
-#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
-#define ENABLE_RGB_MATRIX_DUAL_BEACON
-#define ENABLE_RGB_MATRIX_RAINBOW_BEACON
-#define ENABLE_RGB_MATRIX_RAINDROPS
-// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined
-#define ENABLE_RGB_MATRIX_TYPING_HEATMAP
-// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE
-#define ENABLE_RGB_MATRIX_MULTISPLASH
-
-#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 /* The maximum brightness level */
-
-//#define DISABLE_MK47_KEYCODES /*If you need to change or restore the default QMK button function, please open it*/
+/*If you need to change or restore the default QMK button function, please open it*/
+//#define DISABLE_MK47_KEYCODES
diff --git a/keyboards/inland/mk47/halconf.h b/keyboards/inland/mk47/halconf.h
index 2f64e65393a5..55bfe5c97794 100644
--- a/keyboards/inland/mk47/halconf.h
+++ b/keyboards/inland/mk47/halconf.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2022 jonylee@hfd
+/* Copyright (C) 2023 jonylee@hfd
*
* 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
diff --git a/keyboards/inland/mk47/info.json b/keyboards/inland/mk47/info.json
index a20d43a1529f..07ee0f5c7a90 100644
--- a/keyboards/inland/mk47/info.json
+++ b/keyboards/inland/mk47/info.json
@@ -6,7 +6,9 @@
"usb": {
"vid": "0xFFFE",
"pid": "0x0002",
- "device_version": "0.0.1"
+ "device_version": "0.0.1",
+ "force_nkro": true,
+ "suspend_wakeup_delay": 1000
},
"processor": "WB32FQ95",
"bootloader": "wb32-dfu",
@@ -23,6 +25,80 @@
"cols": ["C1","C2","C3","A0","A1","A2","A3","A4","A5","A6","A7","C4"],
"rows": ["C6", "C7", "C8", "C9"]
},
+ "rgb_matrix": {
+ "driver": "IS31FL3733",
+ "max_brightness": 200,
+ "animations": {
+ "breathing": true,
+ "cycle_all": true,
+ "cycle_left_right": true,
+ "cycle_up_down": true,
+ "rainbow_moving_chevron": true,
+ "cycle_out_in": true,
+ "cycle_out_in_dual": true,
+ "cycle_pinwheel": true,
+ "cycle_spiral": true,
+ "dual_beacon": true,
+ "rainbow_beacon": true,
+ "raindrops": true,
+ "typing_heatmap": true,
+ "solid_reactive_simple": true,
+ "solid_reactive": true,
+ "multisplash": true
+ },
+ "layout": [
+ { "flags": 4, "matrix": [0, 0], "x": 0, "y": 0 },
+ { "flags": 4, "matrix": [0, 1], "x": 20, "y": 0 },
+ { "flags": 4, "matrix": [0, 2], "x": 40, "y": 0 },
+ { "flags": 4, "matrix": [0, 3], "x": 61, "y": 0 },
+ { "flags": 4, "matrix": [0, 4], "x": 81, "y": 0 },
+ { "flags": 4, "matrix": [0, 5], "x": 101, "y": 0 },
+ { "flags": 4, "matrix": [0, 6], "x": 122, "y": 0 },
+ { "flags": 4, "matrix": [0, 7], "x": 142, "y": 0 },
+ { "flags": 4, "matrix": [0, 8], "x": 162, "y": 0 },
+ { "flags": 4, "matrix": [0, 9], "x": 183, "y": 0 },
+ { "flags": 4, "matrix": [0, 10], "x": 203, "y": 0 },
+ { "flags": 4, "matrix": [0, 11], "x": 224, "y": 0 },
+
+ { "flags": 4, "matrix": [1, 0], "x": 0, "y": 21},
+ { "flags": 4, "matrix": [1, 1], "x": 20, "y": 21},
+ { "flags": 4, "matrix": [1, 2], "x": 40, "y": 21},
+ { "flags": 4, "matrix": [1, 3], "x": 61, "y": 21},
+ { "flags": 4, "matrix": [1, 4], "x": 81, "y": 21},
+ { "flags": 4, "matrix": [1, 5], "x": 10, "y": 21},
+ { "flags": 4, "matrix": [1, 6], "x": 12, "y": 21},
+ { "flags": 4, "matrix": [1, 7], "x": 142, "y": 21},
+ { "flags": 4, "matrix": [1, 8], "x": 162, "y": 21},
+ { "flags": 4, "matrix": [1, 9], "x": 183, "y": 21},
+ { "flags": 4, "matrix": [1, 10], "x": 203, "y": 21},
+ { "flags": 4, "matrix": [1, 11], "x": 224, "y": 21},
+
+ { "flags": 4, "matrix": [2, 0], "x": 0, "y": 42},
+ { "flags": 4, "matrix": [2, 1], "x": 20, "y": 42},
+ { "flags": 4, "matrix": [2, 2], "x": 40, "y": 42},
+ { "flags": 4, "matrix": [2, 3], "x": 61, "y": 42},
+ { "flags": 4, "matrix": [2, 4], "x": 81, "y": 42},
+ { "flags": 4, "matrix": [2, 5], "x": 10, "y": 42},
+ { "flags": 4, "matrix": [2, 6], "x": 12, "y": 42},
+ { "flags": 4, "matrix": [2, 7], "x": 142, "y": 42},
+ { "flags": 4, "matrix": [2, 8], "x": 162, "y": 42},
+ { "flags": 4, "matrix": [2, 9], "x": 183, "y": 42},
+ { "flags": 4, "matrix": [2, 10], "x": 203, "y": 42},
+ { "flags": 4, "matrix": [2, 11], "x": 224, "y": 42},
+
+ { "flags": 4, "matrix": [3, 0], "x": 0, "y": 64},
+ { "flags": 1, "matrix": [3, 1], "x": 20, "y": 64},
+ { "flags": 4, "matrix": [3, 2], "x": 40, "y": 64},
+ { "flags": 4, "matrix": [3, 3], "x": 61, "y": 64},
+ { "flags": 4, "matrix": [3, 4], "x": 81, "y": 64},
+ { "flags": 4, "matrix": [3, 5], "x": 11, "y": 64},
+ { "flags": 4, "matrix": [3, 7], "x": 142, "y": 64},
+ { "flags": 4, "matrix": [3, 8], "x": 162, "y": 64},
+ { "flags": 4, "matrix": [3, 9], "x": 183, "y": 64},
+ { "flags": 4, "matrix": [3, 10], "x": 203, "y": 64},
+ { "flags": 4, "matrix": [3, 11], "x": 224, "y": 64}
+ ]
+ },
"diode_direction": "ROW2COL",
"layouts": {
"LAYOUT": {
@@ -40,7 +116,6 @@
{ "label": "P", "matrix": [0, 10], "x": 10, "y": 0 },
{ "label": "BackSpace", "matrix": [0, 11], "x": 11, "y": 0 },
-
{ "label": "Tab", "matrix": [1, 0], "x": 0, "y": 1 },
{ "label": "A", "matrix": [1, 1], "x": 1, "y": 1 },
{ "label": "S", "matrix": [1, 2], "x": 2, "y": 1 },
@@ -70,8 +145,8 @@
{ "label": "Ctrl", "matrix": [3, 0], "x": 0, "y": 3 },
{ "label": "Win", "matrix": [3, 1],"x": 1, "y": 3 },
{ "label": "Alt", "matrix": [3, 2],"x": 2, "y": 3 },
- { "label": "Hyper", "matrix": [3, 3], "x": 3, "y": 3 },
- { "label": "Lower", "matrix": [3, 4], "x": 4, "y": 3 },
+ { "label": "Hyper", "matrix": [3, 3], "x": 3, "y": 3 },
+ { "label": "Lower", "matrix": [3, 4], "x": 4, "y": 3 },
{ "label": "Space", "matrix": [3, 5], "w": 2, "x": 5, "y": 3 },
{ "label": "Ralse", "matrix": [3, 7], "x": 7, "y": 3 },
{ "label": "Fn", "matrix": [3, 8], "x": 8, "y": 3 },
diff --git a/keyboards/inland/mk47/keymaps/default/keymap.c b/keyboards/inland/mk47/keymaps/default/keymap.c
index 1f61f0768ab5..39dca36d3863 100644
--- a/keyboards/inland/mk47/keymaps/default/keymap.c
+++ b/keyboards/inland/mk47/keymaps/default/keymap.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2022 jonylee@hfd
+/* Copyright (C) 2023 jonylee@hfd
*
* 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
@@ -20,28 +20,28 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT( /* Base */
- KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
- KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_SLSH,
- KC_LCTL, MO(2), KC_LALT, KC_DEL, KC_PGDN, KC_SPC, KC_PGUP, MO(1), KC_LEFT, KC_DOWN, KC_RGHT),
+ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_SLSH,
+ KC_LCTL, MO(2), KC_LALT, KC_DEL, KC_PGDN, KC_SPC, KC_PGUP, MO(1), KC_LEFT, KC_DOWN, KC_RGHT),
[1] = LAYOUT( /* FN */
- KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, RGB_MOD,
- KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MSTP, KC_MUTE, KC_MPRV, KC_MPLY, KC_MNXT, RGB_VAI, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, KC_TRNS),
+ KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, RGB_MOD,
+ KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MSTP, KC_MUTE, KC_MPRV, KC_MPLY, KC_MNXT, RGB_VAI, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, KC_TRNS),
[2] = LAYOUT( /* Base */
- KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
- KC_CAPS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_TRNS,
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_SLSH,
- KC_LCTL, KC_NO, KC_LALT, KC_DEL, KC_PGDN, KC_SPC, KC_PGUP, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT),
+ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_CAPS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_TRNS,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_SLSH,
+ KC_LCTL, KC_NO, KC_LALT, KC_DEL, KC_PGDN, KC_SPC, KC_PGUP, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT),
[3] = LAYOUT( /* FN */
- 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_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_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_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_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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
};
// clang-format on
diff --git a/keyboards/inland/mk47/keymaps/via/keymap.c b/keyboards/inland/mk47/keymaps/via/keymap.c
index 03ea5b89ec33..178b3c31d608 100644
--- a/keyboards/inland/mk47/keymaps/via/keymap.c
+++ b/keyboards/inland/mk47/keymaps/via/keymap.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2022 jonylee@hfd
+/* Copyright (C) 2023 jonylee@hfd
*
* 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
@@ -20,28 +20,28 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT( /* Base */
- KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
- KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_SLSH,
- KC_LCTL, MO(2), KC_LALT, KC_DEL, KC_PGDN, KC_SPC, KC_PGUP, MO(1), KC_LEFT, KC_DOWN, KC_RGHT),
+ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_SLSH,
+ KC_LCTL, MO(2), KC_LALT, KC_DEL, KC_PGDN, KC_SPC, KC_PGUP, MO(1), KC_LEFT, KC_DOWN, KC_RGHT),
[1] = LAYOUT( /* FN */
- KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, RGB_MOD,
- RGB_HUI, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MSEL, KC_MUTE, KC_MPRV, KC_MPLY, KC_MNXT, RGB_VAI, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPD, RGB_VAD, RGB_SPI),
+ KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, RGB_MOD,
+ RGB_HUI, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MSEL, KC_MUTE, KC_MPRV, KC_MPLY, KC_MNXT, RGB_VAI, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPD, RGB_VAD, RGB_SPI),
[2] = LAYOUT( /* Base */
- KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
- KC_CAPS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_TRNS,
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_SLSH,
- KC_LCTL, KC_NO, KC_LALT, KC_DEL, KC_PGDN, KC_SPC, KC_PGUP, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT),
+ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_CAPS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_TRNS,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_SLSH,
+ KC_LCTL, KC_NO, KC_LALT, KC_DEL, KC_PGDN, KC_SPC, KC_PGUP, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT),
[3] = LAYOUT( /* FN */
- 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_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_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_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_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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
};
// clang-format on
diff --git a/keyboards/inland/mk47/mcuconf.h b/keyboards/inland/mk47/mcuconf.h
index 89f34b9be5c2..b80eb833d3e2 100644
--- a/keyboards/inland/mk47/mcuconf.h
+++ b/keyboards/inland/mk47/mcuconf.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2022 jonylee@hfd
+/* Copyright (C) 2023 jonylee@hfd
*
* 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
diff --git a/keyboards/inland/mk47/mk47.c b/keyboards/inland/mk47/mk47.c
index 1f6c04c756d0..ba2f82a7740d 100644
--- a/keyboards/inland/mk47/mk47.c
+++ b/keyboards/inland/mk47/mk47.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2022 jonylee@hfd
+/* Copyright (C) 2023 jonylee@hfd
*
* 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
@@ -75,72 +75,6 @@ const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
{0, G_16, H_16, I_16},
};
-led_config_t g_led_config = {
- {
- { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11},
- { 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23},
- { 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35},
- { 36, 37, 38, 39, 40, 41, NO_LED, 42, 43, 44, 45, 46}
- },
- {
- { 0, 0}, // 0
- { 20, 0}, // 1
- { 40, 0}, // 2
- { 61, 0}, // 3
- { 81, 0}, // 4
- { 101, 0}, // 5
- { 122, 0}, // 6
- {142, 0}, // 7
- {162, 0}, // 8
- {183, 0}, // 9
- {203, 0}, // 10
- {224, 0}, // 11
-
- { 0, 21}, // 12
- { 20, 21}, // 13
- { 40, 21}, // 14
- { 61, 21}, // 15
- { 81, 21}, // 16
- { 101, 21}, // 17
- { 122, 21}, // 18
- {142, 21}, // 19
- {162, 21}, // 20
- {183, 21}, // 21
- {203, 21}, // 22
- {224, 21}, // 23
-
- { 0, 42}, // 24
- { 20, 42}, // 25
- { 40, 42}, // 26
- { 61, 42}, // 27
- { 81, 42}, // 28
- { 101, 42}, // 29
- { 122, 42}, // 30
- {142, 42}, // 31
- {162, 42}, // 32
- {183, 42}, // 33
- {203, 42}, // 34
- {224, 42}, // 35
-
- { 0, 64}, // 36
- { 20, 64}, // 37
- { 40, 64}, // 38
- { 61, 64}, // 39
- { 81, 64}, // 40
- { 111, 64}, // 41
- {142, 64}, // 42
- {162, 64}, // 43
- {183, 64}, // 44
- {203, 64}, // 45
- {224, 64} // 46
- },
- {
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
- }
-};
-
#endif
#ifdef RGB_MATRIX_ENABLE
@@ -156,10 +90,10 @@ bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {
}
#endif
enum colors {
- WHITE,
- RED,
- GREEN,
- BLUE
+ WHITE,
+ RED,
+ GREEN,
+ BLUE
};
enum colors led_color_status = WHITE;
@@ -209,7 +143,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
current_time = timer_read();
scancode = KC_SPC;
}
- return false;
+ return false;
} else {
Lkey_flag = 0;
}
@@ -259,7 +193,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
rgb_matrix_set_speed((uint8_t)(UINT8_MAX / 5) * RGB_HSV_level);
}
}
- return false;
+ return false;
#endif
default:
return true;
@@ -328,7 +262,7 @@ void housekeeping_task_kb(void) {
void led_test(uint8_t color) {
rgb_matrix_mode_noeeprom(RGB_MATRIX_SOLID_COLOR);
-
+
switch (color) {
case WHITE:
rgb_matrix_sethsv_noeeprom(HSV_WHITE);
diff --git a/keyboards/inland/mk47/rules.mk b/keyboards/inland/mk47/rules.mk
index 27cf6396ee23..24d5f6f52ecc 100644
--- a/keyboards/inland/mk47/rules.mk
+++ b/keyboards/inland/mk47/rules.mk
@@ -1,6 +1,2 @@
-# Build Options
-# change yes to no to disable
-#
-RGB_MATRIX_DRIVER = IS31FL3733
EEPROM_DRIVER = wear_leveling
WEAR_LEVELING_DRIVER = spi_flash
From 6ae4e6886cdc3438c13d1db0ecd587053e15452e Mon Sep 17 00:00:00 2001
From: Joy
Date: Wed, 17 May 2023 11:29:43 +0800
Subject: [PATCH 69/79] Remove redundant code
---
keyboards/inland/mk47/config.h | 10 +-
keyboards/inland/mk47/info.json | 4 +
keyboards/inland/mk47/keymaps/inland/keymap.c | 71 ++++++
keyboards/inland/mk47/keymaps/inland/rules.mk | 1 +
keyboards/inland/mk47/mk47.c | 214 +-----------------
5 files changed, 79 insertions(+), 221 deletions(-)
create mode 100644 keyboards/inland/mk47/keymaps/inland/keymap.c
create mode 100644 keyboards/inland/mk47/keymaps/inland/rules.mk
diff --git a/keyboards/inland/mk47/config.h b/keyboards/inland/mk47/config.h
index ed8155ce8c4e..e6be2c158ef2 100644
--- a/keyboards/inland/mk47/config.h
+++ b/keyboards/inland/mk47/config.h
@@ -16,21 +16,19 @@
#pragma once
-#define TAP_CODE_DELAY 5
-
/* SPI Config for spi flash*/
#define SPI_DRIVER SPIDQ
#define SPI_SCK_PIN B3
#define SPI_MOSI_PIN B5
#define SPI_MISO_PIN B4
-#define SPI_MOSI_PAL_MODE 5
#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12
-#define WEAR_LEVELING_BACKING_SIZE (8 * 1024)
+#define WEAR_LEVELING_BACKING_SIZE (4 * 1024)
/* I2C Config for LED Driver */
#define DRIVER_COUNT 1
#define DRIVER_ADDR_1 0b1110100
+/* WB32 MCU has no default definition */
#define I2C1_OPMODE OPMODE_I2C
#define I2C1_CLOCK_SPEED 400000
@@ -40,7 +38,3 @@
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_KEYRELEASES
-
-/*If you need to change or restore the default QMK button function, please open it*/
-//#define DISABLE_MK47_KEYCODES
-
diff --git a/keyboards/inland/mk47/info.json b/keyboards/inland/mk47/info.json
index 07ee0f5c7a90..a60accc12b20 100644
--- a/keyboards/inland/mk47/info.json
+++ b/keyboards/inland/mk47/info.json
@@ -28,6 +28,10 @@
"rgb_matrix": {
"driver": "IS31FL3733",
"max_brightness": 200,
+ "val_steps": 50,
+ "sat_steps": 65,
+ "hue_steps": 65,
+ "speed_steps": 65,
"animations": {
"breathing": true,
"cycle_all": true,
diff --git a/keyboards/inland/mk47/keymaps/inland/keymap.c b/keyboards/inland/mk47/keymaps/inland/keymap.c
new file mode 100644
index 000000000000..7e0f6acdbc98
--- /dev/null
+++ b/keyboards/inland/mk47/keymaps/inland/keymap.c
@@ -0,0 +1,71 @@
+/* Copyright (C) 2023 jonylee@hfd
+ *
+ * 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 .
+ */
+
+#include QMK_KEYBOARD_H
+
+// clang-format off
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ [0] = LAYOUT( /* Base */
+ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_SLSH,
+ KC_LCTL, MO(2), KC_LALT, KC_DEL, KC_PGDN, KC_SPC, KC_PGUP, MO(1), KC_LEFT, KC_DOWN, KC_RGHT),
+
+ [1] = LAYOUT( /* FN */
+ KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, RGB_MOD,
+ RGB_HUI, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MSEL, KC_MUTE, KC_MPRV, KC_MPLY, KC_MNXT, RGB_VAI, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, EE_CLR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPD, RGB_VAD, RGB_SPI),
+
+ [2] = LAYOUT( /* Base */
+ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_CAPS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_TRNS,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_SLSH,
+ KC_LCTL, KC_NO, KC_LALT, KC_DEL, KC_PGDN, KC_SPC, KC_PGUP, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT),
+
+ [3] = LAYOUT( /* FN */
+ 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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, EE_CLR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
+};
+// clang-format on
+
+uint16_t pressed_time = 0;
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+
+ switch (keycode) {
+ case EE_CLR: {
+ if (record->event.pressed) {
+ pressed_time = timer_read();
+ } else {
+ pressed_time = 0;
+ }
+ return false;
+ }
+ default: return true;
+ }
+}
+
+void housekeeping_task_user(void) {
+
+ if (pressed_time && (timer_elapsed(pressed_time) >= 1500)) {
+ pressed_time = 0;
+ eeconfig_init();
+ }
+}
diff --git a/keyboards/inland/mk47/keymaps/inland/rules.mk b/keyboards/inland/mk47/keymaps/inland/rules.mk
new file mode 100644
index 000000000000..1e5b99807cb7
--- /dev/null
+++ b/keyboards/inland/mk47/keymaps/inland/rules.mk
@@ -0,0 +1 @@
+VIA_ENABLE = yes
diff --git a/keyboards/inland/mk47/mk47.c b/keyboards/inland/mk47/mk47.c
index ba2f82a7740d..04f364b30dc9 100644
--- a/keyboards/inland/mk47/mk47.c
+++ b/keyboards/inland/mk47/mk47.c
@@ -82,6 +82,7 @@ bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {
if (!rgb_matrix_indicators_advanced_user(led_min, led_max)) {
return false;
}
+
if (host_keyboard_led_state().caps_lock) {
RGB_MATRIX_INDICATOR_SET_COLOR(12, 255, 0, 0);
}
@@ -89,216 +90,3 @@ bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {
return true;
}
#endif
-enum colors {
- WHITE,
- RED,
- GREEN,
- BLUE
-};
-enum colors led_color_status = WHITE;
-
-static bool Lkey_flag = false;
-static bool reset_glint_flag = false;
-static bool while_test_flag = false;
-static uint16_t current_time = 0;
-static uint8_t glint_cnt = 0;
-static uint16_t scancode = 0;
-
-#ifndef DISABLE_MK47_KEYCODES
-static bool fn_make_flag = false;
-static uint8_t RGB_HSV_level;
-#endif
-
-HSV hsv;
-void led_test(uint8_t color);
-void clear_eeprom(void);
-void rgb_hsv_updata_user(void);
-
-bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
- if (!process_record_user(keycode, record)) {
- return false;
- }
- switch (keycode) {
-#ifndef DISABLE_MK47_KEYCODES
- case MO(1):
- fn_make_flag = record->event.pressed;
- return true;
- case KC_DEL:
- if (fn_make_flag && record->event.pressed) {
- Lkey_flag = true;
- current_time = timer_read();
- scancode = KC_DEL;
- return false;
- } else {
- Lkey_flag = 0;
- }
- return true;
- case KC_SPC:
- if (fn_make_flag && record->event.pressed) {
- if (while_test_flag) {
- while_test_flag = false;
- rgb_matrix_init();
- } else {
- Lkey_flag = true;
- current_time = timer_read();
- scancode = KC_SPC;
- }
- return false;
- } else {
- Lkey_flag = 0;
- }
- return true;
- case RGB_VAI:
- if (record->event.pressed) {
- if ((RGB_HSV_level = (uint8_t)rgb_matrix_get_val() / (RGB_MATRIX_MAXIMUM_BRIGHTNESS / 4)) < 4) {
- RGB_HSV_level++;
- rgb_matrix_config.hsv.v = (uint8_t)(RGB_MATRIX_MAXIMUM_BRIGHTNESS / 4) * RGB_HSV_level;
- }
- rgb_hsv_updata_user();
- }
- return false;
- case RGB_VAD:
- if (record->event.pressed) {
- if ((RGB_HSV_level = (uint8_t)rgb_matrix_get_val() / (RGB_MATRIX_MAXIMUM_BRIGHTNESS / 4)) > 0) {
- RGB_HSV_level--;
- rgb_matrix_config.hsv.v = (uint8_t)(RGB_MATRIX_MAXIMUM_BRIGHTNESS / 4) * RGB_HSV_level;
- }
- rgb_hsv_updata_user();
- }
- return false;
- case RGB_HUI:
- if (record->event.pressed) {
- if ((RGB_HSV_level = (uint8_t)rgb_matrix_get_hue() / (UINT8_MAX / 9)) < 9) {
- RGB_HSV_level++;
- }else{
- RGB_HSV_level = 1;
- }
- rgb_matrix_config.hsv.h = (uint8_t)(UINT8_MAX / 9) * RGB_HSV_level;
- rgb_hsv_updata_user();
- }
- return false;
-
- case RGB_SPI:
- if (record->event.pressed) {
- if ((RGB_HSV_level = (uint8_t)rgb_matrix_get_speed() / (UINT8_MAX / 5)) < 5) {
- RGB_HSV_level++;
- rgb_matrix_set_speed((uint8_t)(UINT8_MAX / 5) * RGB_HSV_level);
- }
- }
- return false;
- case RGB_SPD:
- if (record->event.pressed) {
- if ((RGB_HSV_level = (uint8_t)rgb_matrix_get_speed() / (UINT8_MAX / 5)) > 0) {
- RGB_HSV_level--;
- rgb_matrix_set_speed((uint8_t)(UINT8_MAX / 5) * RGB_HSV_level);
- }
- }
- return false;
-#endif
- default:
- return true;
- }
-}
-
-void housekeeping_task_kb(void) {
- if (Lkey_flag) {
- if (scancode == KC_DEL) {
- if (timer_elapsed(current_time) >= 5000) {
- Lkey_flag = false;
- clear_eeprom();
-
- current_time = timer_read();
- reset_glint_flag = true;
- glint_cnt = 0;
- rgb_matrix_mode_noeeprom(RGB_MATRIX_SOLID_COLOR);
- rgb_matrix_sethsv_noeeprom(HSV_OFF);
- }
- } else if (scancode == KC_SPC) {
- if (timer_elapsed(current_time) >= 3000) {
- Lkey_flag = false;
- clear_eeprom();
-
- while_test_flag = true;
- glint_cnt = 0;
- rgb_matrix_mode_noeeprom(RGB_MATRIX_SOLID_COLOR);
- rgb_matrix_sethsv_noeeprom(HSV_RED);
- }
- }
- } else if (reset_glint_flag) {
- if ((timer_elapsed(current_time)) >= 300) {
- current_time = timer_read();
- if (((glint_cnt++) & 0x01 )== 0) {
- rgb_matrix_sethsv_noeeprom(HSV_WHITE);
- } else {
- rgb_matrix_sethsv_noeeprom(HSV_OFF);
- }
- if (glint_cnt >= 3) {
- glint_cnt = 0;
- reset_glint_flag = false;
- rgb_matrix_init();
- }
- }
-
- } else if (while_test_flag) {
- if ((timer_elapsed(current_time)) >= 1500) {
- current_time = timer_read();
- if ((glint_cnt%3) == 0) {
- rgb_matrix_sethsv_noeeprom(HSV_RED);
- } else if ((glint_cnt%3)== 1) {
- rgb_matrix_sethsv_noeeprom(HSV_GREEN);
- } else if ((glint_cnt%3)== 2) {
- rgb_matrix_sethsv_noeeprom(HSV_BLUE);
- }
- glint_cnt++;
- if (glint_cnt >= 30) {
- glint_cnt = 0;
- while_test_flag = false;
- rgb_matrix_init();
- }
- }
- }
-}
-
-
-void led_test(uint8_t color) {
- rgb_matrix_mode_noeeprom(RGB_MATRIX_SOLID_COLOR);
-
- switch (color) {
- case WHITE:
- rgb_matrix_sethsv_noeeprom(HSV_WHITE);
- break;
-
- case RED:
- rgb_matrix_sethsv_noeeprom(HSV_RED);
- break;
-
- case GREEN:
- rgb_matrix_sethsv_noeeprom(HSV_GREEN);
- break;
-
- case BLUE:
- rgb_matrix_sethsv_noeeprom(HSV_BLUE);
- break;
- }
-}
-
-void clear_eeprom(void) {
- layer_state_t default_layer_temp = default_layer_state;
- eeconfig_init();
- default_layer_set(default_layer_temp);
-
- #ifdef VIA_ENABLE
- // This resets the layout options
- via_set_layout_options(VIA_EEPROM_LAYOUT_OPTIONS_DEFAULT);
- // This resets the keymaps in EEPROM to what is in flash.
- dynamic_keymap_reset();
- // This resets the macros in EEPROM to nothing.
- dynamic_keymap_macro_reset();
- #endif
-
- rgb_matrix_enable_noeeprom();
-}
-
-void rgb_hsv_updata_user(void) {
- rgb_matrix_sethsv(rgb_matrix_config.hsv.h, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v);
-}
From 22dfba9c29ca73b5edc1026b2a7934ed2640101e Mon Sep 17 00:00:00 2001
From: Joy
Date: Wed, 17 May 2023 12:59:03 +0800
Subject: [PATCH 70/79] Update
---
keyboards/inland/mk47/info.json | 44 +++++++++----------
.../inland/mk47/keymaps/default/keymap.c | 8 ++--
keyboards/inland/mk47/keymaps/inland/keymap.c | 11 ++---
keyboards/inland/mk47/keymaps/via/keymap.c | 8 ++--
keyboards/inland/mk47/mk47.c | 2 +-
5 files changed, 37 insertions(+), 36 deletions(-)
diff --git a/keyboards/inland/mk47/info.json b/keyboards/inland/mk47/info.json
index a60accc12b20..7c68be9fd74b 100644
--- a/keyboards/inland/mk47/info.json
+++ b/keyboards/inland/mk47/info.json
@@ -53,53 +53,53 @@
"layout": [
{ "flags": 4, "matrix": [0, 0], "x": 0, "y": 0 },
{ "flags": 4, "matrix": [0, 1], "x": 20, "y": 0 },
- { "flags": 4, "matrix": [0, 2], "x": 40, "y": 0 },
+ { "flags": 4, "matrix": [0, 2], "x": 41, "y": 0 },
{ "flags": 4, "matrix": [0, 3], "x": 61, "y": 0 },
{ "flags": 4, "matrix": [0, 4], "x": 81, "y": 0 },
- { "flags": 4, "matrix": [0, 5], "x": 101, "y": 0 },
+ { "flags": 4, "matrix": [0, 5], "x": 102, "y": 0 },
{ "flags": 4, "matrix": [0, 6], "x": 122, "y": 0 },
- { "flags": 4, "matrix": [0, 7], "x": 142, "y": 0 },
- { "flags": 4, "matrix": [0, 8], "x": 162, "y": 0 },
+ { "flags": 4, "matrix": [0, 7], "x": 143, "y": 0 },
+ { "flags": 4, "matrix": [0, 8], "x": 163, "y": 0 },
{ "flags": 4, "matrix": [0, 9], "x": 183, "y": 0 },
- { "flags": 4, "matrix": [0, 10], "x": 203, "y": 0 },
+ { "flags": 4, "matrix": [0, 10], "x": 204, "y": 0 },
{ "flags": 4, "matrix": [0, 11], "x": 224, "y": 0 },
{ "flags": 4, "matrix": [1, 0], "x": 0, "y": 21},
{ "flags": 4, "matrix": [1, 1], "x": 20, "y": 21},
- { "flags": 4, "matrix": [1, 2], "x": 40, "y": 21},
+ { "flags": 4, "matrix": [1, 2], "x": 41, "y": 21},
{ "flags": 4, "matrix": [1, 3], "x": 61, "y": 21},
{ "flags": 4, "matrix": [1, 4], "x": 81, "y": 21},
- { "flags": 4, "matrix": [1, 5], "x": 10, "y": 21},
- { "flags": 4, "matrix": [1, 6], "x": 12, "y": 21},
- { "flags": 4, "matrix": [1, 7], "x": 142, "y": 21},
- { "flags": 4, "matrix": [1, 8], "x": 162, "y": 21},
+ { "flags": 4, "matrix": [1, 5], "x": 102, "y": 21},
+ { "flags": 4, "matrix": [1, 6], "x": 122, "y": 21},
+ { "flags": 4, "matrix": [1, 7], "x": 143, "y": 21},
+ { "flags": 4, "matrix": [1, 8], "x": 163, "y": 21},
{ "flags": 4, "matrix": [1, 9], "x": 183, "y": 21},
- { "flags": 4, "matrix": [1, 10], "x": 203, "y": 21},
+ { "flags": 4, "matrix": [1, 10], "x": 204, "y": 21},
{ "flags": 4, "matrix": [1, 11], "x": 224, "y": 21},
{ "flags": 4, "matrix": [2, 0], "x": 0, "y": 42},
{ "flags": 4, "matrix": [2, 1], "x": 20, "y": 42},
- { "flags": 4, "matrix": [2, 2], "x": 40, "y": 42},
+ { "flags": 4, "matrix": [2, 2], "x": 41, "y": 42},
{ "flags": 4, "matrix": [2, 3], "x": 61, "y": 42},
{ "flags": 4, "matrix": [2, 4], "x": 81, "y": 42},
- { "flags": 4, "matrix": [2, 5], "x": 10, "y": 42},
- { "flags": 4, "matrix": [2, 6], "x": 12, "y": 42},
- { "flags": 4, "matrix": [2, 7], "x": 142, "y": 42},
- { "flags": 4, "matrix": [2, 8], "x": 162, "y": 42},
+ { "flags": 4, "matrix": [2, 5], "x": 102, "y": 42},
+ { "flags": 4, "matrix": [2, 6], "x": 122, "y": 42},
+ { "flags": 4, "matrix": [2, 7], "x": 143, "y": 42},
+ { "flags": 4, "matrix": [2, 8], "x": 163, "y": 42},
{ "flags": 4, "matrix": [2, 9], "x": 183, "y": 42},
- { "flags": 4, "matrix": [2, 10], "x": 203, "y": 42},
+ { "flags": 4, "matrix": [2, 10], "x": 204, "y": 42},
{ "flags": 4, "matrix": [2, 11], "x": 224, "y": 42},
{ "flags": 4, "matrix": [3, 0], "x": 0, "y": 64},
{ "flags": 1, "matrix": [3, 1], "x": 20, "y": 64},
- { "flags": 4, "matrix": [3, 2], "x": 40, "y": 64},
+ { "flags": 4, "matrix": [3, 2], "x": 41, "y": 64},
{ "flags": 4, "matrix": [3, 3], "x": 61, "y": 64},
{ "flags": 4, "matrix": [3, 4], "x": 81, "y": 64},
- { "flags": 4, "matrix": [3, 5], "x": 11, "y": 64},
- { "flags": 4, "matrix": [3, 7], "x": 142, "y": 64},
- { "flags": 4, "matrix": [3, 8], "x": 162, "y": 64},
+ { "flags": 4, "matrix": [3, 5], "x": 102, "y": 64},
+ { "flags": 4, "matrix": [3, 7], "x": 143, "y": 64},
+ { "flags": 4, "matrix": [3, 8], "x": 163, "y": 64},
{ "flags": 4, "matrix": [3, 9], "x": 183, "y": 64},
- { "flags": 4, "matrix": [3, 10], "x": 203, "y": 64},
+ { "flags": 4, "matrix": [3, 10], "x": 204, "y": 64},
{ "flags": 4, "matrix": [3, 11], "x": 224, "y": 64}
]
},
diff --git a/keyboards/inland/mk47/keymaps/default/keymap.c b/keyboards/inland/mk47/keymaps/default/keymap.c
index 39dca36d3863..ba420520a1f5 100644
--- a/keyboards/inland/mk47/keymaps/default/keymap.c
+++ b/keyboards/inland/mk47/keymaps/default/keymap.c
@@ -19,25 +19,25 @@
// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [0] = LAYOUT( /* Base */
+ [0] = LAYOUT(
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_SLSH,
KC_LCTL, MO(2), KC_LALT, KC_DEL, KC_PGDN, KC_SPC, KC_PGUP, MO(1), KC_LEFT, KC_DOWN, KC_RGHT),
- [1] = LAYOUT( /* FN */
+ [1] = LAYOUT(
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, RGB_MOD,
KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MSTP, KC_MUTE, KC_MPRV, KC_MPLY, KC_MNXT, RGB_VAI, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, KC_TRNS),
- [2] = LAYOUT( /* Base */
+ [2] = LAYOUT(
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
KC_CAPS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_TRNS,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_SLSH,
KC_LCTL, KC_NO, KC_LALT, KC_DEL, KC_PGDN, KC_SPC, KC_PGUP, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT),
- [3] = LAYOUT( /* FN */
+ [3] = LAYOUT(
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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
diff --git a/keyboards/inland/mk47/keymaps/inland/keymap.c b/keyboards/inland/mk47/keymaps/inland/keymap.c
index 7e0f6acdbc98..a7de2ee45dd6 100644
--- a/keyboards/inland/mk47/keymaps/inland/keymap.c
+++ b/keyboards/inland/mk47/keymaps/inland/keymap.c
@@ -19,29 +19,29 @@
// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [0] = LAYOUT( /* Base */
+ [0] = LAYOUT(
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_SLSH,
KC_LCTL, MO(2), KC_LALT, KC_DEL, KC_PGDN, KC_SPC, KC_PGUP, MO(1), KC_LEFT, KC_DOWN, KC_RGHT),
- [1] = LAYOUT( /* FN */
+ [1] = LAYOUT(
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, RGB_MOD,
RGB_HUI, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MSEL, KC_MUTE, KC_MPRV, KC_MPLY, KC_MNXT, RGB_VAI, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, EE_CLR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPD, RGB_VAD, RGB_SPI),
- [2] = LAYOUT( /* Base */
+ [2] = LAYOUT(
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
KC_CAPS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_TRNS,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_SLSH,
KC_LCTL, KC_NO, KC_LALT, KC_DEL, KC_PGDN, KC_SPC, KC_PGUP, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT),
- [3] = LAYOUT( /* FN */
+ [3] = LAYOUT(
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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, EE_CLR, 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
};
// clang-format on
@@ -67,5 +67,6 @@ void housekeeping_task_user(void) {
if (pressed_time && (timer_elapsed(pressed_time) >= 1500)) {
pressed_time = 0;
eeconfig_init();
+ eeconfig_update_rgb_matrix_default();
}
}
diff --git a/keyboards/inland/mk47/keymaps/via/keymap.c b/keyboards/inland/mk47/keymaps/via/keymap.c
index 178b3c31d608..408a6de31d65 100644
--- a/keyboards/inland/mk47/keymaps/via/keymap.c
+++ b/keyboards/inland/mk47/keymaps/via/keymap.c
@@ -19,25 +19,25 @@
// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [0] = LAYOUT( /* Base */
+ [0] = LAYOUT(
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_SLSH,
KC_LCTL, MO(2), KC_LALT, KC_DEL, KC_PGDN, KC_SPC, KC_PGUP, MO(1), KC_LEFT, KC_DOWN, KC_RGHT),
- [1] = LAYOUT( /* FN */
+ [1] = LAYOUT(
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, RGB_MOD,
RGB_HUI, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MSEL, KC_MUTE, KC_MPRV, KC_MPLY, KC_MNXT, RGB_VAI, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPD, RGB_VAD, RGB_SPI),
- [2] = LAYOUT( /* Base */
+ [2] = LAYOUT(
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
KC_CAPS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_TRNS,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_SLSH,
KC_LCTL, KC_NO, KC_LALT, KC_DEL, KC_PGDN, KC_SPC, KC_PGUP, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT),
- [3] = LAYOUT( /* FN */
+ [3] = LAYOUT(
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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
diff --git a/keyboards/inland/mk47/mk47.c b/keyboards/inland/mk47/mk47.c
index 04f364b30dc9..f24785594424 100644
--- a/keyboards/inland/mk47/mk47.c
+++ b/keyboards/inland/mk47/mk47.c
@@ -79,7 +79,7 @@ const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
#ifdef RGB_MATRIX_ENABLE
bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {
- if (!rgb_matrix_indicators_advanced_user(led_min, led_max)) {
+ if (rgb_matrix_indicators_advanced_user(led_min, led_max) != true) {
return false;
}
From 777750610151cca19585a5dc461f26b64aa7d6f0 Mon Sep 17 00:00:00 2001
From: Joy
Date: Wed, 17 May 2023 13:00:14 +0800
Subject: [PATCH 71/79] Update
---
keyboards/inland/mk47/config.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/keyboards/inland/mk47/config.h b/keyboards/inland/mk47/config.h
index e6be2c158ef2..9b769e636d12 100644
--- a/keyboards/inland/mk47/config.h
+++ b/keyboards/inland/mk47/config.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2022 jonylee@hfd
+/* Copyright (C) 2023 jonylee@hfd
*
* 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
From 650153cfa0595ebdc12df1aa0f1bf3c2aefe3798 Mon Sep 17 00:00:00 2001
From: Joy Lee
Date: Wed, 17 May 2023 13:01:59 +0800
Subject: [PATCH 72/79] Update keyboards/inland/mk47/keymaps/inland/keymap.c
---
keyboards/inland/mk47/keymaps/inland/keymap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/keyboards/inland/mk47/keymaps/inland/keymap.c b/keyboards/inland/mk47/keymaps/inland/keymap.c
index a7de2ee45dd6..82d1efdde8a5 100644
--- a/keyboards/inland/mk47/keymaps/inland/keymap.c
+++ b/keyboards/inland/mk47/keymaps/inland/keymap.c
@@ -64,7 +64,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
void housekeeping_task_user(void) {
- if (pressed_time && (timer_elapsed(pressed_time) >= 1500)) {
+ if (pressed_time && (timer_elapsed(pressed_time) >= 5000)) {
pressed_time = 0;
eeconfig_init();
eeconfig_update_rgb_matrix_default();
From 751c6865364f6537a0f17b0c239a7de87db1ebfb Mon Sep 17 00:00:00 2001
From: "jonylee@hfd" <108282809+jonylee1986@users.noreply.github.com>
Date: Tue, 20 Jun 2023 10:49:26 +0800
Subject: [PATCH 73/79] Update keyboards/inland/mk47/keymaps/default/keymap.c
Co-authored-by: Joel Challis
---
keyboards/inland/mk47/keymaps/default/keymap.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/keyboards/inland/mk47/keymaps/default/keymap.c b/keyboards/inland/mk47/keymaps/default/keymap.c
index ba420520a1f5..f288d4e1feba 100644
--- a/keyboards/inland/mk47/keymaps/default/keymap.c
+++ b/keyboards/inland/mk47/keymaps/default/keymap.c
@@ -35,13 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
KC_CAPS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_TRNS,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_SLSH,
- KC_LCTL, KC_NO, KC_LALT, KC_DEL, KC_PGDN, KC_SPC, KC_PGUP, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT),
-
- [3] = LAYOUT(
- 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_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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
+ KC_LCTL, KC_NO, KC_LALT, KC_DEL, KC_PGDN, KC_SPC, KC_PGUP, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT)
};
// clang-format on
From 1b70fb0a9ced939d42aeecadc251fda89702acb5 Mon Sep 17 00:00:00 2001
From: "jonylee@hfd" <108282809+jonylee1986@users.noreply.github.com>
Date: Tue, 20 Jun 2023 10:49:35 +0800
Subject: [PATCH 74/79] Update keyboards/inland/mk47/keymaps/inland/keymap.c
Co-authored-by: Joel Challis
---
keyboards/inland/mk47/keymaps/inland/keymap.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/keyboards/inland/mk47/keymaps/inland/keymap.c b/keyboards/inland/mk47/keymaps/inland/keymap.c
index 82d1efdde8a5..d439aeb38dcf 100644
--- a/keyboards/inland/mk47/keymaps/inland/keymap.c
+++ b/keyboards/inland/mk47/keymaps/inland/keymap.c
@@ -35,13 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
KC_CAPS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_TRNS,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_SLSH,
- KC_LCTL, KC_NO, KC_LALT, KC_DEL, KC_PGDN, KC_SPC, KC_PGUP, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT),
-
- [3] = LAYOUT(
- 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_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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
+ KC_LCTL, KC_NO, KC_LALT, KC_DEL, KC_PGDN, KC_SPC, KC_PGUP, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT)
};
// clang-format on
From 72bd84e7e8ed302fa7d8e6950298d30f024dfe65 Mon Sep 17 00:00:00 2001
From: "jonylee@hfd" <108282809+jonylee1986@users.noreply.github.com>
Date: Tue, 20 Jun 2023 10:49:45 +0800
Subject: [PATCH 75/79] Update keyboards/inland/mk47/keymaps/via/keymap.c
Co-authored-by: Joel Challis
---
keyboards/inland/mk47/keymaps/via/keymap.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/keyboards/inland/mk47/keymaps/via/keymap.c b/keyboards/inland/mk47/keymaps/via/keymap.c
index 408a6de31d65..53cabcc4770e 100644
--- a/keyboards/inland/mk47/keymaps/via/keymap.c
+++ b/keyboards/inland/mk47/keymaps/via/keymap.c
@@ -35,13 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
KC_CAPS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_TRNS,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_SLSH,
- KC_LCTL, KC_NO, KC_LALT, KC_DEL, KC_PGDN, KC_SPC, KC_PGUP, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT),
-
- [3] = LAYOUT(
- 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_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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
+ KC_LCTL, KC_NO, KC_LALT, KC_DEL, KC_PGDN, KC_SPC, KC_PGUP, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT)
};
// clang-format on
From b6e7d709fe514df02a2612c3160d739f22061c62 Mon Sep 17 00:00:00 2001
From: "jonylee@hfd" <108282809+jonylee1986@users.noreply.github.com>
Date: Tue, 20 Jun 2023 10:50:06 +0800
Subject: [PATCH 76/79] Update keyboards/inland/mk47/readme.md
Co-authored-by: Joel Challis
---
keyboards/inland/mk47/readme.md | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/keyboards/inland/mk47/readme.md b/keyboards/inland/mk47/readme.md
index 2b5c971b0a46..55b805678b61 100644
--- a/keyboards/inland/mk47/readme.md
+++ b/keyboards/inland/mk47/readme.md
@@ -14,6 +14,11 @@ Flashing example for this keyboard:
make inland/mk47:default:flash
-**Reset Key**: Hold down the key located at *K00*, which programmed as *Esc* while plugging in the keyboard.
-
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).
+
+## Bootloader
+
+Enter the bootloader in 2 ways:
+
+* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard
+* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available
From 467178aa696602a4dd73d5d7d095c704a7d27a3d Mon Sep 17 00:00:00 2001
From: "jonylee@hfd" <108282809+jonylee1986@users.noreply.github.com>
Date: Tue, 20 Jun 2023 10:50:16 +0800
Subject: [PATCH 77/79] Update keyboards/inland/mk47/info.json
Co-authored-by: Joel Challis
---
keyboards/inland/mk47/info.json | 4 ----
1 file changed, 4 deletions(-)
diff --git a/keyboards/inland/mk47/info.json b/keyboards/inland/mk47/info.json
index 7c68be9fd74b..f88003b27f7f 100644
--- a/keyboards/inland/mk47/info.json
+++ b/keyboards/inland/mk47/info.json
@@ -28,10 +28,6 @@
"rgb_matrix": {
"driver": "IS31FL3733",
"max_brightness": 200,
- "val_steps": 50,
- "sat_steps": 65,
- "hue_steps": 65,
- "speed_steps": 65,
"animations": {
"breathing": true,
"cycle_all": true,
From 760e9310617adfa7f4054f64f8f6b0968e46ec5d Mon Sep 17 00:00:00 2001
From: "jonylee@hfd" <108282809+jonylee1986@users.noreply.github.com>
Date: Tue, 1 Aug 2023 10:21:28 +0800
Subject: [PATCH 78/79] Update keymap.c
---
keyboards/inland/mk47/keymaps/inland/keymap.c | 26 -------------------
1 file changed, 26 deletions(-)
diff --git a/keyboards/inland/mk47/keymaps/inland/keymap.c b/keyboards/inland/mk47/keymaps/inland/keymap.c
index d439aeb38dcf..ff5de15c47f3 100644
--- a/keyboards/inland/mk47/keymaps/inland/keymap.c
+++ b/keyboards/inland/mk47/keymaps/inland/keymap.c
@@ -38,29 +38,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_NO, KC_LALT, KC_DEL, KC_PGDN, KC_SPC, KC_PGUP, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT)
};
// clang-format on
-
-uint16_t pressed_time = 0;
-
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
-
- switch (keycode) {
- case EE_CLR: {
- if (record->event.pressed) {
- pressed_time = timer_read();
- } else {
- pressed_time = 0;
- }
- return false;
- }
- default: return true;
- }
-}
-
-void housekeeping_task_user(void) {
-
- if (pressed_time && (timer_elapsed(pressed_time) >= 5000)) {
- pressed_time = 0;
- eeconfig_init();
- eeconfig_update_rgb_matrix_default();
- }
-}
From 0bf5ae5d0d7d441297c17604f5322887f3c1fb32 Mon Sep 17 00:00:00 2001
From: "jonylee@hfd" <108282809+jonylee1986@users.noreply.github.com>
Date: Sat, 12 Aug 2023 17:26:24 +0800
Subject: [PATCH 79/79] Update config.h
---
keyboards/inland/mk47/config.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/keyboards/inland/mk47/config.h b/keyboards/inland/mk47/config.h
index 9b769e636d12..678686555ab9 100644
--- a/keyboards/inland/mk47/config.h
+++ b/keyboards/inland/mk47/config.h
@@ -37,4 +37,4 @@
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_MATRIX_KEYPRESSES
-#define RGB_MATRIX_KEYRELEASES
+