diff options
Diffstat (limited to 'keyboards/synthlabs/solo')
-rw-r--r-- | keyboards/synthlabs/solo/config.h | 45 | ||||
-rw-r--r-- | keyboards/synthlabs/solo/info.json | 9 | ||||
-rw-r--r-- | keyboards/synthlabs/solo/keymaps/iidx/keymap.c | 10 | ||||
-rw-r--r-- | keyboards/synthlabs/solo/keymaps/via/keymap.c | 15 | ||||
-rw-r--r-- | keyboards/synthlabs/solo/solo.c | 2 | ||||
-rw-r--r-- | keyboards/synthlabs/solo/solo.h | 41 |
6 files changed, 18 insertions, 104 deletions
diff --git a/keyboards/synthlabs/solo/config.h b/keyboards/synthlabs/solo/config.h index 2352ba2972..3411aa9f68 100644 --- a/keyboards/synthlabs/solo/config.h +++ b/keyboards/synthlabs/solo/config.h @@ -3,56 +3,11 @@ #pragma once -#include "config_common.h" - -#define ENCODERS 1 -#define ENCODER_RESOLUTION 4 -#define ENCODERS_PAD_A { B2 } -#define ENCODERS_PAD_B { B3 } #define ENCODERS_CW_KEY { { 2, 1 } } #define ENCODERS_CCW_KEY { { 0, 1 } } -/* key matrix size */ -#define MATRIX_ROWS 3 -#define MATRIX_COLS 7 - -/* - * Force NKRO - * - * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved - * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the - * makefile for this to work.) - * - * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) - * until the next keyboard reset. - * - * NKRO may prevent your keystrokes from being detected in the BIOS, but it is - * fully operational during normal computer usage. - * - * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) - * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by - * bootmagic, NKRO mode will always be enabled until it is toggled again during a - * power-up. - * - */ - #define FORCE_NKRO -/* - * Magic Key Options - * - * Magic keys are hotkey commands that allow control over firmware functions of - * the keyboard. They are best used in combination with the HID Listen program, - * found here: https://www.pjrc.com/teensy/hid_listen.html - * - * The options below allow the magic key functionality to be changed. This is - * useful if your keyboard/keypad is missing keys and you want magic key support. - * - */ - -#define BOOTMAGIC_LITE_ROW 1 -#define BOOTMAGIC_LITE_COLUMN 1 - #define JOYSTICK_BUTTON_COUNT 13 #define JOYSTICK_AXIS_COUNT 1 #define JOYSTICK_AXIS_RESOLUTION 16 diff --git a/keyboards/synthlabs/solo/info.json b/keyboards/synthlabs/solo/info.json index 9fc26e0ab4..14d39d63cc 100644 --- a/keyboards/synthlabs/solo/info.json +++ b/keyboards/synthlabs/solo/info.json @@ -5,7 +5,6 @@ "maintainer": "hongaaronc", "bootloader": "atmel-dfu", "processor": "atmega32u4", - "debounce": 5, "matrix_pins": { "direct": [ ["C6", "D6", "B5", "B4", "D7", "B6", "D4"], @@ -18,6 +17,14 @@ "pid": "0x3031", "device_version": "0.0.1" }, + "encoder": { + "rotary": [ + {"pin_a": "B2", "pin_b": "B3"} + ] + }, + "bootmagic": { + "matrix": [1, 1] + }, "layouts": { "LAYOUT_all": { "layout": [ diff --git a/keyboards/synthlabs/solo/keymaps/iidx/keymap.c b/keyboards/synthlabs/solo/keymaps/iidx/keymap.c index f274ba9c06..aedb00d968 100644 --- a/keyboards/synthlabs/solo/keymaps/iidx/keymap.c +++ b/keyboards/synthlabs/solo/keymaps/iidx/keymap.c @@ -7,14 +7,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_all( - JS_BUTTON0,JS_BUTTON1,JS_BUTTON2,JS_BUTTON3,JS_BUTTON4,JS_BUTTON5,JS_BUTTON6, - JS_BUTTON8, MO(1), JS_BUTTON7, - JS_BUTTON0,JS_BUTTON1,JS_BUTTON2,JS_BUTTON3,JS_BUTTON4,JS_BUTTON5,JS_BUTTON6 + JS_0,JS_1,JS_2,JS_3,JS_4,JS_5,JS_6, + JS_8, MO(1), JS_7, + JS_0,JS_1,JS_2,JS_3,JS_4,JS_5,JS_6 ), [1] = LAYOUT_all( - JS_BUTTON9,JS_BUTTON0,JS_BUTTON10, _______,JS_BUTTON11,JS_BUTTON1,JS_BUTTON12, + JS_9,JS_0,JS_10, _______,JS_11,JS_1,JS_12, _______, _______, _______, - JS_BUTTON10,JS_BUTTON0,JS_BUTTON9, _______,JS_BUTTON11,JS_BUTTON1,JS_BUTTON12 + JS_10,JS_0,JS_9, _______,JS_11,JS_1,JS_12 ), }; diff --git a/keyboards/synthlabs/solo/keymaps/via/keymap.c b/keyboards/synthlabs/solo/keymaps/via/keymap.c index 7949c61375..c6634c42d4 100644 --- a/keyboards/synthlabs/solo/keymaps/via/keymap.c +++ b/keyboards/synthlabs/solo/keymaps/via/keymap.c @@ -27,16 +27,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #if defined(VIA_ENABLE) && defined(ENCODER_ENABLE) - -#ifdef ENCODERS -static uint8_t encoder_state[] = {0}; -static keypos_t encoder_cw[] = ENCODERS_CW_KEY; -static keypos_t encoder_ccw[] = ENCODERS_CCW_KEY; -#endif +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) { -#ifdef ENCODERS - for (int index = 0; index < ENCODERS; ++index) { + for (int 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], @@ -47,11 +43,9 @@ void encoder_action_unregister(void) { action_exec(encoder_event); } } -#endif } void encoder_action_register(uint8_t index, bool clockwise) { -#ifdef ENCODERS keyevent_t encoder_event = (keyevent_t) { .key = clockwise ? encoder_cw[index] : encoder_ccw[index], .pressed = true, @@ -59,7 +53,6 @@ void encoder_action_register(uint8_t index, bool clockwise) { }; encoder_state[index] = (clockwise ^ 1) | (clockwise << 1); action_exec(encoder_event); -#endif } void matrix_scan_user(void) { diff --git a/keyboards/synthlabs/solo/solo.c b/keyboards/synthlabs/solo/solo.c index b557a3505c..aca82c9ea3 100644 --- a/keyboards/synthlabs/solo/solo.c +++ b/keyboards/synthlabs/solo/solo.c @@ -1,7 +1,7 @@ // Copyright 2022 Aaron Hong (@hongaaronc) // SPDX-License-Identifier: GPL-2.0-or-later -#include "solo.h" +#include "quantum.h" #if !defined(VIA_ENABLE) && !defined(JOYSTICK_ENABLE) && defined(ENCODER_ENABLE) bool encoder_update_kb(uint8_t index, bool clockwise) { diff --git a/keyboards/synthlabs/solo/solo.h b/keyboards/synthlabs/solo/solo.h deleted file mode 100644 index c487446a49..0000000000 --- a/keyboards/synthlabs/solo/solo.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Aaron Hong (@hongaaronc) -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#include "quantum.h" - -#define XXX KC_NO - -// This a shortcut to help you visually see your layout. -// The first section contains all of the arguments -// The second converts the arguments into a two-dimensional array -#define LAYOUT_all( \ - k00, k01, k02, k03, k04, k05, k06, \ - k10, k11, k12, \ - k20, k21, k22, k23, k24, k25, k26 \ -) { \ - { k00, k01, k02, k03, k04, k05, k06 }, \ - { k10, k11, k12, XXX, XXX, XXX, XXX }, \ - { k20, k21, k22, k23, k24, k25, k26 } \ -} - -#define LAYOUT_left( \ - k01, k03, k05, \ - k10, k11, k12, \ - k20, k22, k24, k26 \ -) { \ - { XXX, k01, XXX, k03, XXX, k05, XXX }, \ - { k10, k11, k12, XXX, XXX, XXX, XXX }, \ - { k20, XXX, k22, XXX, k24, XXX, k26 } \ -} - -#define LAYOUT_right( \ - k25, k23, k21, \ - k10, k11, k12, \ - k06, k04, k02, k00 \ -) { \ - { k00, XXX, k02, XXX, k04, XXX, k06 }, \ - { k10, k11, k12, XXX, XXX, XXX, XXX }, \ - { XXX, k21, XXX, k23, XXX, k25, XXX } \ -} |