summaryrefslogtreecommitdiff
path: root/keyboards/mwstudio/mw75r2
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/mwstudio/mw75r2')
-rw-r--r--keyboards/mwstudio/mw75r2/config.h9
-rw-r--r--keyboards/mwstudio/mw75r2/info.json11
-rw-r--r--keyboards/mwstudio/mw75r2/keymaps/via/keymap.c6
-rw-r--r--keyboards/mwstudio/mw75r2/rules.mk1
4 files changed, 15 insertions, 12 deletions
diff --git a/keyboards/mwstudio/mw75r2/config.h b/keyboards/mwstudio/mw75r2/config.h
index b5f4500d58..ded31181aa 100644
--- a/keyboards/mwstudio/mw75r2/config.h
+++ b/keyboards/mwstudio/mw75r2/config.h
@@ -16,15 +16,6 @@
#pragma once
-
-/* key matrix pins */
-#define MATRIX_ROW_PINS { B7, D0, D1, D2, D3, D5}
-#define MATRIX_COL_PINS { C7, C6, B6, B5, B4, D7, D4, D6, F7, F6, E6, F0, F1, F4, F5 }
-
-/* COL2ROW or ROW2COL */
-#define DIODE_DIRECTION COL2ROW
-
-#define RGB_DI_PIN B3
#define RGBLIGHT_SLEEP
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255
diff --git a/keyboards/mwstudio/mw75r2/info.json b/keyboards/mwstudio/mw75r2/info.json
index 4d794246eb..c66145d731 100644
--- a/keyboards/mwstudio/mw75r2/info.json
+++ b/keyboards/mwstudio/mw75r2/info.json
@@ -8,6 +8,17 @@
"pid": "0x7502",
"device_version": "0.0.1"
},
+ "ws2812": {
+ "pin": "B3"
+ },
+ "rgb_matrix": {
+ "driver": "WS2812"
+ },
+ "matrix_pins": {
+ "cols": ["C7", "C6", "B6", "B5", "B4", "D7", "D4", "D6", "F7", "F6", "E6", "F0", "F1", "F4", "F5"],
+ "rows": ["B7", "D0", "D1", "D2", "D3", "D5"]
+ },
+ "diode_direction": "COL2ROW",
"encoder": {
"rotary": [
{"pin_a": "B1", "pin_b": "B2"}
diff --git a/keyboards/mwstudio/mw75r2/keymaps/via/keymap.c b/keyboards/mwstudio/mw75r2/keymaps/via/keymap.c
index 7b7e1877f5..633629abc7 100644
--- a/keyboards/mwstudio/mw75r2/keymaps/via/keymap.c
+++ b/keyboards/mwstudio/mw75r2/keymaps/via/keymap.c
@@ -115,7 +115,8 @@ void encoder_action_unregister(void) {
keyevent_t encoder_event = (keyevent_t) {
.key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index],
.pressed = false,
- .time = (timer_read() | 1)
+ .time = timer_read(),
+ .type = KEY_EVENT
};
encoder_state[index] = 0;
action_exec(encoder_event);
@@ -127,7 +128,8 @@ void encoder_action_register(uint8_t index, bool clockwise) {
keyevent_t encoder_event = (keyevent_t) {
.key = clockwise ? encoder_cw[index] : encoder_ccw[index],
.pressed = true,
- .time = (timer_read() | 1)
+ .time = timer_read(),
+ .type = KEY_EVENT
};
encoder_state[index] = (clockwise ^ 1) | (clockwise << 1);
action_exec(encoder_event);
diff --git a/keyboards/mwstudio/mw75r2/rules.mk b/keyboards/mwstudio/mw75r2/rules.mk
index 067e1df2ae..041f588c14 100644
--- a/keyboards/mwstudio/mw75r2/rules.mk
+++ b/keyboards/mwstudio/mw75r2/rules.mk
@@ -11,5 +11,4 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
RGB_MATRIX_ENABLE = yes
-RGB_MATRIX_DRIVER = WS2812
ENCODER_ENABLE = yes