From 8136eda6d48c8bc8dda5dfa439f7324d55448ca2 Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 13 Sep 2023 22:53:15 +1000 Subject: is31fl3731: driver naming cleanups (#21918) --- keyboards/fallacy/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards/fallacy') diff --git a/keyboards/fallacy/config.h b/keyboards/fallacy/config.h index 21231c7c57..dc66968bdc 100755 --- a/keyboards/fallacy/config.h +++ b/keyboards/fallacy/config.h @@ -19,7 +19,7 @@ * Using the default defines here, but using a custom implementation */ #define LED_DRIVER_ADDR_1 0b1110100 -#define LED_DRIVER_COUNT 1 +#define IS31FL3731_DRIVER_COUNT 1 #define LED_MATRIX_LED_COUNT 3 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap -- cgit v1.2.3 From 8f221052897754870e5c08a2de92c24d20cd307e Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 19 Sep 2023 19:31:54 +1000 Subject: Add and use I2C address defines for ISSI LED drivers (#22008) --- keyboards/fallacy/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards/fallacy') diff --git a/keyboards/fallacy/config.h b/keyboards/fallacy/config.h index dc66968bdc..eff0cc4f50 100755 --- a/keyboards/fallacy/config.h +++ b/keyboards/fallacy/config.h @@ -18,7 +18,7 @@ /* IS31FL3731 driver address (for status LEDs) * Using the default defines here, but using a custom implementation */ -#define LED_DRIVER_ADDR_1 0b1110100 +#define LED_DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_GND #define IS31FL3731_DRIVER_COUNT 1 #define LED_MATRIX_LED_COUNT 3 -- cgit v1.2.3 From d99dbe4d56a5d414b8d131bf703257172af91b70 Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 4 Oct 2023 20:12:50 +1100 Subject: Update ISSI LED types (#22099) --- keyboards/fallacy/indicators.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards/fallacy') diff --git a/keyboards/fallacy/indicators.c b/keyboards/fallacy/indicators.c index b9a4a87056..607be8cd85 100755 --- a/keyboards/fallacy/indicators.c +++ b/keyboards/fallacy/indicators.c @@ -54,7 +54,7 @@ void set_fallacy_led(int index, bool state) { /* define LED matrix */ -const is31_led PROGMEM g_is31_leds[LED_MATRIX_LED_COUNT] = { +const is31fl3731_led_t PROGMEM g_is31fl3731_leds[LED_MATRIX_LED_COUNT] = { {0, C1_1}, {0, C2_1}, {0, C3_1}, -- cgit v1.2.3 From c157c19b81fbd8b516de0eb5e854d278669cff1a Mon Sep 17 00:00:00 2001 From: Ryan Date: Fri, 13 Oct 2023 17:25:32 +1100 Subject: Dedupe I2C, SPI, UART driver inclusions (#22253) --- keyboards/fallacy/rules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards/fallacy') diff --git a/keyboards/fallacy/rules.mk b/keyboards/fallacy/rules.mk index 704204983c..7fa230bae2 100755 --- a/keyboards/fallacy/rules.mk +++ b/keyboards/fallacy/rules.mk @@ -14,4 +14,4 @@ AUDIO_ENABLE = no # Audio output # project specific files SRC += indicators.c \ drivers/led/issi/is31fl3731-simple.c -QUANTUM_LIB_SRC += i2c_master.c +I2C_DRIVER_REQUIRED = yes -- cgit v1.2.3 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/fallacy/config.h | 2 +- keyboards/fallacy/indicators.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'keyboards/fallacy') diff --git a/keyboards/fallacy/config.h b/keyboards/fallacy/config.h index eff0cc4f50..254f809c34 100755 --- a/keyboards/fallacy/config.h +++ b/keyboards/fallacy/config.h @@ -18,7 +18,7 @@ /* IS31FL3731 driver address (for status LEDs) * Using the default defines here, but using a custom implementation */ -#define LED_DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_GND +#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND #define IS31FL3731_DRIVER_COUNT 1 #define LED_MATRIX_LED_COUNT 3 diff --git a/keyboards/fallacy/indicators.c b/keyboards/fallacy/indicators.c index 607be8cd85..ae4f796ecc 100755 --- a/keyboards/fallacy/indicators.c +++ b/keyboards/fallacy/indicators.c @@ -23,20 +23,20 @@ */ void init_fallacy_leds(void) { i2c_init(); - is31fl3731_init(LED_DRIVER_ADDR_1); + is31fl3731_init(IS31FL3731_I2C_ADDRESS_1); for (int i = 0; i < LED_MATRIX_LED_COUNT; i++) { is31fl3731_set_led_control_register(i, true); } - is31fl3731_update_led_control_registers(LED_DRIVER_ADDR_1, 0); + is31fl3731_update_led_control_registers(IS31FL3731_I2C_ADDRESS_1, 0); } /* update the buffer */ void update_fallacy_leds(void) { - is31fl3731_update_pwm_buffers(LED_DRIVER_ADDR_1, 0); + is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_1, 0); } -- cgit v1.2.3 From cf7d3435d7e2cfb8927a1c436320f67bc9914eeb Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 23 Oct 2023 03:32:27 +1000 Subject: Add `_flush()` functions to LED drivers (#22308) --- keyboards/fallacy/indicators.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards/fallacy') diff --git a/keyboards/fallacy/indicators.c b/keyboards/fallacy/indicators.c index ae4f796ecc..a8630d2e11 100755 --- a/keyboards/fallacy/indicators.c +++ b/keyboards/fallacy/indicators.c @@ -36,7 +36,7 @@ void init_fallacy_leds(void) { /* update the buffer */ void update_fallacy_leds(void) { - is31fl3731_update_pwm_buffers(IS31FL3731_I2C_ADDRESS_1, 0); + is31fl3731_flush(); } -- cgit v1.2.3 From b52aca0af83fade24c56b4bb7369f18183123bd3 Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 1 Nov 2023 11:53:45 +1100 Subject: Relocate LED driver init code (#22365) --- keyboards/fallacy/config.h | 2 +- keyboards/fallacy/indicators.c | 11 ++--------- 2 files changed, 3 insertions(+), 10 deletions(-) (limited to 'keyboards/fallacy') diff --git a/keyboards/fallacy/config.h b/keyboards/fallacy/config.h index 254f809c34..65cea1d5c1 100755 --- a/keyboards/fallacy/config.h +++ b/keyboards/fallacy/config.h @@ -20,7 +20,7 @@ */ #define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND #define IS31FL3731_DRIVER_COUNT 1 -#define LED_MATRIX_LED_COUNT 3 +#define IS31FL3731_LED_COUNT 3 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ diff --git a/keyboards/fallacy/indicators.c b/keyboards/fallacy/indicators.c index a8630d2e11..b95786db41 100755 --- a/keyboards/fallacy/indicators.c +++ b/keyboards/fallacy/indicators.c @@ -22,14 +22,7 @@ * init IS31FL3731 and i2c */ void init_fallacy_leds(void) { - i2c_init(); - is31fl3731_init(IS31FL3731_I2C_ADDRESS_1); - - for (int i = 0; i < LED_MATRIX_LED_COUNT; i++) { - is31fl3731_set_led_control_register(i, true); - } - - is31fl3731_update_led_control_registers(IS31FL3731_I2C_ADDRESS_1, 0); + is31fl3731_init_drivers(); } @@ -54,7 +47,7 @@ void set_fallacy_led(int index, bool state) { /* define LED matrix */ -const is31fl3731_led_t PROGMEM g_is31fl3731_leds[LED_MATRIX_LED_COUNT] = { +const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { {0, C1_1}, {0, C2_1}, {0, C3_1}, -- 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/fallacy/config.h | 1 - 1 file changed, 1 deletion(-) (limited to 'keyboards/fallacy') diff --git a/keyboards/fallacy/config.h b/keyboards/fallacy/config.h index 65cea1d5c1..14df31805d 100755 --- a/keyboards/fallacy/config.h +++ b/keyboards/fallacy/config.h @@ -19,7 +19,6 @@ * Using the default defines here, but using a custom implementation */ #define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND -#define IS31FL3731_DRIVER_COUNT 1 #define IS31FL3731_LED_COUNT 3 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap -- cgit v1.2.3