diff options
Diffstat (limited to 'keyboards/rgbkb/sol3')
-rw-r--r-- | keyboards/rgbkb/sol3/config.h | 11 | ||||
-rw-r--r-- | keyboards/rgbkb/sol3/rev1/info.json | 18 | ||||
-rw-r--r-- | keyboards/rgbkb/sol3/rev1/rev1.c | 13 | ||||
-rw-r--r-- | keyboards/rgbkb/sol3/rules.mk | 2 |
4 files changed, 21 insertions, 23 deletions
diff --git a/keyboards/rgbkb/sol3/config.h b/keyboards/rgbkb/sol3/config.h index 727947ef0b..9cc0134249 100644 --- a/keyboards/rgbkb/sol3/config.h +++ b/keyboards/rgbkb/sol3/config.h @@ -9,13 +9,6 @@ #pragma once - -// Last pins reserved for encoder / touch encoder support -#define MATRIX_ROW_PINS { B15, A8, A15, B12, A3, NO_PIN } -#define MATRIX_ROW_PINS_RIGHT { B15, B14, A8, A13, A7, NO_PIN } -// Empty matrix entries used for encoder / touch encoder support -#define MATRIX_COL_PINS { A6, A7, B0, B2, B1, B9, B3, B4 } -#define MATRIX_COL_PINS_RIGHT { B9, B8, B4, A6, A3, B10, B12, B11 } #define MATRIX_IO_DELAY 5 #define BUSY_WAIT @@ -28,9 +21,6 @@ #define TOUCH_RESOLUTION 25 // sensitivity of swipes, lower=faster #define TOUCH_SEGMENTS 3 -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - /* CRC Configuration */ #define CRC8_OPTIMIZE_SPEED #define CRC8_USE_TABLE @@ -63,7 +53,6 @@ #define DIP_SWITCH_PINS_RIGHT { A14, B0 } /* RGB LED Configuration */ -#define RGB_DI_PIN B5 #define RGBLED_NUM 156 #define RGBLED_SPLIT { 78, 78 } #define RGBLIGHT_LIMIT_VAL 255 diff --git a/keyboards/rgbkb/sol3/rev1/info.json b/keyboards/rgbkb/sol3/rev1/info.json index 046a56f390..3dd7404c44 100644 --- a/keyboards/rgbkb/sol3/rev1/info.json +++ b/keyboards/rgbkb/sol3/rev1/info.json @@ -8,6 +8,18 @@ "pid": "0x3510", "device_version": "0.0.1" }, + "ws2812": { + "pin": "B5", + "driver": "pwm" + }, + "rgb_matrix": { + "driver": "WS2812" + }, + "matrix_pins": { + "cols": ["A6", "A7", "B0", "B2", "B1", "B9", "B3", "B4"], + "rows": ["B15", "A8", "A15", "B12", "A3", null] + }, + "diode_direction": "COL2ROW", "encoder": { "rotary": [ {"pin_a": "A1", "pin_b": "A2"}, @@ -25,6 +37,12 @@ {"pin_a": "B3", "pin_b": "B13"} ] } + }, + "matrix_pins": { + "right": { + "cols": ["B9", "B8", "B4", "A6", "A3", "B10", "B12", "B11"], + "rows": ["B15", "B14", "A8", "A13", "A7", null] + } } }, "processor": "STM32F303", diff --git a/keyboards/rgbkb/sol3/rev1/rev1.c b/keyboards/rgbkb/sol3/rev1/rev1.c index de5836e061..ff330a83d6 100644 --- a/keyboards/rgbkb/sol3/rev1/rev1.c +++ b/keyboards/rgbkb/sol3/rev1/rev1.c @@ -57,10 +57,7 @@ bool dip_switch_update_kb(uint8_t index, bool active) { } case 1: { // Handle RGB Encoder switch press - action_exec((keyevent_t){ - .key = (keypos_t){.row = isLeftHand ? 4 : 10, .col = 6}, - .pressed = active, .time = (timer_read() | 1) /* time should not be 0 */ - }); + action_exec(MAKE_KEYEVENT(isLeftHand ? 4 : 10, 6, active)); break; } } @@ -68,15 +65,11 @@ bool dip_switch_update_kb(uint8_t index, bool active) { } static void process_encoder_matrix(encodermap_t pos) { - action_exec((keyevent_t){ - .key = (keypos_t){.row = pos.r, .col = pos.c}, .pressed = true, .time = (timer_read() | 1) /* time should not be 0 */ - }); + action_exec(MAKE_KEYEVENT(pos.r, pos.c, true)); #if TAP_CODE_DELAY > 0 wait_ms(TAP_CODE_DELAY); #endif - action_exec((keyevent_t){ - .key = (keypos_t){.row = pos.r, .col = pos.c}, .pressed = false, .time = (timer_read() | 1) /* time should not be 0 */ - }); + action_exec(MAKE_KEYEVENT(pos.r, pos.c, false)); } bool encoder_update_kb(uint8_t index, bool clockwise) { diff --git a/keyboards/rgbkb/sol3/rules.mk b/keyboards/rgbkb/sol3/rules.mk index f761d71be2..382b858f46 100644 --- a/keyboards/rgbkb/sol3/rules.mk +++ b/keyboards/rgbkb/sol3/rules.mk @@ -19,10 +19,8 @@ AUDIO_DRIVER = dac_additive DYNAMIC_MACRO_ENABLE = yes DIP_SWITCH_ENABLE = yes -WS2812_DRIVER = pwm RGBLIGHT_ENABLE = no RGB_MATRIX_ENABLE = yes -RGB_MATRIX_DRIVER = WS2812 OLED_ENABLE = yes OLED_DRIVER = SSD1306 # Enable the OLED Driver |