diff options
author | Nick Brassel <nick@tzarc.org> | 2023-02-28 11:22:29 +1100 |
---|---|---|
committer | Nick Brassel <nick@tzarc.org> | 2023-02-28 11:22:29 +1100 |
commit | bacec14073b2e897d5a52caf12de5a6a1f7b4078 (patch) | |
tree | d4e3e57aac1a829a191831efd2e62c8a43217885 /keyboards/mwstudio/alicekk | |
parent | d70e9b8659a7fbbd7069fd542bd07e67e04327a1 (diff) | |
parent | b865b9e1706ad28ae4882bd2e0331e98808295fa (diff) |
Merge remote-tracking branch 'upstream/develop'
Diffstat (limited to 'keyboards/mwstudio/alicekk')
-rw-r--r-- | keyboards/mwstudio/alicekk/config.h | 14 | ||||
-rw-r--r-- | keyboards/mwstudio/alicekk/info.json | 94 | ||||
-rw-r--r-- | keyboards/mwstudio/alicekk/keymaps/via/keymap.c | 12 | ||||
-rw-r--r-- | keyboards/mwstudio/alicekk/rules.mk | 6 |
4 files changed, 98 insertions, 28 deletions
diff --git a/keyboards/mwstudio/alicekk/config.h b/keyboards/mwstudio/alicekk/config.h index 9657eea13c..290871bde5 100644 --- a/keyboards/mwstudio/alicekk/config.h +++ b/keyboards/mwstudio/alicekk/config.h @@ -16,25 +16,14 @@ #pragma once -#include "config_common.h" - -/* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 15 /* 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 } -#define BOOTMAGIC_LITE_ROW 0 -#define BOOTMAGIC_LITE_COLUMN 0 - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 5 - #define FORCE_NKRO @@ -59,6 +48,3 @@ #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 - -#define ENCODERS_PAD_A { B11 } -#define ENCODERS_PAD_B { B10 } diff --git a/keyboards/mwstudio/alicekk/info.json b/keyboards/mwstudio/alicekk/info.json index 7a2f830273..ec0d58b07e 100644 --- a/keyboards/mwstudio/alicekk/info.json +++ b/keyboards/mwstudio/alicekk/info.json @@ -5,5 +5,99 @@ "vid": "0x7BA1", "pid": "0x3201", "device_version": "0.0.1" + }, + "encoder": { + "rotary": [ + {"pin_a": "B11", "pin_b": "B10"} + ] + }, + "processor": "STM32F103", + "bootloader": "stm32duino", + "layouts": { + "LAYOUT": { + "layout": [ + {"x": 0.5, "y": 0}, + + {"x": 1.75, "y": 0}, + {"x": 2.75, "y": 0}, + {"x": 3.75, "y": 0}, + {"x": 4.75, "y": 0}, + {"x": 5.75, "y": 0}, + {"x": 6.75, "y": 0}, + {"x": 7.75, "y": 0}, + + {"x": 9.25, "y": 0}, + {"x": 10.25, "y": 0}, + {"x": 11.25, "y": 0}, + {"x": 12.25, "y": 0}, + {"x": 13.25, "y": 0}, + {"x": 14.25, "y": 0}, + {"x": 15.25, "y": 0, "w": 2}, + + {"x": 0.25, "y": 1}, + + {"x": 1.5, "y": 1, "w": 1.5}, + {"x": 3, "y": 1}, + {"x": 4, "y": 1}, + {"x": 5, "y": 1}, + {"x": 6, "y": 1}, + {"x": 7, "y": 1}, + + {"x": 9, "y": 1}, + {"x": 10, "y": 1}, + {"x": 11, "y": 1}, + {"x": 12, "y": 1}, + {"x": 13, "y": 1}, + {"x": 14, "y": 1}, + {"x": 15, "y": 1}, + {"x": 16, "y": 1, "w": 1.5}, + + {"x": 0, "y": 2}, + + {"x": 1.25, "y": 2, "w": 1.75}, + {"x": 3, "y": 2}, + {"x": 4, "y": 2}, + {"x": 5, "y": 2}, + {"x": 6, "y": 2}, + {"x": 7, "y": 2}, + + {"x": 9.5, "y": 2}, + {"x": 10.5, "y": 2}, + {"x": 11.5, "y": 2}, + {"x": 12.5, "y": 2}, + {"x": 13.5, "y": 2}, + {"x": 14.5, "y": 2}, + {"x": 15.5, "y": 2, "w": 2.25}, + + {"x": 1, "y": 3, "w": 2.25}, + {"x": 3.25, "y": 3}, + {"x": 4.25, "y": 3}, + {"x": 5.25, "y": 3}, + {"x": 6.25, "y": 3}, + {"x": 7.25, "y": 3}, + + {"x": 9.75, "y": 3}, + {"x": 10.75, "y": 3}, + {"x": 11.75, "y": 3}, + {"x": 12.75, "y": 3}, + {"x": 13.75, "y": 3}, + {"x": 14.75, "y": 3}, + {"x": 15.75, "y": 3}, + {"x": 16.75, "y": 3, "w": 1.25}, + + {"x": 1, "y": 4, "w": 1.25}, + {"x": 2.25, "y": 4, "w": 1.25}, + + {"x": 4.75, "y": 4, "w": 1.25}, + {"x": 6, "y": 4, "w": 2.25}, + + {"x": 9.75, "y": 4, "w": 2.75}, + {"x": 12.5, "y": 4, "w": 1.25}, + + {"x": 14.75, "y": 4}, + {"x": 15.75, "y": 4}, + {"x": 16.75, "y": 4} + ] + } } } diff --git a/keyboards/mwstudio/alicekk/keymaps/via/keymap.c b/keyboards/mwstudio/alicekk/keymaps/via/keymap.c index 62068bd43e..6c21e053fa 100644 --- a/keyboards/mwstudio/alicekk/keymaps/via/keymap.c +++ b/keyboards/mwstudio/alicekk/keymaps/via/keymap.c @@ -53,15 +53,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #ifdef ENCODER_ENABLE -#define ENCODERS 1 -static uint8_t encoder_state[ENCODERS] = {0}; -static keypos_t encoder_cw[ENCODERS] = {{6, 4}}; -static keypos_t encoder_ccw[ENCODERS] = {{7, 4}}; - +static uint8_t encoder_state[NUM_ENCODERS] = {0}; +static keypos_t encoder_cw[NUM_ENCODERS] = {{6, 4}}; +static keypos_t encoder_ccw[NUM_ENCODERS] = {{7, 4}}; void encoder_action_unregister(void) { -#ifdef ENCODERS - for (uint8_t index = 0; index < ENCODERS; ++index) { + for (uint8_t index = 0; index < NUM_ENCODERS; ++index) { if (encoder_state[index]) { keyevent_t encoder_event = (keyevent_t) { .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], @@ -72,7 +69,6 @@ void encoder_action_unregister(void) { action_exec(encoder_event); } } -#endif } void encoder_action_register(uint8_t index, bool clockwise) { diff --git a/keyboards/mwstudio/alicekk/rules.mk b/keyboards/mwstudio/alicekk/rules.mk index 3c4396fabf..f365071da0 100644 --- a/keyboards/mwstudio/alicekk/rules.mk +++ b/keyboards/mwstudio/alicekk/rules.mk @@ -1,9 +1,3 @@ -# MCU name -MCU = STM32F103 - -# Bootloader selection -BOOTLOADER = stm32duino - # Build Options # change yes to no to disable # |