summaryrefslogtreecommitdiff
path: root/drivers/led/issi/is31fl3731.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/led/issi/is31fl3731.h')
-rw-r--r--drivers/led/issi/is31fl3731.h30
1 files changed, 26 insertions, 4 deletions
diff --git a/drivers/led/issi/is31fl3731.h b/drivers/led/issi/is31fl3731.h
index bdf03de1ee..1e70eb276f 100644
--- a/drivers/led/issi/is31fl3731.h
+++ b/drivers/led/issi/is31fl3731.h
@@ -19,17 +19,39 @@
#include <stdint.h>
#include <stdbool.h>
-#include <string.h>
#include "progmem.h"
-typedef struct is31_led {
+// ======== DEPRECATED DEFINES - DO NOT USE ========
+#ifdef DRIVER_COUNT
+# define IS31FL3731_DRIVER_COUNT DRIVER_COUNT
+#endif
+#ifdef ISSI_TIMEOUT
+# define IS31FL3731_I2C_TIMEOUT ISSI_TIMEOUT
+#endif
+#ifdef ISSI_PERSISTENCE
+# define IS31FL3731_I2C_PERSISTENCE ISSI_PERSISTENCE
+#endif
+#ifdef ISSI_3731_DEGHOST
+# define IS31FL3731_DEGHOST ISSI_3731_DEGHOST
+#endif
+
+#define is31_led is31fl3731_led_t
+#define g_is31_leds g_is31fl3731_leds
+// ========
+
+#define IS31FL3731_I2C_ADDRESS_GND 0x74
+#define IS31FL3731_I2C_ADDRESS_SCL 0x75
+#define IS31FL3731_I2C_ADDRESS_SDA 0x76
+#define IS31FL3731_I2C_ADDRESS_VCC 0x77
+
+typedef struct is31fl3731_led_t {
uint8_t driver : 2;
uint8_t r;
uint8_t g;
uint8_t b;
-} __attribute__((packed)) is31_led;
+} __attribute__((packed)) is31fl3731_led_t;
-extern const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT];
+extern const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT];
void is31fl3731_init(uint8_t addr);
void is31fl3731_write_register(uint8_t addr, uint8_t reg, uint8_t data);