Skip to content

Commit 8f22105

Browse files
authored
Add and use I2C address defines for ISSI LED drivers (qmk#22008)
1 parent 74360d0 commit 8f22105

File tree

166 files changed

+385
-496
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

166 files changed

+385
-496
lines changed

docs/feature_led_matrix.md

+17-15
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,14 @@ Here is an example using 2 drivers.
3434
// This is a 7-bit address, that gets left-shifted and bit 0
3535
// set to 0 for write, 1 for read (as per I2C protocol)
3636
// The address will vary depending on your wiring:
37-
// 0b1110100 AD <-> GND
38-
// 0b1110111 AD <-> VCC
39-
// 0b1110101 AD <-> SCL
40-
// 0b1110110 AD <-> SDA
41-
#define LED_DRIVER_ADDR_1 0b1110100
42-
#define LED_DRIVER_ADDR_2 0b1110110
37+
// 00 AD <-> GND
38+
// 01 AD <-> SCL
39+
// 10 AD <-> SDA
40+
// 11 AD <-> VCC
41+
// ADDR represents A1:A0 of the 7-bit address.
42+
// The result is: 0b11101(ADDR)
43+
#define LED_DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
44+
#define LED_DRIVER_ADDR_2 IS31FL3731_I2C_ADDRESS_SDA
4345

4446
#define IS31FL3731_DRIVER_COUNT 2
4547
#define LED_DRIVER_1_LED_TOTAL 25
@@ -159,7 +161,7 @@ Then Define the array listing all the LEDs you want to override in your `<keyboa
159161

160162
```c
161163
const is31_led PROGMEM g_is31_scaling[ISSI_MANUAL_SCALING] = {
162-
* LED Index
164+
/* LED Index
163165
* | Scaling
164166
* | | */
165167
{5, 120},
@@ -248,16 +250,16 @@ enum led_matrix_effects {
248250
LED_MATRIX_CYCLE_OUT_IN, // Full gradient scrolling out to in
249251
LED_MATRIX_DUAL_BEACON, // Full gradient spinning around center of keyboard
250252
LED_MATRIX_SOLID_REACTIVE_SIMPLE, // Pulses keys hit then fades out
251-
LED_MATRIX_SOLID_REACTIVE_WIDE // Value pulses near a single key hit then fades out
252-
LED_MATRIX_SOLID_REACTIVE_MULTIWIDE // Value pulses near multiple key hits then fades out
253-
LED_MATRIX_SOLID_REACTIVE_CROSS // Value pulses the same column and row of a single key hit then fades out
254-
LED_MATRIX_SOLID_REACTIVE_MULTICROSS // Value pulses the same column and row of multiple key hits then fades out
255-
LED_MATRIX_SOLID_REACTIVE_NEXUS // Value pulses away on the same column and row of a single key hit then fades out
256-
LED_MATRIX_SOLID_REACTIVE_MULTINEXUS // Value pulses away on the same column and row of multiple key hits then fades out
253+
LED_MATRIX_SOLID_REACTIVE_WIDE, // Value pulses near a single key hit then fades out
254+
LED_MATRIX_SOLID_REACTIVE_MULTIWIDE, // Value pulses near multiple key hits then fades out
255+
LED_MATRIX_SOLID_REACTIVE_CROSS, // Value pulses the same column and row of a single key hit then fades out
256+
LED_MATRIX_SOLID_REACTIVE_MULTICROSS, // Value pulses the same column and row of multiple key hits then fades out
257+
LED_MATRIX_SOLID_REACTIVE_NEXUS, // Value pulses away on the same column and row of a single key hit then fades out
258+
LED_MATRIX_SOLID_REACTIVE_MULTINEXUS, // Value pulses away on the same column and row of multiple key hits then fades out
257259
LED_MATRIX_SOLID_SPLASH, // Value pulses away from a single key hit then fades out
258260
LED_MATRIX_SOLID_MULTISPLASH, // Value pulses away from multiple key hits then fades out
259-
LED_MATRIX_WAVE_LEFT_RIGHT // Sine wave scrolling from left to right
260-
LED_MATRIX_WAVE_UP_DOWN // Sine wave scrolling from up to down
261+
LED_MATRIX_WAVE_LEFT_RIGHT, // Sine wave scrolling from left to right
262+
LED_MATRIX_WAVE_UP_DOWN, // Sine wave scrolling from up to down
261263
LED_MATRIX_EFFECT_MAX
262264
};
263265
```

docs/feature_rgb_matrix.md

+36-33
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,14 @@ Here is an example using 2 drivers.
3535
// This is a 7-bit address, that gets left-shifted and bit 0
3636
// set to 0 for write, 1 for read (as per I2C protocol)
3737
// The address will vary depending on your wiring:
38-
// 0b1110100 AD <-> GND
39-
// 0b1110111 AD <-> VCC
40-
// 0b1110101 AD <-> SCL
41-
// 0b1110110 AD <-> SDA
42-
#define DRIVER_ADDR_1 0b1110100
43-
#define DRIVER_ADDR_2 0b1110110
38+
// 00 AD <-> GND
39+
// 01 AD <-> SCL
40+
// 10 AD <-> SDA
41+
// 11 AD <-> VCC
42+
// ADDR represents A1:A0 of the 7-bit address.
43+
// The result is: 0b11101(ADDR)
44+
#define DRIVER_ADDR_1 IS31FL3731_I2C_ADDRESS_GND
45+
#define DRIVER_ADDR_2 IS31FL3731_I2C_ADDRESS_SDA
4446

4547
#define IS31FL3731_DRIVER_COUNT 2
4648
#define DRIVER_1_LED_TOTAL 25
@@ -118,15 +120,15 @@ Here is an example using 2 drivers.
118120
// This is a 7-bit address, that gets left-shifted and bit 0
119121
// set to 0 for write, 1 for read (as per I2C protocol)
120122
// The address will vary depending on your wiring:
121-
// 00 <-> GND
122-
// 01 <-> SCL
123-
// 10 <-> SDA
124-
// 11 <-> VCC
123+
// 00 ADDRn <-> GND
124+
// 01 ADDRn <-> SCL
125+
// 10 ADDRn <-> SDA
126+
// 11 ADDRn <-> VCC
125127
// ADDR1 represents A1:A0 of the 7-bit address.
126128
// ADDR2 represents A3:A2 of the 7-bit address.
127129
// The result is: 0b101(ADDR2)(ADDR1)
128-
#define DRIVER_ADDR_1 0b1010000
129-
#define DRIVER_ADDR_2 0b1010011
130+
#define DRIVER_ADDR_1 IS31FL3733_I2C_ADDRESS_GND_GND
131+
#define DRIVER_ADDR_2 IS31FL3733_I2C_ADDRESS_GND_VCC
130132

131133
#define IS31FL3733_DRIVER_COUNT 2
132134
#define DRIVER_1_LED_TOTAL 58
@@ -202,14 +204,15 @@ Here is an example using 2 drivers.
202204
// This is a 7-bit address, that gets left-shifted and bit 0
203205
// set to 0 for write, 1 for read (as per I2C protocol)
204206
// The address will vary depending on your wiring:
205-
// 0000 <-> GND
206-
// 0101 <-> SCL
207-
// 1010 <-> SDA
208-
// 1111 <-> VCC
209-
// ADDR represents A3:A0 of the 7-bit address.
210-
// The result is: 0b101(ADDR)
211-
#define DRIVER_ADDR_1 0b1010000
212-
#define DRIVER_ADDR_2 0b1010001
207+
// 00 ADDRn <-> GND
208+
// 01 ADDRn <-> SCL
209+
// 10 ADDRn <-> SDA
210+
// 11 ADDRn <-> VCC
211+
// ADDR1 represents A1:A0 of the 7-bit address.
212+
// ADDR2 represents A3:A2 of the 7-bit address.
213+
// The result is: 0b101(ADDR2)(ADDR1)
214+
#define DRIVER_ADDR_1 IS31FL3736_I2C_ADDRESS_GND_GND
215+
#define DRIVER_ADDR_2 IS31FL3736_I2C_ADDRESS_GND_SCL
213216

214217
#define IS31FL3736_DRIVER_COUNT 2
215218
#define DRIVER_1_LED_TOTAL 30
@@ -278,14 +281,14 @@ Here is an example using 2 drivers.
278281
// This is a 7-bit address, that gets left-shifted and bit 0
279282
// set to 0 for write, 1 for read (as per I2C protocol)
280283
// The address will vary depending on your wiring:
281-
// 0000 <-> GND
282-
// 0101 <-> SCL
283-
// 1010 <-> SDA
284-
// 1111 <-> VCC
284+
// 0000 ADDR <-> GND
285+
// 0101 ADDR <-> SCL
286+
// 1010 ADDR <-> SDA
287+
// 1111 ADDR <-> VCC
285288
// ADDR represents A3:A0 of the 7-bit address.
286289
// The result is: 0b101(ADDR)
287-
#define DRIVER_ADDR_1 0b1010000
288-
#define DRIVER_ADDR_2 0b1010001
290+
#define DRIVER_ADDR_1 IS31FL3737_I2C_ADDRESS_GND
291+
#define DRIVER_ADDR_2 IS31FL3737_I2C_ADDRESS_SCL
289292

290293
#define IS31FL3737_DRIVER_COUNT 2
291294
#define DRIVER_1_LED_TOTAL 30
@@ -407,7 +410,7 @@ Then Define the array listing all the LEDs you want to override in your `<keyboa
407410

408411
```c
409412
const is31_led PROGMEM g_is31_scaling[ISSI_MANUAL_SCALING] = {
410-
* LED Index
413+
/* LED Index
411414
* | R scaling
412415
* | | G scaling
413416
* | | | B scaling
@@ -654,12 +657,12 @@ enum rgb_matrix_effects {
654657
RGB_MATRIX_DIGITAL_RAIN, // That famous computer simulation
655658
RGB_MATRIX_SOLID_REACTIVE_SIMPLE, // Pulses keys hit to hue & value then fades value out
656659
RGB_MATRIX_SOLID_REACTIVE, // Static single hue, pulses keys hit to shifted hue then fades to current hue
657-
RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out
658-
RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out
659-
RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out
660-
RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out
661-
RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out
662-
RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out
660+
RGB_MATRIX_SOLID_REACTIVE_WIDE, // Hue & value pulse near a single key hit then fades value out
661+
RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE, // Hue & value pulse near multiple key hits then fades value out
662+
RGB_MATRIX_SOLID_REACTIVE_CROSS, // Hue & value pulse the same column and row of a single key hit then fades value out
663+
RGB_MATRIX_SOLID_REACTIVE_MULTICROSS, // Hue & value pulse the same column and row of multiple key hits then fades value out
664+
RGB_MATRIX_SOLID_REACTIVE_NEXUS, // Hue & value pulse away on the same column and row of a single key hit then fades value out
665+
RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS, // Hue & value pulse away on the same column and row of multiple key hits then fades value out
663666
RGB_MATRIX_SPLASH, // Full gradient & value pulse away from a single key hit then fades value out
664667
RGB_MATRIX_MULTISPLASH, // Full gradient & value pulse away from multiple key hits then fades value out
665668
RGB_MATRIX_SOLID_SPLASH, // Hue & value pulse away from a single key hit then fades value out

drivers/led/ckled2001-simple.h

+5
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@
4848
#define MSKPHASE_1CHANNEL CKLED2001_MSKPHASE_1CHANNEL
4949
// ========
5050

51+
#define CKLED2001_I2C_ADDRESS_GND 0x74
52+
#define CKLED2001_I2C_ADDRESS_SCL 0x75
53+
#define CKLED2001_I2C_ADDRESS_SDA 0x76
54+
#define CKLED2001_I2C_ADDRESS_VDDIO 0x77
55+
5156
typedef struct ckled2001_led {
5257
uint8_t driver : 2;
5358
uint8_t v;

drivers/led/ckled2001.h

+5
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@
4848
#define MSKPHASE_1CHANNEL CKLED2001_MSKPHASE_1CHANNEL
4949
// ========
5050

51+
#define CKLED2001_I2C_ADDRESS_GND 0x74
52+
#define CKLED2001_I2C_ADDRESS_SCL 0x75
53+
#define CKLED2001_I2C_ADDRESS_SDA 0x76
54+
#define CKLED2001_I2C_ADDRESS_VDDIO 0x77
55+
5156
typedef struct ckled2001_led {
5257
uint8_t driver : 2;
5358
uint8_t r;

drivers/led/issi/is31fl3731-simple.c

-9
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,6 @@
2222
#include "i2c_master.h"
2323
#include "wait.h"
2424

25-
// This is a 7-bit address, that gets left-shifted and bit 0
26-
// set to 0 for write, 1 for read (as per I2C protocol)
27-
// The address will vary depending on your wiring:
28-
// 0b1110100 AD <-> GND
29-
// 0b1110111 AD <-> VCC
30-
// 0b1110101 AD <-> SCL
31-
// 0b1110110 AD <-> SDA
32-
#define IS31FL3731_I2C_ADDRESS_DEFAULT 0x74
33-
3425
#define IS31FL3731_REG_CONFIG 0x00
3526
#define IS31FL3731_REG_CONFIG_PICTUREMODE 0x00
3627
#define IS31FL3731_REG_CONFIG_AUTOPLAYMODE 0x08

drivers/led/issi/is31fl3731-simple.h

+5
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@
3737
#endif
3838
// ========
3939

40+
#define IS31FL3731_I2C_ADDRESS_GND 0x74
41+
#define IS31FL3731_I2C_ADDRESS_SCL 0x75
42+
#define IS31FL3731_I2C_ADDRESS_SDA 0x76
43+
#define IS31FL3731_I2C_ADDRESS_VCC 0x77
44+
4045
typedef struct is31_led {
4146
uint8_t driver : 2;
4247
uint8_t v;

drivers/led/issi/is31fl3731.c

-9
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,6 @@
2121
#include "i2c_master.h"
2222
#include "wait.h"
2323

24-
// This is a 7-bit address, that gets left-shifted and bit 0
25-
// set to 0 for write, 1 for read (as per I2C protocol)
26-
// The address will vary depending on your wiring:
27-
// 0b1110100 AD <-> GND
28-
// 0b1110111 AD <-> VCC
29-
// 0b1110101 AD <-> SCL
30-
// 0b1110110 AD <-> SDA
31-
#define IS31FL3731_I2C_ADDRESS_DEFAULT 0x74
32-
3324
#define IS31FL3731_REG_CONFIG 0x00
3425
#define IS31FL3731_REG_CONFIG_PICTUREMODE 0x00
3526
#define IS31FL3731_REG_CONFIG_AUTOPLAYMODE 0x08

drivers/led/issi/is31fl3731.h

+5
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@
3636
#endif
3737
// ========
3838

39+
#define IS31FL3731_I2C_ADDRESS_GND 0x74
40+
#define IS31FL3731_I2C_ADDRESS_SCL 0x75
41+
#define IS31FL3731_I2C_ADDRESS_SDA 0x76
42+
#define IS31FL3731_I2C_ADDRESS_VCC 0x77
43+
3944
typedef struct is31_led {
4045
uint8_t driver : 2;
4146
uint8_t r;

drivers/led/issi/is31fl3733-simple.c

-12
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,6 @@
2323
#include "i2c_master.h"
2424
#include "wait.h"
2525

26-
// This is a 7-bit address, that gets left-shifted and bit 0
27-
// set to 0 for write, 1 for read (as per I2C protocol)
28-
// The address will vary depending on your wiring:
29-
// 00 <-> GND
30-
// 01 <-> SCL
31-
// 10 <-> SDA
32-
// 11 <-> VCC
33-
// ADDR1 represents A1:A0 of the 7-bit address.
34-
// ADDR2 represents A3:A2 of the 7-bit address.
35-
// The result is: 0b101(ADDR2)(ADDR1)
36-
#define IS31FL3733_I2C_ADDRESS_DEFAULT 0x50
37-
3826
#define IS31FL3733_COMMANDREGISTER 0xFD
3927
#define IS31FL3733_COMMANDREGISTER_WRITELOCK 0xFE
4028
#define IS31FL3733_INTERRUPTMASKREGISTER 0xF0

drivers/led/issi/is31fl3733-simple.h

+17
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,23 @@
5656
#define PUR_32KR IS31FL3733_PUR_32KR
5757
// ========
5858

59+
#define IS31FL3733_I2C_ADDRESS_GND_GND 0x50
60+
#define IS31FL3733_I2C_ADDRESS_GND_SCL 0x51
61+
#define IS31FL3733_I2C_ADDRESS_GND_SDA 0x52
62+
#define IS31FL3733_I2C_ADDRESS_GND_VCC 0x53
63+
#define IS31FL3733_I2C_ADDRESS_SCL_GND 0x54
64+
#define IS31FL3733_I2C_ADDRESS_SCL_SCL 0x55
65+
#define IS31FL3733_I2C_ADDRESS_SCL_SDA 0x56
66+
#define IS31FL3733_I2C_ADDRESS_SCL_VCC 0x57
67+
#define IS31FL3733_I2C_ADDRESS_SDA_GND 0x58
68+
#define IS31FL3733_I2C_ADDRESS_SDA_SCL 0x59
69+
#define IS31FL3733_I2C_ADDRESS_SDA_SDA 0x5A
70+
#define IS31FL3733_I2C_ADDRESS_SDA_VCC 0x5B
71+
#define IS31FL3733_I2C_ADDRESS_VCC_GND 0x5C
72+
#define IS31FL3733_I2C_ADDRESS_VCC_SCL 0x5D
73+
#define IS31FL3733_I2C_ADDRESS_VCC_SDA 0x5E
74+
#define IS31FL3733_I2C_ADDRESS_VCC_VCC 0x5F
75+
5976
typedef struct is31_led {
6077
uint8_t driver : 2;
6178
uint8_t v;

drivers/led/issi/is31fl3733.c

-12
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,6 @@
2222
#include "i2c_master.h"
2323
#include "wait.h"
2424

25-
// This is a 7-bit address, that gets left-shifted and bit 0
26-
// set to 0 for write, 1 for read (as per I2C protocol)
27-
// The address will vary depending on your wiring:
28-
// 00 <-> GND
29-
// 01 <-> SCL
30-
// 10 <-> SDA
31-
// 11 <-> VCC
32-
// ADDR1 represents A1:A0 of the 7-bit address.
33-
// ADDR2 represents A3:A2 of the 7-bit address.
34-
// The result is: 0b101(ADDR2)(ADDR1)
35-
#define IS31FL3733_I2C_ADDRESS_DEFAULT 0x50
36-
3725
#define IS31FL3733_COMMANDREGISTER 0xFD
3826
#define IS31FL3733_COMMANDREGISTER_WRITELOCK 0xFE
3927
#define IS31FL3733_INTERRUPTMASKREGISTER 0xF0

drivers/led/issi/is31fl3733.h

+17
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,23 @@
5555
#define PUR_32KR IS31FL3733_PUR_32KR
5656
// ========
5757

58+
#define IS31FL3733_I2C_ADDRESS_GND_GND 0x50
59+
#define IS31FL3733_I2C_ADDRESS_GND_SCL 0x51
60+
#define IS31FL3733_I2C_ADDRESS_GND_SDA 0x52
61+
#define IS31FL3733_I2C_ADDRESS_GND_VCC 0x53
62+
#define IS31FL3733_I2C_ADDRESS_SCL_GND 0x54
63+
#define IS31FL3733_I2C_ADDRESS_SCL_SCL 0x55
64+
#define IS31FL3733_I2C_ADDRESS_SCL_SDA 0x56
65+
#define IS31FL3733_I2C_ADDRESS_SCL_VCC 0x57
66+
#define IS31FL3733_I2C_ADDRESS_SDA_GND 0x58
67+
#define IS31FL3733_I2C_ADDRESS_SDA_SCL 0x59
68+
#define IS31FL3733_I2C_ADDRESS_SDA_SDA 0x5A
69+
#define IS31FL3733_I2C_ADDRESS_SDA_VCC 0x5B
70+
#define IS31FL3733_I2C_ADDRESS_VCC_GND 0x5C
71+
#define IS31FL3733_I2C_ADDRESS_VCC_SCL 0x5D
72+
#define IS31FL3733_I2C_ADDRESS_VCC_SDA 0x5E
73+
#define IS31FL3733_I2C_ADDRESS_VCC_VCC 0x5F
74+
5875
typedef struct is31_led {
5976
uint8_t driver : 2;
6077
uint8_t r;

drivers/led/issi/is31fl3736.c

-12
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,6 @@
2020
#include "i2c_master.h"
2121
#include "wait.h"
2222

23-
// This is a 7-bit address, that gets left-shifted and bit 0
24-
// set to 0 for write, 1 for read (as per I2C protocol)
25-
// The address will vary depending on your wiring:
26-
// 00 <-> GND
27-
// 01 <-> SCL
28-
// 10 <-> SDA
29-
// 11 <-> VCC
30-
// ADDR1 represents A1:A0 of the 7-bit address.
31-
// ADDR2 represents A3:A2 of the 7-bit address.
32-
// The result is: 0b101(ADDR2)(ADDR1)
33-
#define IS31FL3736_I2C_ADDRESS_DEFAULT 0x50
34-
3523
#define IS31FL3736_COMMANDREGISTER 0xFD
3624
#define IS31FL3736_COMMANDREGISTER_WRITELOCK 0xFE
3725
#define IS31FL3736_INTERRUPTMASKREGISTER 0xF0

drivers/led/issi/is31fl3736.h

+17
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,23 @@
5151
#define PUR_32KR IS31FL3736_PUR_32KR
5252
// ========
5353

54+
#define IS31FL3736_I2C_ADDRESS_GND_GND 0x50
55+
#define IS31FL3736_I2C_ADDRESS_GND_SCL 0x51
56+
#define IS31FL3736_I2C_ADDRESS_GND_SDA 0x52
57+
#define IS31FL3736_I2C_ADDRESS_GND_VCC 0x53
58+
#define IS31FL3736_I2C_ADDRESS_SCL_GND 0x54
59+
#define IS31FL3736_I2C_ADDRESS_SCL_SCL 0x55
60+
#define IS31FL3736_I2C_ADDRESS_SCL_SDA 0x56
61+
#define IS31FL3736_I2C_ADDRESS_SCL_VCC 0x57
62+
#define IS31FL3736_I2C_ADDRESS_SDA_GND 0x58
63+
#define IS31FL3736_I2C_ADDRESS_SDA_SCL 0x59
64+
#define IS31FL3736_I2C_ADDRESS_SDA_SDA 0x5A
65+
#define IS31FL3736_I2C_ADDRESS_SDA_VCC 0x5B
66+
#define IS31FL3736_I2C_ADDRESS_VCC_GND 0x5C
67+
#define IS31FL3736_I2C_ADDRESS_VCC_SCL 0x5D
68+
#define IS31FL3736_I2C_ADDRESS_VCC_SDA 0x5E
69+
#define IS31FL3736_I2C_ADDRESS_VCC_VCC 0x5F
70+
5471
typedef struct is31_led {
5572
uint8_t driver : 2;
5673
uint8_t r;

drivers/led/issi/is31fl3737.c

-12
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,6 @@
2222
#include "i2c_master.h"
2323
#include "wait.h"
2424

25-
// This is a 7-bit address, that gets left-shifted and bit 0
26-
// set to 0 for write, 1 for read (as per I2C protocol)
27-
// The address will vary depending on your wiring:
28-
// 00 <-> GND
29-
// 01 <-> SCL
30-
// 10 <-> SDA
31-
// 11 <-> VCC
32-
// ADDR1 represents A1:A0 of the 7-bit address.
33-
// ADDR2 represents A3:A2 of the 7-bit address.
34-
// The result is: 0b101(ADDR2)(ADDR1)
35-
#define IS31FL3737_I2C_ADDRESS_DEFAULT 0x50
36-
3725
#define IS31FL3737_COMMANDREGISTER 0xFD
3826
#define IS31FL3737_COMMANDREGISTER_WRITELOCK 0xFE
3927
#define IS31FL3737_INTERRUPTMASKREGISTER 0xF0

0 commit comments

Comments
 (0)