summaryrefslogtreecommitdiff
path: root/keyboards/aeboards/satellite
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/aeboards/satellite')
-rw-r--r--keyboards/aeboards/satellite/rev1/config.h10
-rw-r--r--keyboards/aeboards/satellite/rev1/rev1.c33
-rw-r--r--keyboards/aeboards/satellite/rev1/rules.mk2
3 files changed, 17 insertions, 28 deletions
diff --git a/keyboards/aeboards/satellite/rev1/config.h b/keyboards/aeboards/satellite/rev1/config.h
index 508689faf5..7a06288394 100644
--- a/keyboards/aeboards/satellite/rev1/config.h
+++ b/keyboards/aeboards/satellite/rev1/config.h
@@ -17,14 +17,14 @@
#pragma once
//RGB Matrix defines
-#define DRIVER_ADDR_1 0x74
-#define DRIVER_ADDR_2 0x76
+#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
+#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_SDA
-#define DRIVER_COUNT 2
+#define IS31FL3731_DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 36
#define DRIVER_2_LED_TOTAL 36
-#define ISSI_DRIVER_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
-#define RGB_MATRIX_LED_COUNT ISSI_DRIVER_TOTAL
+#define IS31FL3731_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
+#define RGB_MATRIX_LED_COUNT IS31FL3731_LED_COUNT
#define RGB_MATRIX_DEFAULT_VAL 80
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
diff --git a/keyboards/aeboards/satellite/rev1/rev1.c b/keyboards/aeboards/satellite/rev1/rev1.c
index 785fa8af9f..6727894e06 100644
--- a/keyboards/aeboards/satellite/rev1/rev1.c
+++ b/keyboards/aeboards/satellite/rev1/rev1.c
@@ -18,7 +18,7 @@
#include "drivers/led/issi/is31fl3731.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
@@ -145,38 +145,27 @@ led_config_t g_led_config = { {
// Custom Driver
static void init(void) {
i2c_init();
- is31fl3731_init(DRIVER_ADDR_1);
- is31fl3731_init(DRIVER_ADDR_2);
- for (int index = 0; index < ISSI_DRIVER_TOTAL; index++) {
+
+ is31fl3731_init(IS31FL3731_I2C_ADDRESS_1);
+ is31fl3731_init(IS31FL3731_I2C_ADDRESS_2);
+
+ for (int index = 0; index < IS31FL3731_LED_COUNT; index++) {
bool enabled = !( ( index == 18+5) || //B5
( index == 36+17) || //C17
( index == 54+13) //D13
);
is31fl3731_set_led_control_register(index, enabled, enabled, enabled);
}
- is31fl3731_update_led_control_registers(DRIVER_ADDR_1, 0);
- is31fl3731_update_led_control_registers(DRIVER_ADDR_2, 1);
-}
-
-static void flush(void) {
- is31fl3731_update_pwm_buffers(DRIVER_ADDR_1, 0);
- is31fl3731_update_pwm_buffers(DRIVER_ADDR_2, 1);
-}
-
-static void set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
- is31fl3731_set_color(index, red, green, blue);
-}
-static void set_color_all(uint8_t red, uint8_t green, uint8_t blue) {
- is31fl3731_set_color_all( red, green, blue );
+ is31fl3731_update_led_control_registers(IS31FL3731_I2C_ADDRESS_1, 0);
+ is31fl3731_update_led_control_registers(IS31FL3731_I2C_ADDRESS_2, 1);
}
-
const rgb_matrix_driver_t rgb_matrix_driver = {
.init = init,
- .flush = flush,
- .set_color = set_color,
- .set_color_all = set_color_all
+ .flush = is31fl3731_flush,
+ .set_color = is31fl3731_set_color,
+ .set_color_all = is31fl3731_set_color_all
};
#endif
diff --git a/keyboards/aeboards/satellite/rev1/rules.mk b/keyboards/aeboards/satellite/rev1/rules.mk
index 1a4657b08c..f95b0f015d 100644
--- a/keyboards/aeboards/satellite/rev1/rules.mk
+++ b/keyboards/aeboards/satellite/rev1/rules.mk
@@ -18,4 +18,4 @@ COMMON_VPATH += $(DRIVER_PATH)/issi
# project specific files
SRC += drivers/led/issi/is31fl3731.c
-QUANTUM_LIB_SRC += i2c_master.c
+I2C_DRIVER_REQUIRED = yes