From d56ee70c524b4fc4d1638e5e8c4bdeb89e752993 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 21 Oct 2023 21:41:59 +1000 Subject: Rename `DRIVER_ADDR_n` defines (#22200) Co-authored-by: Nick Brassel --- keyboards/keychron/q1v2/ansi/ansi.c | 4 ++-- keyboards/keychron/q1v2/ansi_encoder/ansi_encoder.c | 4 ++-- keyboards/keychron/q1v2/config.h | 11 +++++------ keyboards/keychron/q1v2/info.json | 2 +- keyboards/keychron/q1v2/iso/iso.c | 4 ++-- keyboards/keychron/q1v2/iso_encoder/iso_encoder.c | 4 ++-- keyboards/keychron/q1v2/jis/jis.c | 4 ++-- keyboards/keychron/q1v2/jis_encoder/jis_encoder.c | 4 ++-- 8 files changed, 18 insertions(+), 19 deletions(-) (limited to 'keyboards/keychron/q1v2') diff --git a/keyboards/keychron/q1v2/ansi/ansi.c b/keyboards/keychron/q1v2/ansi/ansi.c index ea6c6278d1..3b80c9d5c4 100644 --- a/keyboards/keychron/q1v2/ansi/ansi.c +++ b/keyboards/keychron/q1v2/ansi/ansi.c @@ -18,8 +18,8 @@ #ifdef RGB_MATRIX_ENABLE -const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { -/* Refer to CKLED2001 manual for these locations +const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { +/* Refer to SNLED27351 manual for these locations * driver * | R location * | | G location diff --git a/keyboards/keychron/q1v2/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q1v2/ansi_encoder/ansi_encoder.c index ea6c6278d1..3b80c9d5c4 100644 --- a/keyboards/keychron/q1v2/ansi_encoder/ansi_encoder.c +++ b/keyboards/keychron/q1v2/ansi_encoder/ansi_encoder.c @@ -18,8 +18,8 @@ #ifdef RGB_MATRIX_ENABLE -const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { -/* Refer to CKLED2001 manual for these locations +const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { +/* Refer to SNLED27351 manual for these locations * driver * | R location * | | G location diff --git a/keyboards/keychron/q1v2/config.h b/keyboards/keychron/q1v2/config.h index e2d331c1ac..d66e78b030 100644 --- a/keyboards/keychron/q1v2/config.h +++ b/keyboards/keychron/q1v2/config.h @@ -17,9 +17,9 @@ #pragma once /* RGB Matrix Driver Configuration */ -#define DRIVER_COUNT 2 -#define DRIVER_ADDR_1 0b1110111 -#define DRIVER_ADDR_2 0b1110100 +#define SNLED27351_DRIVER_COUNT 2 +#define SNLED27351_I2C_ADDRESS_1 SNLED27351_I2C_ADDRESS_VDDIO +#define SNLED27351_I2C_ADDRESS_2 SNLED27351_I2C_ADDRESS_GND /* Increase I2C speed to 1000 KHz */ #define I2C1_TIMINGR_PRESC 0U @@ -44,10 +44,9 @@ #define WEAR_LEVELING_LOGICAL_SIZE 2048 #define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2) -/* Scan phase of led driver set as MSKPHASE_9CHANNEL(defined as 0x03 in CKLED2001.h) */ -#define PHASE_CHANNEL MSKPHASE_9CHANNEL +#define SNLED27351_PHASE_CHANNEL SNLED27351_MSKPHASE_9CHANNEL /* Set LED driver current */ -#define CKLED2001_CURRENT_TUNE \ +#define SNLED27351_CURRENT_TUNE \ { 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50 } // RGB Matrix Animation modes. Explicitly enabled diff --git a/keyboards/keychron/q1v2/info.json b/keyboards/keychron/q1v2/info.json index c4a75f0283..b40c41c760 100644 --- a/keyboards/keychron/q1v2/info.json +++ b/keyboards/keychron/q1v2/info.json @@ -30,7 +30,7 @@ }, "diode_direction": "ROW2COL", "rgb_matrix": { - "driver": "ckled2001", + "driver": "snled27351", "animations": { "band_spiral_val": true, "breathing": true, diff --git a/keyboards/keychron/q1v2/iso/iso.c b/keyboards/keychron/q1v2/iso/iso.c index eae39c8d61..d879e55083 100644 --- a/keyboards/keychron/q1v2/iso/iso.c +++ b/keyboards/keychron/q1v2/iso/iso.c @@ -18,8 +18,8 @@ #ifdef RGB_MATRIX_ENABLE -const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { -/* Refer to CKLED2001 manual for these locations +const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { +/* Refer to SNLED27351 manual for these locations * driver * | R location * | | G location diff --git a/keyboards/keychron/q1v2/iso_encoder/iso_encoder.c b/keyboards/keychron/q1v2/iso_encoder/iso_encoder.c index eae39c8d61..d879e55083 100644 --- a/keyboards/keychron/q1v2/iso_encoder/iso_encoder.c +++ b/keyboards/keychron/q1v2/iso_encoder/iso_encoder.c @@ -18,8 +18,8 @@ #ifdef RGB_MATRIX_ENABLE -const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { -/* Refer to CKLED2001 manual for these locations +const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { +/* Refer to SNLED27351 manual for these locations * driver * | R location * | | G location diff --git a/keyboards/keychron/q1v2/jis/jis.c b/keyboards/keychron/q1v2/jis/jis.c index 6bfcbad3e4..e8c0112649 100644 --- a/keyboards/keychron/q1v2/jis/jis.c +++ b/keyboards/keychron/q1v2/jis/jis.c @@ -18,8 +18,8 @@ #ifdef RGB_MATRIX_ENABLE -const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { -/* Refer to CKLED2001 manual for these locations +const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { +/* Refer to SNLED27351 manual for these locations * driver * | R location * | | G location diff --git a/keyboards/keychron/q1v2/jis_encoder/jis_encoder.c b/keyboards/keychron/q1v2/jis_encoder/jis_encoder.c index 6bfcbad3e4..e8c0112649 100644 --- a/keyboards/keychron/q1v2/jis_encoder/jis_encoder.c +++ b/keyboards/keychron/q1v2/jis_encoder/jis_encoder.c @@ -18,8 +18,8 @@ #ifdef RGB_MATRIX_ENABLE -const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { -/* Refer to CKLED2001 manual for these locations +const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { +/* Refer to SNLED27351 manual for these locations * driver * | R location * | | G location -- cgit v1.2.3 From dda6e7fb36f20821c60fbd7638c9bd016ef217d6 Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 21 Nov 2023 02:48:23 +1100 Subject: LED drivers: register naming cleanups (#22436) --- keyboards/keychron/q1v2/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards/keychron/q1v2') diff --git a/keyboards/keychron/q1v2/config.h b/keyboards/keychron/q1v2/config.h index d66e78b030..b3edfbbad8 100644 --- a/keyboards/keychron/q1v2/config.h +++ b/keyboards/keychron/q1v2/config.h @@ -44,7 +44,7 @@ #define WEAR_LEVELING_LOGICAL_SIZE 2048 #define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2) -#define SNLED27351_PHASE_CHANNEL SNLED27351_MSKPHASE_9CHANNEL +#define SNLED27351_PHASE_CHANNEL SNLED27351_SCAN_PHASE_9_CHANNEL /* Set LED driver current */ #define SNLED27351_CURRENT_TUNE \ { 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50, 0xA6, 0xA6, 0x50 } -- cgit v1.2.3 From b35bac6afbadc88cf6e8e3d1c8cc7494a510bb60 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Wed, 22 Nov 2023 21:37:32 +0000 Subject: Remove unnecessary driver counts (#22435) --- keyboards/keychron/q1v2/config.h | 1 - 1 file changed, 1 deletion(-) (limited to 'keyboards/keychron/q1v2') diff --git a/keyboards/keychron/q1v2/config.h b/keyboards/keychron/q1v2/config.h index b3edfbbad8..5e2a7eaa54 100644 --- a/keyboards/keychron/q1v2/config.h +++ b/keyboards/keychron/q1v2/config.h @@ -17,7 +17,6 @@ #pragma once /* RGB Matrix Driver Configuration */ -#define SNLED27351_DRIVER_COUNT 2 #define SNLED27351_I2C_ADDRESS_1 SNLED27351_I2C_ADDRESS_VDDIO #define SNLED27351_I2C_ADDRESS_2 SNLED27351_I2C_ADDRESS_GND -- cgit v1.2.3