diff options
Diffstat (limited to 'keyboards/mwstudio')
-rw-r--r-- | keyboards/mwstudio/alicekk/alicekk.c | 14 | ||||
-rw-r--r-- | keyboards/mwstudio/alicekk/config.h | 11 | ||||
-rw-r--r-- | keyboards/mwstudio/alicekk/info.json | 8 | ||||
-rw-r--r-- | keyboards/mwstudio/alicekk/keymaps/via/keymap.c | 6 | ||||
-rw-r--r-- | keyboards/mwstudio/mw65_black/config.h | 11 | ||||
-rw-r--r-- | keyboards/mwstudio/mw65_black/info.json | 8 | ||||
-rw-r--r-- | keyboards/mwstudio/mw65_rgb/config.h | 11 | ||||
-rw-r--r-- | keyboards/mwstudio/mw65_rgb/info.json | 8 | ||||
-rw-r--r-- | keyboards/mwstudio/mw660/config.h | 2 | ||||
-rw-r--r-- | keyboards/mwstudio/mw660/info.json | 3 | ||||
-rw-r--r-- | keyboards/mwstudio/mw75/config.h | 9 | ||||
-rw-r--r-- | keyboards/mwstudio/mw75/info.json | 8 | ||||
-rw-r--r-- | keyboards/mwstudio/mw75r2/config.h | 9 | ||||
-rw-r--r-- | keyboards/mwstudio/mw75r2/info.json | 8 | ||||
-rw-r--r-- | keyboards/mwstudio/mw75r2/keymaps/via/keymap.c | 6 | ||||
-rw-r--r-- | keyboards/mwstudio/mw80/info.json | 5 | ||||
-rw-r--r-- | keyboards/mwstudio/mw80/mw80.c | 31 | ||||
-rw-r--r-- | keyboards/mwstudio/mw80/rules.mk | 1 |
18 files changed, 55 insertions, 104 deletions
diff --git a/keyboards/mwstudio/alicekk/alicekk.c b/keyboards/mwstudio/alicekk/alicekk.c index 96c468066a..e8ab40b2b9 100644 --- a/keyboards/mwstudio/alicekk/alicekk.c +++ b/keyboards/mwstudio/alicekk/alicekk.c @@ -14,17 +14,3 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "alicekk.h" - -#ifdef ENCODER_ENABLE -bool encoder_update_kb(uint8_t index, bool clockwise) { - if (!encoder_update_user(index, clockwise)) { return false; } - if (index == 0) { - if (clockwise) { - tap_code_delay(KC_VOLU, 10); - } else { - tap_code_delay(KC_VOLD, 10); - } - } - return true; -} -#endif diff --git a/keyboards/mwstudio/alicekk/config.h b/keyboards/mwstudio/alicekk/config.h index 290871bde5..53ac3aa161 100644 --- a/keyboards/mwstudio/alicekk/config.h +++ b/keyboards/mwstudio/alicekk/config.h @@ -16,19 +16,8 @@ #pragma once - -/* key matrix pins */ -#define MATRIX_ROW_PINS { A3, A5, A6, A7, B0 } -#define MATRIX_COL_PINS { A10, A9, A8, B15, B14, B13, B12, A4, A2, A1, B6, B5, B4, B3, A15 } - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION ROW2COL - #define FORCE_NKRO - -#define RGB_DI_PIN B1 - #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 #define RGB_MATRIX_DEFAULT_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS #define RGBLED_NUM 87 diff --git a/keyboards/mwstudio/alicekk/info.json b/keyboards/mwstudio/alicekk/info.json index ec0d58b07e..b88dd97b3a 100644 --- a/keyboards/mwstudio/alicekk/info.json +++ b/keyboards/mwstudio/alicekk/info.json @@ -6,11 +6,19 @@ "pid": "0x3201", "device_version": "0.0.1" }, + "matrix_pins": { + "cols": ["A10", "A9", "A8", "B15", "B14", "B13", "B12", "A4", "A2", "A1", "B6", "B5", "B4", "B3", "A15"], + "rows": ["A3", "A5", "A6", "A7", "B0"] + }, + "diode_direction": "ROW2COL", "encoder": { "rotary": [ {"pin_a": "B11", "pin_b": "B10"} ] }, + "ws2812": { + "pin": "B1" + }, "processor": "STM32F103", "bootloader": "stm32duino", "layouts": { diff --git a/keyboards/mwstudio/alicekk/keymaps/via/keymap.c b/keyboards/mwstudio/alicekk/keymaps/via/keymap.c index 6c21e053fa..92e893d5c5 100644 --- a/keyboards/mwstudio/alicekk/keymaps/via/keymap.c +++ b/keyboards/mwstudio/alicekk/keymaps/via/keymap.c @@ -63,7 +63,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); @@ -75,7 +76,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/mw65_black/config.h b/keyboards/mwstudio/mw65_black/config.h index 79d1d5e1b2..f987360d4a 100644 --- a/keyboards/mwstudio/mw65_black/config.h +++ b/keyboards/mwstudio/mw65_black/config.h @@ -16,18 +16,7 @@ #pragma once - -/* key matrix pins */ -#define MATRIX_ROW_PINS { D4, D7, B4, B3, B6 } -#define MATRIX_COL_PINS { B0, B1, B2, D0, D1, D2, D3, D5, C6, F7, F4, F6, F5, F1, F0 } - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -#define RGB_DI_PIN C7 -#ifdef RGB_DI_PIN #define RGBLED_NUM 21 #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 -#endif diff --git a/keyboards/mwstudio/mw65_black/info.json b/keyboards/mwstudio/mw65_black/info.json index 23151df686..3e433aff92 100644 --- a/keyboards/mwstudio/mw65_black/info.json +++ b/keyboards/mwstudio/mw65_black/info.json @@ -8,6 +8,14 @@ "pid": "0x6500", "device_version": "0.0.1" }, + "ws2812": { + "pin": "C7" + }, + "matrix_pins": { + "cols": ["B0", "B1", "B2", "D0", "D1", "D2", "D3", "D5", "C6", "F7", "F4", "F6", "F5", "F1", "F0"], + "rows": ["D4", "D7", "B4", "B3", "B6"] + }, + "diode_direction": "COL2ROW", "encoder": { "rotary": [ {"pin_a": "E6", "pin_b": "D6"} diff --git a/keyboards/mwstudio/mw65_rgb/config.h b/keyboards/mwstudio/mw65_rgb/config.h index 2a90d77ee9..ebde358b49 100644 --- a/keyboards/mwstudio/mw65_rgb/config.h +++ b/keyboards/mwstudio/mw65_rgb/config.h @@ -16,17 +16,6 @@ #pragma once - -/* key matrix pins */ -#define MATRIX_ROW_PINS { D0, D1, D2, D3, B7 } -#define MATRIX_COL_PINS { C6, B6, B5, B4, D7, D6, D4, C7, F7, F6, F5, F4, F1, F0, E6 } - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* RGB Matrix config */ -#define RGB_DI_PIN B3 - #ifdef RGB_MATRIX_ENABLE #define RGB_MATRIX_LED_COUNT 83 #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 diff --git a/keyboards/mwstudio/mw65_rgb/info.json b/keyboards/mwstudio/mw65_rgb/info.json index ee00dd70c1..79dc8c0c7e 100644 --- a/keyboards/mwstudio/mw65_rgb/info.json +++ b/keyboards/mwstudio/mw65_rgb/info.json @@ -8,6 +8,14 @@ "pid": "0x6502", "device_version": "0.0.1" }, + "ws2812": { + "pin": "B3" + }, + "matrix_pins": { + "cols": ["C6", "B6", "B5", "B4", "D7", "D6", "D4", "C7", "F7", "F6", "F5", "F4", "F1", "F0", "E6"], + "rows": ["D0", "D1", "D2", "D3", "B7"] + }, + "diode_direction": "COL2ROW", "encoder": { "rotary": [ {"pin_a": "B1", "pin_b": "B2"} diff --git a/keyboards/mwstudio/mw660/config.h b/keyboards/mwstudio/mw660/config.h index f9040f64ad..9603e1db2b 100644 --- a/keyboards/mwstudio/mw660/config.h +++ b/keyboards/mwstudio/mw660/config.h @@ -18,8 +18,6 @@ #define FORCE_NKRO - -#define RGB_DI_PIN B8 #define DRIVER_LED_TOTAL 34 #define RGBLED_NUM 34 diff --git a/keyboards/mwstudio/mw660/info.json b/keyboards/mwstudio/mw660/info.json index 7e7b9609ff..8bf0f3f2fc 100644 --- a/keyboards/mwstudio/mw660/info.json +++ b/keyboards/mwstudio/mw660/info.json @@ -12,6 +12,9 @@ "nkro": true, "rgblight": true }, + "ws2812": { + "pin": "B8" + }, "matrix_pins": { "cols": ["A7", "B0", "B1", "B10", "B11", "B12", "B13", "B14", "B15", "A15", "B3", "B4", "B5", "B6", "B7" ], "rows": ["A3", "A4", "A5", "A6", "A2" ] diff --git a/keyboards/mwstudio/mw75/config.h b/keyboards/mwstudio/mw75/config.h index 4cb7a8a22c..0a9b073ce1 100644 --- a/keyboards/mwstudio/mw75/config.h +++ b/keyboards/mwstudio/mw75/config.h @@ -16,15 +16,6 @@ #pragma once - -/* key matrix pins */ -#define MATRIX_ROW_PINS { B7, D0, D1, D2, D3, D5, B0} -#define MATRIX_COL_PINS { D4, D6, D7, B4, B5, B6, C6, C7, F7, F6, F5, F4, F1, F0, E6 } - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -#define RGB_DI_PIN B3 #define RGBLIGHT_SLEEP #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 diff --git a/keyboards/mwstudio/mw75/info.json b/keyboards/mwstudio/mw75/info.json index 866f488a6e..e15905a629 100644 --- a/keyboards/mwstudio/mw75/info.json +++ b/keyboards/mwstudio/mw75/info.json @@ -8,6 +8,11 @@ "pid": "0x7501", "device_version": "0.0.1" }, + "matrix_pins": { + "cols": ["D4", "D6", "D7", "B4", "B5", "B6", "C6", "C7", "F7", "F6", "F5", "F4", "F1", "F0", "E6"], + "rows": ["B7", "D0", "D1", "D2", "D3", "D5", "B0"] + }, + "diode_direction": "COL2ROW", "encoder": { "rotary": [ {"pin_a": "B1", "pin_b": "B2"} @@ -16,6 +21,9 @@ "bootmagic": { "matrix": [0, 1] }, + "ws2812": { + "pin": "B3" + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { 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..b92412ae02 100644 --- a/keyboards/mwstudio/mw75r2/info.json +++ b/keyboards/mwstudio/mw75r2/info.json @@ -8,6 +8,14 @@ "pid": "0x7502", "device_version": "0.0.1" }, + "ws2812": { + "pin": "B3" + }, + "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/mw80/info.json b/keyboards/mwstudio/mw80/info.json index 04d50a8aa4..0b0a9717d3 100644 --- a/keyboards/mwstudio/mw80/info.json +++ b/keyboards/mwstudio/mw80/info.json @@ -22,9 +22,12 @@ "indicators": { "caps_lock": "A0" }, + "ws2812": { + "pin": "B8", + "driver": "pwm" + }, "rgblight": { "led_count": 16, - "pin": "B8", "hue_steps": 10, "saturation_steps": 17, "brightness_steps": 17, diff --git a/keyboards/mwstudio/mw80/mw80.c b/keyboards/mwstudio/mw80/mw80.c deleted file mode 100644 index e402f305ec..0000000000 --- a/keyboards/mwstudio/mw80/mw80.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright 2022 TW59420 <https://github.com/TW59420> - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#include "quantum.h" - -#ifdef ENCODER_ENABLE -bool encoder_update_kb(uint8_t index, bool clockwise) { - if (!encoder_update_user(index, clockwise)) { return false; } - if (index == 0) { - if (clockwise) { - tap_code_delay(KC_VOLU, 10); - } else { - tap_code_delay(KC_VOLD, 10); - } - } - return true; -} -#endif diff --git a/keyboards/mwstudio/mw80/rules.mk b/keyboards/mwstudio/mw80/rules.mk index 0ee3c1c5ee..e69de29bb2 100644 --- a/keyboards/mwstudio/mw80/rules.mk +++ b/keyboards/mwstudio/mw80/rules.mk @@ -1 +0,0 @@ -WS2812_DRIVER = pwm
\ No newline at end of file |