diff options
Diffstat (limited to 'keyboards/meletrix')
-rw-r--r-- | keyboards/meletrix/zoom65/config.h | 6 | ||||
-rw-r--r-- | keyboards/meletrix/zoom65/info.json | 5 | ||||
-rw-r--r-- | keyboards/meletrix/zoom65/zoom65.c | 14 | ||||
-rw-r--r-- | keyboards/meletrix/zoom65_lite/config.h | 6 | ||||
-rw-r--r-- | keyboards/meletrix/zoom65_lite/info.json | 5 | ||||
-rw-r--r-- | keyboards/meletrix/zoom65_lite/keymaps/via/keymap.c | 8 | ||||
-rw-r--r-- | keyboards/meletrix/zoom65_lite/zoom65_lite.c | 8 | ||||
-rw-r--r-- | keyboards/meletrix/zoom87/config.h | 9 | ||||
-rw-r--r-- | keyboards/meletrix/zoom87/info.json | 5 | ||||
-rw-r--r-- | keyboards/meletrix/zoom87/zoom87.c | 17 | ||||
-rw-r--r-- | keyboards/meletrix/zoom87/zoom87.h | 2 |
11 files changed, 28 insertions, 57 deletions
diff --git a/keyboards/meletrix/zoom65/config.h b/keyboards/meletrix/zoom65/config.h index 4c05b1d83b..e5cc1f3e5b 100644 --- a/keyboards/meletrix/zoom65/config.h +++ b/keyboards/meletrix/zoom65/config.h @@ -16,12 +16,6 @@ #pragma once - -#define MATRIX_ROW_PINS { F0, E6, D5, F1, F4 } -#define MATRIX_COL_PINS { C7, D3, D2, D1, D0, B7, B3, B2, C6, B6, B5, B4, D7, D6, D4 } - -#define DIODE_DIRECTION COL2ROW - // Note: array is { col, row ) #define ENCODERS_CW_KEY { { 5, 4 } } #define ENCODERS_CCW_KEY { { 3, 4 } } diff --git a/keyboards/meletrix/zoom65/info.json b/keyboards/meletrix/zoom65/info.json index 0968df4794..8c11abe429 100644 --- a/keyboards/meletrix/zoom65/info.json +++ b/keyboards/meletrix/zoom65/info.json @@ -8,6 +8,11 @@ "pid": "0x0004", "device_version": "0.0.1" }, + "matrix_pins": { + "cols": ["C7", "D3", "D2", "D1", "D0", "B7", "B3", "B2", "C6", "B6", "B5", "B4", "D7", "D6", "D4"], + "rows": ["F0", "E6", "D5", "F1", "F4"] + }, + "diode_direction": "COL2ROW", "encoder": { "rotary": [ {"pin_a": "B1", "pin_b": "B0", "resolution": 2} diff --git a/keyboards/meletrix/zoom65/zoom65.c b/keyboards/meletrix/zoom65/zoom65.c index ff27a4442f..11f49a9060 100644 --- a/keyboards/meletrix/zoom65/zoom65.c +++ b/keyboards/meletrix/zoom65/zoom65.c @@ -30,7 +30,9 @@ 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); } @@ -41,7 +43,9 @@ 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); } @@ -57,10 +61,4 @@ bool encoder_update_kb(uint8_t index, bool clockwise) encoder_action_register(index, clockwise); return true; }; -#else -bool encoder_update_kb(uint8_t index, bool clockwise) { - if (!encoder_update_user(index, clockwise)) { return false; } - tap_code_delay(clockwise ? KC_VOLU : KC_VOLD, 10); - return true; -} #endif diff --git a/keyboards/meletrix/zoom65_lite/config.h b/keyboards/meletrix/zoom65_lite/config.h index 4c05b1d83b..e5cc1f3e5b 100644 --- a/keyboards/meletrix/zoom65_lite/config.h +++ b/keyboards/meletrix/zoom65_lite/config.h @@ -16,12 +16,6 @@ #pragma once - -#define MATRIX_ROW_PINS { F0, E6, D5, F1, F4 } -#define MATRIX_COL_PINS { C7, D3, D2, D1, D0, B7, B3, B2, C6, B6, B5, B4, D7, D6, D4 } - -#define DIODE_DIRECTION COL2ROW - // Note: array is { col, row ) #define ENCODERS_CW_KEY { { 5, 4 } } #define ENCODERS_CCW_KEY { { 3, 4 } } diff --git a/keyboards/meletrix/zoom65_lite/info.json b/keyboards/meletrix/zoom65_lite/info.json index d5dcd621ef..97598af127 100644 --- a/keyboards/meletrix/zoom65_lite/info.json +++ b/keyboards/meletrix/zoom65_lite/info.json @@ -8,6 +8,11 @@ "pid": "0x0005", "device_version": "0.0.1" }, + "matrix_pins": { + "cols": ["C7", "D3", "D2", "D1", "D0", "B7", "B3", "B2", "C6", "B6", "B5", "B4", "D7", "D6", "D4"], + "rows": ["F0", "E6", "D5", "F1", "F4"] + }, + "diode_direction": "COL2ROW", "encoder": { "rotary": [ {"pin_a": "B1", "pin_b": "B0", "resolution": 2} diff --git a/keyboards/meletrix/zoom65_lite/keymaps/via/keymap.c b/keyboards/meletrix/zoom65_lite/keymaps/via/keymap.c index 23729b4349..4adfaba69d 100644 --- a/keyboards/meletrix/zoom65_lite/keymaps/via/keymap.c +++ b/keyboards/meletrix/zoom65_lite/keymaps/via/keymap.c @@ -29,7 +29,9 @@ 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); } @@ -40,7 +42,9 @@ 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/meletrix/zoom65_lite/zoom65_lite.c b/keyboards/meletrix/zoom65_lite/zoom65_lite.c index 1e1100a207..b0b511f686 100644 --- a/keyboards/meletrix/zoom65_lite/zoom65_lite.c +++ b/keyboards/meletrix/zoom65_lite/zoom65_lite.c @@ -15,11 +15,3 @@ */ #include "zoom65_lite.h" - -#ifndef VIA_ENABLE -bool encoder_update_kb(uint8_t index, bool clockwise) { - if (!encoder_update_user(index, clockwise)) { return false; } - tap_code_delay(clockwise ? KC_VOLU : KC_VOLD, 10); - return true; -} -#endif diff --git a/keyboards/meletrix/zoom87/config.h b/keyboards/meletrix/zoom87/config.h index c016ab1f56..4c3bb24d3e 100644 --- a/keyboards/meletrix/zoom87/config.h +++ b/keyboards/meletrix/zoom87/config.h @@ -16,14 +16,7 @@ #pragma once - -#define MATRIX_ROW_PINS { B3, B7, B2, F0, D3, D0 } -#define MATRIX_COL_PINS { D6, D7, D1, D5, F7, D4, F5, F4, F1, C7, C6, B6, B5, B4, E6, B1, B0 } - -#define DIODE_DIRECTION COL2ROW - #define RGB_DI_PIN D2 -#ifdef RGB_DI_PIN #define RGBLED_NUM 20 #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 @@ -41,5 +34,3 @@ #define RGBLIGHT_EFFECT_RGB_TEST #define RGBLIGHT_EFFECT_ALTERNATING #define RGBLIGHT_EFFECT_TWINKLE -#endif - diff --git a/keyboards/meletrix/zoom87/info.json b/keyboards/meletrix/zoom87/info.json index c60f7f8799..d5824818f9 100644 --- a/keyboards/meletrix/zoom87/info.json +++ b/keyboards/meletrix/zoom87/info.json @@ -8,6 +8,11 @@ "pid": "0x0007", "device_version": "0.0.1" }, + "matrix_pins": { + "cols": ["D6", "D7", "D1", "D5", "F7", "D4", "F5", "F4", "F1", "C7", "C6", "B6", "B5", "B4", "E6", "B1", "B0"], + "rows": ["B3", "B7", "B2", "F0", "D3", "D0"] + }, + "diode_direction": "COL2ROW", "indicators": { "caps_lock": "F6", "on_state": 0 diff --git a/keyboards/meletrix/zoom87/zoom87.c b/keyboards/meletrix/zoom87/zoom87.c deleted file mode 100644 index 59fc2ba3c8..0000000000 --- a/keyboards/meletrix/zoom87/zoom87.c +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright 2022 meletrix - * - * 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 "zoom87.h" diff --git a/keyboards/meletrix/zoom87/zoom87.h b/keyboards/meletrix/zoom87/zoom87.h index 03b94bfc40..87000be8b7 100644 --- a/keyboards/meletrix/zoom87/zoom87.h +++ b/keyboards/meletrix/zoom87/zoom87.h @@ -214,5 +214,5 @@ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G }, \ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO, KC_NO, KC_NO, KC_NO }, \ { K40, KC_NO, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, KC_NO, KC_NO, K4F, KC_NO }, \ - { K50, K51, K52, KC_NO, KC_NO, K55, K56, K55, KC_NO, KC_NO, K5A, K5B, K5C, K5D, K5E, K5F, K5G }, \ + { K50, K51, K52, KC_NO, KC_NO, K55, K56, K57, KC_NO, KC_NO, K5A, K5B, K5C, K5D, K5E, K5F, K5G }, \ } |