diff options
Diffstat (limited to 'keyboards/meletrix')
-rw-r--r-- | keyboards/meletrix/zoom65/config.h | 20 | ||||
-rw-r--r-- | keyboards/meletrix/zoom65/info.json | 12 | ||||
-rw-r--r-- | keyboards/meletrix/zoom65/rules.mk | 8 | ||||
-rw-r--r-- | keyboards/meletrix/zoom65/zoom65.c | 8 | ||||
-rw-r--r-- | keyboards/meletrix/zoom65_lite/config.h | 20 | ||||
-rw-r--r-- | keyboards/meletrix/zoom65_lite/info.json | 12 | ||||
-rw-r--r-- | keyboards/meletrix/zoom65_lite/keymaps/via/keymap.c | 12 | ||||
-rw-r--r-- | keyboards/meletrix/zoom65_lite/rules.mk | 8 | ||||
-rw-r--r-- | keyboards/meletrix/zoom87/config.h | 11 | ||||
-rw-r--r-- | keyboards/meletrix/zoom87/info.json | 6 | ||||
-rw-r--r-- | keyboards/meletrix/zoom87/rules.mk | 6 |
11 files changed, 39 insertions, 84 deletions
diff --git a/keyboards/meletrix/zoom65/config.h b/keyboards/meletrix/zoom65/config.h index d3a0a2f3b0..4c05b1d83b 100644 --- a/keyboards/meletrix/zoom65/config.h +++ b/keyboards/meletrix/zoom65/config.h @@ -16,32 +16,12 @@ #pragma once -#include "config_common.h" - -/* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 15 #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 -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 5 - -/* Enable encoder */ -#define ENCODERS_PAD_A { B1 } -#define ENCODERS_PAD_B { B0 } - -#define ENCODERS 1 - -#define ENCODER_RESOLUTION 2 - // Note: array is { col, row ) #define ENCODERS_CW_KEY { { 5, 4 } } #define ENCODERS_CCW_KEY { { 3, 4 } } - -#define LED_CAPS_LOCK_PIN F7 -#define LED_PIN_ON_STATE 0 - diff --git a/keyboards/meletrix/zoom65/info.json b/keyboards/meletrix/zoom65/info.json index ea128402e9..0968df4794 100644 --- a/keyboards/meletrix/zoom65/info.json +++ b/keyboards/meletrix/zoom65/info.json @@ -8,6 +8,18 @@ "pid": "0x0004", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B1", "pin_b": "B0", "resolution": 2} + ] + }, + "indicators": { + "caps_lock": "F7", + "on_state": 0 + }, + "processor": "atmega32u4", + "bootloader": "atmel-dfu", + "community_layouts": ["65_ansi_blocker", "65_iso_blocker", "65_ansi_blocker_split_bs", "65_iso_blocker_split_bs"], "layouts": { "LAYOUT_all": { "layout": [ diff --git a/keyboards/meletrix/zoom65/rules.mk b/keyboards/meletrix/zoom65/rules.mk index 05b56f4c10..c310a235a9 100644 --- a/keyboards/meletrix/zoom65/rules.mk +++ b/keyboards/meletrix/zoom65/rules.mk @@ -1,9 +1,3 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # @@ -17,5 +11,3 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow AUDIO_ENABLE = no # Audio output ENCODER_ENABLE = yes # Enable Encoder - -LAYOUTS = 65_ansi_blocker 65_iso_blocker 65_ansi_blocker_split_bs 65_iso_blocker_split_bs diff --git a/keyboards/meletrix/zoom65/zoom65.c b/keyboards/meletrix/zoom65/zoom65.c index f69ed547ef..ff27a4442f 100644 --- a/keyboards/meletrix/zoom65/zoom65.c +++ b/keyboards/meletrix/zoom65/zoom65.c @@ -17,13 +17,13 @@ #include "zoom65.h" #ifdef VIA_ENABLE -static uint8_t encoder_state[ENCODERS] = {0}; -static keypos_t encoder_cw[ENCODERS] = ENCODERS_CW_KEY; -static keypos_t encoder_ccw[ENCODERS] = ENCODERS_CCW_KEY; +static uint8_t encoder_state[NUM_ENCODERS] = {0}; +static keypos_t encoder_cw[NUM_ENCODERS] = ENCODERS_CW_KEY; +static keypos_t encoder_ccw[NUM_ENCODERS] = ENCODERS_CCW_KEY; void encoder_action_unregister(void) { - for (int index = 0; index < ENCODERS; ++index) + for (int index = 0; index < NUM_ENCODERS; ++index) { if (encoder_state[index]) { diff --git a/keyboards/meletrix/zoom65_lite/config.h b/keyboards/meletrix/zoom65_lite/config.h index d3a0a2f3b0..4c05b1d83b 100644 --- a/keyboards/meletrix/zoom65_lite/config.h +++ b/keyboards/meletrix/zoom65_lite/config.h @@ -16,32 +16,12 @@ #pragma once -#include "config_common.h" - -/* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 15 #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 -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 5 - -/* Enable encoder */ -#define ENCODERS_PAD_A { B1 } -#define ENCODERS_PAD_B { B0 } - -#define ENCODERS 1 - -#define ENCODER_RESOLUTION 2 - // Note: array is { col, row ) #define ENCODERS_CW_KEY { { 5, 4 } } #define ENCODERS_CCW_KEY { { 3, 4 } } - -#define LED_CAPS_LOCK_PIN F7 -#define LED_PIN_ON_STATE 0 - diff --git a/keyboards/meletrix/zoom65_lite/info.json b/keyboards/meletrix/zoom65_lite/info.json index aa2c141139..d5dcd621ef 100644 --- a/keyboards/meletrix/zoom65_lite/info.json +++ b/keyboards/meletrix/zoom65_lite/info.json @@ -8,6 +8,18 @@ "pid": "0x0005", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B1", "pin_b": "B0", "resolution": 2} + ] + }, + "indicators": { + "caps_lock": "F7", + "on_state": 0 + }, + "processor": "atmega32u4", + "bootloader": "atmel-dfu", + "community_layouts": ["65_ansi_blocker", "65_iso_blocker", "65_ansi_blocker_split_bs", "65_iso_blocker_split_bs"], "layouts": { "LAYOUT_all": { "layout": [ diff --git a/keyboards/meletrix/zoom65_lite/keymaps/via/keymap.c b/keyboards/meletrix/zoom65_lite/keymaps/via/keymap.c index de44abe37e..23729b4349 100644 --- a/keyboards/meletrix/zoom65_lite/keymaps/via/keymap.c +++ b/keyboards/meletrix/zoom65_lite/keymaps/via/keymap.c @@ -16,14 +16,13 @@ #include QMK_KEYBOARD_H -#ifdef VIA_ENABLE -static uint8_t encoder_state[ENCODERS] = {0}; -static keypos_t encoder_cw[ENCODERS] = ENCODERS_CW_KEY; -static keypos_t encoder_ccw[ENCODERS] = ENCODERS_CCW_KEY; +static uint8_t encoder_state[NUM_ENCODERS] = {0}; +static keypos_t encoder_cw[NUM_ENCODERS] = ENCODERS_CW_KEY; +static keypos_t encoder_ccw[NUM_ENCODERS] = ENCODERS_CCW_KEY; void encoder_action_unregister(void) { - for (int index = 0; index < ENCODERS; ++index) + for (int index = 0; index < NUM_ENCODERS; ++index) { if (encoder_state[index]) { @@ -56,8 +55,7 @@ bool encoder_update_kb(uint8_t index, bool clockwise) { encoder_action_register(index, clockwise); return true; -}; -#endif +} const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_all( diff --git a/keyboards/meletrix/zoom65_lite/rules.mk b/keyboards/meletrix/zoom65_lite/rules.mk index 05b56f4c10..c310a235a9 100644 --- a/keyboards/meletrix/zoom65_lite/rules.mk +++ b/keyboards/meletrix/zoom65_lite/rules.mk @@ -1,9 +1,3 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # @@ -17,5 +11,3 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow AUDIO_ENABLE = no # Audio output ENCODER_ENABLE = yes # Enable Encoder - -LAYOUTS = 65_ansi_blocker 65_iso_blocker 65_ansi_blocker_split_bs 65_iso_blocker_split_bs diff --git a/keyboards/meletrix/zoom87/config.h b/keyboards/meletrix/zoom87/config.h index 4c395e8af4..c016ab1f56 100644 --- a/keyboards/meletrix/zoom87/config.h +++ b/keyboards/meletrix/zoom87/config.h @@ -16,23 +16,12 @@ #pragma once -#include "config_common.h" - -/* key matrix size */ -#define MATRIX_ROWS 6 -#define MATRIX_COLS 17 #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 -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 5 - -#define LED_CAPS_LOCK_PIN F6 -#define LED_PIN_ON_STATE 0 - #define RGB_DI_PIN D2 #ifdef RGB_DI_PIN #define RGBLED_NUM 20 diff --git a/keyboards/meletrix/zoom87/info.json b/keyboards/meletrix/zoom87/info.json index 5d37e84c01..c60f7f8799 100644 --- a/keyboards/meletrix/zoom87/info.json +++ b/keyboards/meletrix/zoom87/info.json @@ -8,6 +8,12 @@ "pid": "0x0007", "device_version": "0.0.1" }, + "indicators": { + "caps_lock": "F6", + "on_state": 0 + }, + "processor": "atmega32u4", + "bootloader": "atmel-dfu", "layout_aliases": { "LAYOUT_87": "LAYOUT_tkl_f13", "LAYOUT_87_split_bs": "LAYOUT_tkl_f13_split_bs", diff --git a/keyboards/meletrix/zoom87/rules.mk b/keyboards/meletrix/zoom87/rules.mk index 85a4a905a5..9f087183c5 100644 --- a/keyboards/meletrix/zoom87/rules.mk +++ b/keyboards/meletrix/zoom87/rules.mk @@ -1,9 +1,3 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # |