From 7e0299117b389b1c7fcdfa2f20891ba2287ea771 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sun, 26 Feb 2023 09:45:12 +1100 Subject: Move encoder config to data driven (#19923) Co-authored-by: Nick Brassel --- keyboards/terrazzo/config.h | 38 -------------------------------------- keyboards/terrazzo/info.json | 7 +++++++ 2 files changed, 7 insertions(+), 38 deletions(-) (limited to 'keyboards/terrazzo') diff --git a/keyboards/terrazzo/config.h b/keyboards/terrazzo/config.h index 75ca5885a1..6c0cbb80b9 100644 --- a/keyboards/terrazzo/config.h +++ b/keyboards/terrazzo/config.h @@ -25,44 +25,6 @@ #define DIODE_DIRECTION COL2ROW -/* ROTARY ENCODERS */ - -/* 4 encoder positions are supported. With multiple -encoder support when using the extra pins of -Elite-C controller. - -Use the following configuration guides for your -encoder layout. */ - -/* PRO MICRO CONFIGURATIONS */ - -/* If using a Pro Micro, only 1 encoder may be used, -and only in the top or bottom position. -Top and bottom encoders share the same net, -so there is only one configuration. */ - -/* TOP or BOTTOM */ -// #define ENCODERS_PAD_A { C6 } -// #define ENCODERS_PAD_B { D4 } - -/* ELITE-C ONLY CONFIGURATIONS */ - -/* TOP 3 - Default configuration */ -#define ENCODERS_PAD_A { C6 , B7, C7 } -#define ENCODERS_PAD_B { D4 , D5, F1 } - -/* BOTTOM 3 */ -// #define ENCODERS_PAD_A { B7, C7, C6 } -// #define ENCODERS_PAD_B { D5, F1, D4 } - -/* BOTTOM 2 */ -// #define ENCODERS_PAD_A { C7, C6 } -// #define ENCODERS_PAD_B { F1, D4 } - - -#define ENCODER_RESOLUTION 2 - #ifdef LED_MATRIX_ENABLE #define LED_DRIVER_ADDR_1 0x74 diff --git a/keyboards/terrazzo/info.json b/keyboards/terrazzo/info.json index 36382c4648..fb59374d1d 100644 --- a/keyboards/terrazzo/info.json +++ b/keyboards/terrazzo/info.json @@ -8,6 +8,13 @@ "pid": "0x545A", "device_version": "0.0.2" }, + "encoder": { + "rotary": [ + {"pin_a": "C6", "pin_b": "D4", "resolution": 2}, + {"pin_a": "B7", "pin_b": "D5", "resolution": 2}, + {"pin_a": "C7", "pin_b": "F1", "resolution": 2} + ] + }, "processor": "atmega32u4", "bootloader": "atmel-dfu", "layouts": { -- cgit v1.2.3