summaryrefslogtreecommitdiff
path: root/drivers/led
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2023-09-19 19:31:54 +1000
committerGitHub <noreply@github.com>2023-09-19 19:31:54 +1000
commit8f221052897754870e5c08a2de92c24d20cd307e (patch)
treefe853aa394ae9d07f593446ce87a01b334f3bbea /drivers/led
parent74360d0a01d58baf68109f6380144c7f3c69ef91 (diff)
Add and use I2C address defines for ISSI LED drivers (#22008)
Diffstat (limited to 'drivers/led')
-rw-r--r--drivers/led/ckled2001-simple.h5
-rw-r--r--drivers/led/ckled2001.h5
-rw-r--r--drivers/led/issi/is31fl3731-simple.c9
-rw-r--r--drivers/led/issi/is31fl3731-simple.h5
-rw-r--r--drivers/led/issi/is31fl3731.c9
-rw-r--r--drivers/led/issi/is31fl3731.h5
-rw-r--r--drivers/led/issi/is31fl3733-simple.c12
-rw-r--r--drivers/led/issi/is31fl3733-simple.h17
-rw-r--r--drivers/led/issi/is31fl3733.c12
-rw-r--r--drivers/led/issi/is31fl3733.h17
-rw-r--r--drivers/led/issi/is31fl3736.c12
-rw-r--r--drivers/led/issi/is31fl3736.h17
-rw-r--r--drivers/led/issi/is31fl3737.c12
-rw-r--r--drivers/led/issi/is31fl3737.h11
-rw-r--r--drivers/led/issi/is31fl3741.c12
-rw-r--r--drivers/led/issi/is31fl3741.h5
16 files changed, 84 insertions, 81 deletions
diff --git a/drivers/led/ckled2001-simple.h b/drivers/led/ckled2001-simple.h
index d1765b912b..1080da34c2 100644
--- a/drivers/led/ckled2001-simple.h
+++ b/drivers/led/ckled2001-simple.h
@@ -48,6 +48,11 @@
#define MSKPHASE_1CHANNEL CKLED2001_MSKPHASE_1CHANNEL
// ========
+#define CKLED2001_I2C_ADDRESS_GND 0x74
+#define CKLED2001_I2C_ADDRESS_SCL 0x75
+#define CKLED2001_I2C_ADDRESS_SDA 0x76
+#define CKLED2001_I2C_ADDRESS_VDDIO 0x77
+
typedef struct ckled2001_led {
uint8_t driver : 2;
uint8_t v;
diff --git a/drivers/led/ckled2001.h b/drivers/led/ckled2001.h
index bfd70f7173..257efbb6a1 100644
--- a/drivers/led/ckled2001.h
+++ b/drivers/led/ckled2001.h
@@ -48,6 +48,11 @@
#define MSKPHASE_1CHANNEL CKLED2001_MSKPHASE_1CHANNEL
// ========
+#define CKLED2001_I2C_ADDRESS_GND 0x74
+#define CKLED2001_I2C_ADDRESS_SCL 0x75
+#define CKLED2001_I2C_ADDRESS_SDA 0x76
+#define CKLED2001_I2C_ADDRESS_VDDIO 0x77
+
typedef struct ckled2001_led {
uint8_t driver : 2;
uint8_t r;
diff --git a/drivers/led/issi/is31fl3731-simple.c b/drivers/led/issi/is31fl3731-simple.c
index 6b463d3092..19bbc73d12 100644
--- a/drivers/led/issi/is31fl3731-simple.c
+++ b/drivers/led/issi/is31fl3731-simple.c
@@ -22,15 +22,6 @@
#include "i2c_master.h"
#include "wait.h"
-// This is a 7-bit address, that gets left-shifted and bit 0
-// set to 0 for write, 1 for read (as per I2C protocol)
-// The address will vary depending on your wiring:
-// 0b1110100 AD <-> GND
-// 0b1110111 AD <-> VCC
-// 0b1110101 AD <-> SCL
-// 0b1110110 AD <-> SDA
-#define IS31FL3731_I2C_ADDRESS_DEFAULT 0x74
-
#define IS31FL3731_REG_CONFIG 0x00
#define IS31FL3731_REG_CONFIG_PICTUREMODE 0x00
#define IS31FL3731_REG_CONFIG_AUTOPLAYMODE 0x08
diff --git a/drivers/led/issi/is31fl3731-simple.h b/drivers/led/issi/is31fl3731-simple.h
index ee830faca8..e6c9ce37c5 100644
--- a/drivers/led/issi/is31fl3731-simple.h
+++ b/drivers/led/issi/is31fl3731-simple.h
@@ -37,6 +37,11 @@
#endif
// ========
+#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 is31_led {
uint8_t driver : 2;
uint8_t v;
diff --git a/drivers/led/issi/is31fl3731.c b/drivers/led/issi/is31fl3731.c
index 9e2d39c692..2123438a5f 100644
--- a/drivers/led/issi/is31fl3731.c
+++ b/drivers/led/issi/is31fl3731.c
@@ -21,15 +21,6 @@
#include "i2c_master.h"
#include "wait.h"
-// This is a 7-bit address, that gets left-shifted and bit 0
-// set to 0 for write, 1 for read (as per I2C protocol)
-// The address will vary depending on your wiring:
-// 0b1110100 AD <-> GND
-// 0b1110111 AD <-> VCC
-// 0b1110101 AD <-> SCL
-// 0b1110110 AD <-> SDA
-#define IS31FL3731_I2C_ADDRESS_DEFAULT 0x74
-
#define IS31FL3731_REG_CONFIG 0x00
#define IS31FL3731_REG_CONFIG_PICTUREMODE 0x00
#define IS31FL3731_REG_CONFIG_AUTOPLAYMODE 0x08
diff --git a/drivers/led/issi/is31fl3731.h b/drivers/led/issi/is31fl3731.h
index 97e3f454df..ccd972a03e 100644
--- a/drivers/led/issi/is31fl3731.h
+++ b/drivers/led/issi/is31fl3731.h
@@ -36,6 +36,11 @@
#endif
// ========
+#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 is31_led {
uint8_t driver : 2;
uint8_t r;
diff --git a/drivers/led/issi/is31fl3733-simple.c b/drivers/led/issi/is31fl3733-simple.c
index c52e1ff9f1..514d9e366d 100644
--- a/drivers/led/issi/is31fl3733-simple.c
+++ b/drivers/led/issi/is31fl3733-simple.c
@@ -23,18 +23,6 @@
#include "i2c_master.h"
#include "wait.h"
-// This is a 7-bit address, that gets left-shifted and bit 0
-// set to 0 for write, 1 for read (as per I2C protocol)
-// The address will vary depending on your wiring:
-// 00 <-> GND
-// 01 <-> SCL
-// 10 <-> SDA
-// 11 <-> VCC
-// ADDR1 represents A1:A0 of the 7-bit address.
-// ADDR2 represents A3:A2 of the 7-bit address.
-// The result is: 0b101(ADDR2)(ADDR1)
-#define IS31FL3733_I2C_ADDRESS_DEFAULT 0x50
-
#define IS31FL3733_COMMANDREGISTER 0xFD
#define IS31FL3733_COMMANDREGISTER_WRITELOCK 0xFE
#define IS31FL3733_INTERRUPTMASKREGISTER 0xF0
diff --git a/drivers/led/issi/is31fl3733-simple.h b/drivers/led/issi/is31fl3733-simple.h
index 7e06e2af02..b870c5c58c 100644
--- a/drivers/led/issi/is31fl3733-simple.h
+++ b/drivers/led/issi/is31fl3733-simple.h
@@ -56,6 +56,23 @@
#define PUR_32KR IS31FL3733_PUR_32KR
// ========
+#define IS31FL3733_I2C_ADDRESS_GND_GND 0x50
+#define IS31FL3733_I2C_ADDRESS_GND_SCL 0x51
+#define IS31FL3733_I2C_ADDRESS_GND_SDA 0x52
+#define IS31FL3733_I2C_ADDRESS_GND_VCC 0x53
+#define IS31FL3733_I2C_ADDRESS_SCL_GND 0x54
+#define IS31FL3733_I2C_ADDRESS_SCL_SCL 0x55
+#define IS31FL3733_I2C_ADDRESS_SCL_SDA 0x56
+#define IS31FL3733_I2C_ADDRESS_SCL_VCC 0x57
+#define IS31FL3733_I2C_ADDRESS_SDA_GND 0x58
+#define IS31FL3733_I2C_ADDRESS_SDA_SCL 0x59
+#define IS31FL3733_I2C_ADDRESS_SDA_SDA 0x5A
+#define IS31FL3733_I2C_ADDRESS_SDA_VCC 0x5B
+#define IS31FL3733_I2C_ADDRESS_VCC_GND 0x5C
+#define IS31FL3733_I2C_ADDRESS_VCC_SCL 0x5D
+#define IS31FL3733_I2C_ADDRESS_VCC_SDA 0x5E
+#define IS31FL3733_I2C_ADDRESS_VCC_VCC 0x5F
+
typedef struct is31_led {
uint8_t driver : 2;
uint8_t v;
diff --git a/drivers/led/issi/is31fl3733.c b/drivers/led/issi/is31fl3733.c
index 3ee9b14c81..e501175a11 100644
--- a/drivers/led/issi/is31fl3733.c
+++ b/drivers/led/issi/is31fl3733.c
@@ -22,18 +22,6 @@
#include "i2c_master.h"
#include "wait.h"
-// This is a 7-bit address, that gets left-shifted and bit 0
-// set to 0 for write, 1 for read (as per I2C protocol)
-// The address will vary depending on your wiring:
-// 00 <-> GND
-// 01 <-> SCL
-// 10 <-> SDA
-// 11 <-> VCC
-// ADDR1 represents A1:A0 of the 7-bit address.
-// ADDR2 represents A3:A2 of the 7-bit address.
-// The result is: 0b101(ADDR2)(ADDR1)
-#define IS31FL3733_I2C_ADDRESS_DEFAULT 0x50
-
#define IS31FL3733_COMMANDREGISTER 0xFD
#define IS31FL3733_COMMANDREGISTER_WRITELOCK 0xFE
#define IS31FL3733_INTERRUPTMASKREGISTER 0xF0
diff --git a/drivers/led/issi/is31fl3733.h b/drivers/led/issi/is31fl3733.h
index 3c17723f92..e16560807f 100644
--- a/drivers/led/issi/is31fl3733.h
+++ b/drivers/led/issi/is31fl3733.h
@@ -55,6 +55,23 @@
#define PUR_32KR IS31FL3733_PUR_32KR
// ========
+#define IS31FL3733_I2C_ADDRESS_GND_GND 0x50
+#define IS31FL3733_I2C_ADDRESS_GND_SCL 0x51
+#define IS31FL3733_I2C_ADDRESS_GND_SDA 0x52
+#define IS31FL3733_I2C_ADDRESS_GND_VCC 0x53
+#define IS31FL3733_I2C_ADDRESS_SCL_GND 0x54
+#define IS31FL3733_I2C_ADDRESS_SCL_SCL 0x55
+#define IS31FL3733_I2C_ADDRESS_SCL_SDA 0x56
+#define IS31FL3733_I2C_ADDRESS_SCL_VCC 0x57
+#define IS31FL3733_I2C_ADDRESS_SDA_GND 0x58
+#define IS31FL3733_I2C_ADDRESS_SDA_SCL 0x59
+#define IS31FL3733_I2C_ADDRESS_SDA_SDA 0x5A
+#define IS31FL3733_I2C_ADDRESS_SDA_VCC 0x5B
+#define IS31FL3733_I2C_ADDRESS_VCC_GND 0x5C
+#define IS31FL3733_I2C_ADDRESS_VCC_SCL 0x5D
+#define IS31FL3733_I2C_ADDRESS_VCC_SDA 0x5E
+#define IS31FL3733_I2C_ADDRESS_VCC_VCC 0x5F
+
typedef struct is31_led {
uint8_t driver : 2;
uint8_t r;
diff --git a/drivers/led/issi/is31fl3736.c b/drivers/led/issi/is31fl3736.c
index c8c035854f..7f50411f1f 100644
--- a/drivers/led/issi/is31fl3736.c
+++ b/drivers/led/issi/is31fl3736.c
@@ -20,18 +20,6 @@
#include "i2c_master.h"
#include "wait.h"
-// This is a 7-bit address, that gets left-shifted and bit 0
-// set to 0 for write, 1 for read (as per I2C protocol)
-// The address will vary depending on your wiring:
-// 00 <-> GND
-// 01 <-> SCL
-// 10 <-> SDA
-// 11 <-> VCC
-// ADDR1 represents A1:A0 of the 7-bit address.
-// ADDR2 represents A3:A2 of the 7-bit address.
-// The result is: 0b101(ADDR2)(ADDR1)
-#define IS31FL3736_I2C_ADDRESS_DEFAULT 0x50
-
#define IS31FL3736_COMMANDREGISTER 0xFD
#define IS31FL3736_COMMANDREGISTER_WRITELOCK 0xFE
#define IS31FL3736_INTERRUPTMASKREGISTER 0xF0
diff --git a/drivers/led/issi/is31fl3736.h b/drivers/led/issi/is31fl3736.h
index 5cc1262633..baf200f8ad 100644
--- a/drivers/led/issi/is31fl3736.h
+++ b/drivers/led/issi/is31fl3736.h
@@ -51,6 +51,23 @@
#define PUR_32KR IS31FL3736_PUR_32KR
// ========
+#define IS31FL3736_I2C_ADDRESS_GND_GND 0x50
+#define IS31FL3736_I2C_ADDRESS_GND_SCL 0x51
+#define IS31FL3736_I2C_ADDRESS_GND_SDA 0x52
+#define IS31FL3736_I2C_ADDRESS_GND_VCC 0x53
+#define IS31FL3736_I2C_ADDRESS_SCL_GND 0x54
+#define IS31FL3736_I2C_ADDRESS_SCL_SCL 0x55
+#define IS31FL3736_I2C_ADDRESS_SCL_SDA 0x56
+#define IS31FL3736_I2C_ADDRESS_SCL_VCC 0x57
+#define IS31FL3736_I2C_ADDRESS_SDA_GND 0x58
+#define IS31FL3736_I2C_ADDRESS_SDA_SCL 0x59
+#define IS31FL3736_I2C_ADDRESS_SDA_SDA 0x5A
+#define IS31FL3736_I2C_ADDRESS_SDA_VCC 0x5B
+#define IS31FL3736_I2C_ADDRESS_VCC_GND 0x5C
+#define IS31FL3736_I2C_ADDRESS_VCC_SCL 0x5D
+#define IS31FL3736_I2C_ADDRESS_VCC_SDA 0x5E
+#define IS31FL3736_I2C_ADDRESS_VCC_VCC 0x5F
+
typedef struct is31_led {
uint8_t driver : 2;
uint8_t r;
diff --git a/drivers/led/issi/is31fl3737.c b/drivers/led/issi/is31fl3737.c
index 550d26da8d..3d93548a46 100644
--- a/drivers/led/issi/is31fl3737.c
+++ b/drivers/led/issi/is31fl3737.c
@@ -22,18 +22,6 @@
#include "i2c_master.h"
#include "wait.h"
-// This is a 7-bit address, that gets left-shifted and bit 0
-// set to 0 for write, 1 for read (as per I2C protocol)
-// The address will vary depending on your wiring:
-// 00 <-> GND
-// 01 <-> SCL
-// 10 <-> SDA
-// 11 <-> VCC
-// ADDR1 represents A1:A0 of the 7-bit address.
-// ADDR2 represents A3:A2 of the 7-bit address.
-// The result is: 0b101(ADDR2)(ADDR1)
-#define IS31FL3737_I2C_ADDRESS_DEFAULT 0x50
-
#define IS31FL3737_COMMANDREGISTER 0xFD
#define IS31FL3737_COMMANDREGISTER_WRITELOCK 0xFE
#define IS31FL3737_INTERRUPTMASKREGISTER 0xF0
diff --git a/drivers/led/issi/is31fl3737.h b/drivers/led/issi/is31fl3737.h
index e382602e9a..2d6612b704 100644
--- a/drivers/led/issi/is31fl3737.h
+++ b/drivers/led/issi/is31fl3737.h
@@ -19,6 +19,10 @@
#pragma once
+#include <stdint.h>
+#include <stdbool.h>
+#include "progmem.h"
+
// ======== DEPRECATED DEFINES - DO NOT USE ========
#ifdef DRIVER_COUNT
# define IS31FL3737_DRIVER_COUNT DRIVER_COUNT
@@ -52,9 +56,10 @@
#define PUR_32KR IS31FL3737_PUR_32KR
// ========
-#include <stdint.h>
-#include <stdbool.h>
-#include "progmem.h"
+#define IS31FL3737_I2C_ADDRESS_GND 0x50
+#define IS31FL3737_I2C_ADDRESS_SCL 0x55
+#define IS31FL3737_I2C_ADDRESS_SDA 0x5A
+#define IS31FL3737_I2C_ADDRESS_VCC 0x5F
typedef struct is31_led {
uint8_t driver : 2;
diff --git a/drivers/led/issi/is31fl3741.c b/drivers/led/issi/is31fl3741.c
index 2db1f021b1..f34e0b87a1 100644
--- a/drivers/led/issi/is31fl3741.c
+++ b/drivers/led/issi/is31fl3741.c
@@ -22,18 +22,6 @@
#include "i2c_master.h"
#include "wait.h"
-// This is a 7-bit address, that gets left-shifted and bit 0
-// set to 0 for write, 1 for read (as per I2C protocol)
-// The address will vary depending on your wiring:
-// 00 <-> GND
-// 01 <-> SCL
-// 10 <-> SDA
-// 11 <-> VCC
-// ADDR1 represents A1:A0 of the 7-bit address.
-// ADDR2 represents A3:A2 of the 7-bit address.
-// The result is: 0b101(ADDR2)(ADDR1)
-#define IS31FL3741_I2C_ADDRESS_DEFAULT 0x60
-
#define IS31FL3741_COMMANDREGISTER 0xFD
#define IS31FL3741_COMMANDREGISTER_WRITELOCK 0xFE
#define IS31FL3741_INTERRUPTMASKREGISTER 0xF0
diff --git a/drivers/led/issi/is31fl3741.h b/drivers/led/issi/is31fl3741.h
index b7317bdab6..65f8af98c8 100644
--- a/drivers/led/issi/is31fl3741.h
+++ b/drivers/led/issi/is31fl3741.h
@@ -56,6 +56,11 @@
#define PUR_32KR IS31FL3741_PUR_32KR
// ========
+#define IS31FL3741_I2C_ADDRESS_GND 0x30
+#define IS31FL3741_I2C_ADDRESS_SCL 0x31
+#define IS31FL3741_I2C_ADDRESS_SDA 0x32
+#define IS31FL3741_I2C_ADDRESS_VCC 0x33
+
typedef struct is31_led {
uint32_t driver : 2;
uint32_t r : 10;