From c4a67d3f3302f3096bb6b15921c9587643164ba9 Mon Sep 17 00:00:00 2001 From: jack <0x6A73@pm.me> Date: Mon, 19 Jun 2023 09:46:27 -0600 Subject: Remove encoder in-matrix workaround code (#20389) --- keyboards/rgbkb/mun/rev1/rev1.c | 33 +-------------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) (limited to 'keyboards/rgbkb/mun/rev1/rev1.c') diff --git a/keyboards/rgbkb/mun/rev1/rev1.c b/keyboards/rgbkb/mun/rev1/rev1.c index 564ce4dfb9..986916b4a9 100644 --- a/keyboards/rgbkb/mun/rev1/rev1.c +++ b/keyboards/rgbkb/mun/rev1/rev1.c @@ -12,25 +12,12 @@ #define NUMBER_OF_TOUCH_ENCODERS 2 #define TOUCH_ENCODER_OPTIONS TOUCH_SEGMENTS + 2 -#define NUMBER_OF_ENCODERS 4 -#define ENCODER_OPTIONS 2 - typedef struct PACKED { uint8_t r; uint8_t c; } encodermap_t; -// this maps encoders and then touch encoders to their respective electrical matrix entry -// mapping is row (y) then column (x) when looking at the electrical layout -const encodermap_t encoder_map[NUMBER_OF_ENCODERS][ENCODER_OPTIONS] = -{ - { { 5, 0 }, { 5, 1 } }, // Encoder 1 matrix entries - { { 5, 2 }, { 5, 3 } }, // Encoder 2 matrix entries - { { 12, 0 }, { 12, 1 } }, // Encoder 3 matrix entries - { { 12, 2 }, { 12, 3 } }, // Encoder 4 matrix entries -}; - -const encodermap_t touch_encoder_map[NUMBER_OF_TOUCH_ENCODERS][TOUCH_ENCODER_OPTIONS] = +const encodermap_t touch_encoder_map[NUMBER_OF_TOUCH_ENCODERS][TOUCH_ENCODER_OPTIONS] = { { { 6, 0 }, { 6, 1 }, { 6, 2 }, { 6, 3 }, { 6, 4 } }, // Touch Encoder 1 matrix entries { { 13, 0 }, { 13, 1 }, { 13, 2 }, { 13, 3 }, { 13, 4 } } // Touch Encoder 2 matrix entries @@ -44,24 +31,6 @@ static void process_encoder_matrix(encodermap_t pos) { action_exec(MAKE_KEYEVENT(pos.r, pos.c, false)); } -bool encoder_update_kb(uint8_t index, bool clockwise) { - if (!encoder_update_user(index, clockwise)) - return false; - - // Mapping clockwise (typically increase) to zero, and counter clockwise (decrease) to 1 - process_encoder_matrix(encoder_map[index][clockwise ? 0 : 1]); - return false; -} - -bool touch_encoder_update_kb(uint8_t index, bool clockwise) { - if (!touch_encoder_update_user(index, clockwise)) - return false; - - // Mapping clockwise (typically increase) to zero, and counter clockwise (decrease) to 1 - process_encoder_matrix(touch_encoder_map[index][clockwise ? 0 : 1]); - return false; -} - bool touch_encoder_tapped_kb(uint8_t index, uint8_t section) { if (!touch_encoder_tapped_user(index, section)) return false; -- cgit v1.2.3