summaryrefslogtreecommitdiff
path: root/keyboards/rgbkb/mun/rev1/rev1.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/rgbkb/mun/rev1/rev1.c')
-rw-r--r--keyboards/rgbkb/mun/rev1/rev1.c33
1 files changed, 1 insertions, 32 deletions
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;