1
0
Fork 0

Clean up LED/RGB Matrix driver config (#14760)

This commit is contained in:
Ryan 2021-10-11 10:57:49 +11:00 committed by GitHub
parent a7810db7ba
commit b487e10753
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
51 changed files with 198 additions and 265 deletions

View file

@ -46,8 +46,6 @@
# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL # define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
# define DRIVER_ADDR_1 0b1010000 # define DRIVER_ADDR_1 0b1010000
# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. # define DRIVER_COUNT 1
# define DRIVER_COUNT 2 # define DRIVER_LED_TOTAL 63
# define DRIVER_1_LED_TOTAL 63
# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#endif #endif

View file

@ -56,8 +56,6 @@
# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
# define DISABLE_RGB_MATRIX_DIGITAL_RAIN # define DISABLE_RGB_MATRIX_DIGITAL_RAIN
# define DRIVER_ADDR_1 0b1010000 # define DRIVER_ADDR_1 0b1010000
# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. # define DRIVER_COUNT 1
# define DRIVER_COUNT 2 # define DRIVER_LED_TOTAL 63
# define DRIVER_1_LED_TOTAL 63
# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#endif #endif

View file

@ -72,8 +72,6 @@
# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
# define DISABLE_RGB_MATRIX_DIGITAL_RAIN # define DISABLE_RGB_MATRIX_DIGITAL_RAIN
# define DRIVER_ADDR_1 0b1010000 # define DRIVER_ADDR_1 0b1010000
# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. # define DRIVER_COUNT 1
# define DRIVER_COUNT 2 # define DRIVER_LED_TOTAL 63
# define DRIVER_1_LED_TOTAL 63
# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#endif #endif

View file

@ -46,8 +46,6 @@
# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL # define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
# define DRIVER_ADDR_1 0b1010000 # define DRIVER_ADDR_1 0b1010000
# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. # define DRIVER_COUNT 1
# define DRIVER_COUNT 2 # define DRIVER_LED_TOTAL 61
# define DRIVER_1_LED_TOTAL 61
# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#endif #endif

View file

@ -56,8 +56,6 @@
# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
# define DISABLE_RGB_MATRIX_DIGITAL_RAIN # define DISABLE_RGB_MATRIX_DIGITAL_RAIN
# define DRIVER_ADDR_1 0b1010000 # define DRIVER_ADDR_1 0b1010000
# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. # define DRIVER_COUNT 1
# define DRIVER_COUNT 2 # define DRIVER_LED_TOTAL 61
# define DRIVER_1_LED_TOTAL 61
# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#endif #endif

View file

@ -46,8 +46,6 @@
# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL # define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
# define DRIVER_ADDR_1 0b1010000 # define DRIVER_ADDR_1 0b1010000
# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. # define DRIVER_COUNT 1
# define DRIVER_COUNT 2 # define DRIVER_LED_TOTAL 62
# define DRIVER_1_LED_TOTAL 62
# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#endif #endif

View file

@ -56,8 +56,6 @@
# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
# define DISABLE_RGB_MATRIX_DIGITAL_RAIN # define DISABLE_RGB_MATRIX_DIGITAL_RAIN
# define DRIVER_ADDR_1 0b1010000 # define DRIVER_ADDR_1 0b1010000
# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. # define DRIVER_COUNT 1
# define DRIVER_COUNT 2 # define DRIVER_LED_TOTAL 62
# define DRIVER_1_LED_TOTAL 62
# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#endif #endif

View file

@ -72,8 +72,6 @@
# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
# define DISABLE_RGB_MATRIX_DIGITAL_RAIN # define DISABLE_RGB_MATRIX_DIGITAL_RAIN
# define DRIVER_ADDR_1 0b1010000 # define DRIVER_ADDR_1 0b1010000
# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. # define DRIVER_COUNT 1
# define DRIVER_COUNT 2 # define DRIVER_LED_TOTAL 62
# define DRIVER_1_LED_TOTAL 62
# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#endif #endif

View file

@ -49,9 +49,7 @@
# define RGB_MATRIX_LED_FLUSH_LIMIT 26 # define RGB_MATRIX_LED_FLUSH_LIMIT 26
# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL # define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
# define DRIVER_ADDR_1 0b0110000 # define DRIVER_ADDR_1 0b0110000
# define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons.
# define DRIVER_COUNT 1 # define DRIVER_COUNT 1
# define DRIVER_1_LED_TOTAL 68 # define DRIVER_LED_TOTAL 68
# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
# define DRIVER_INDICATOR_LED_TOTAL 0 # define DRIVER_INDICATOR_LED_TOTAL 0
#endif #endif

View file

@ -157,8 +157,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// ADDR2 represents A3:A2 of the 7-bit address. // ADDR2 represents A3:A2 of the 7-bit address.
// The result is: 0b101(ADDR2)(ADDR1) // The result is: 0b101(ADDR2)(ADDR1)
#define DRIVER_ADDR_1 0b1010000 #define DRIVER_ADDR_1 0b1010000
#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons.
#define DRIVER_COUNT 2 #define DRIVER_COUNT 1
#define DRIVER_1_LED_TOTAL 64 #define DRIVER_LED_TOTAL 64
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL

View file

@ -31,8 +31,6 @@
#define RGBLIGHT_VAL_STEP 8 #define RGBLIGHT_VAL_STEP 8
#define DRIVER_ADDR_1 0b1010000 #define DRIVER_ADDR_1 0b1010000
#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons.
#define DRIVER_COUNT 2 #define DRIVER_COUNT 1
#define DRIVER_1_LED_TOTAL 63 #define DRIVER_LED_TOTAL 63
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL

View file

@ -48,10 +48,8 @@
//#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR //#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
#define DRIVER_ADDR_1 0b0110000 #define DRIVER_ADDR_1 0b0110000
#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons.
#define DRIVER_COUNT 1 #define DRIVER_COUNT 1
#define DRIVER_1_LED_TOTAL 108 #define DRIVER_LED_TOTAL 108
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#define DRIVER_INDICATOR_LED_TOTAL 0 #define DRIVER_INDICATOR_LED_TOTAL 0
#endif #endif
#define DYNAMIC_KEYMAP_LAYER_COUNT 2 #define DYNAMIC_KEYMAP_LAYER_COUNT 2

View file

@ -48,10 +48,8 @@
//#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR //#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
#define DRIVER_ADDR_1 0b0110000 #define DRIVER_ADDR_1 0b0110000
#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons.
#define DRIVER_COUNT 1 #define DRIVER_COUNT 1
#define DRIVER_1_LED_TOTAL 109 #define DRIVER_LED_TOTAL 109
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#define DRIVER_INDICATOR_LED_TOTAL 0 #define DRIVER_INDICATOR_LED_TOTAL 0
#endif #endif
#define DYNAMIC_KEYMAP_LAYER_COUNT 2 #define DYNAMIC_KEYMAP_LAYER_COUNT 2

View file

@ -54,8 +54,7 @@
# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL # define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
# define DRIVER_ADDR_1 0b0110000 # define DRIVER_ADDR_1 0b0110000
# define DRIVER_COUNT 1 # define DRIVER_COUNT 1
# define DRIVER_1_LED_TOTAL 83 # define DRIVER_LED_TOTAL 83
# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
# define DRIVER_INDICATOR_LED_TOTAL 0 # define DRIVER_INDICATOR_LED_TOTAL 0
#endif #endif

View file

@ -67,9 +67,7 @@
#define RGB_MATRIX_LED_FLUSH_LIMIT 26 #define RGB_MATRIX_LED_FLUSH_LIMIT 26
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
#define DRIVER_ADDR_1 0b0110000 #define DRIVER_ADDR_1 0b0110000
#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons.
#define DRIVER_COUNT 1 #define DRIVER_COUNT 1
#define DRIVER_1_LED_TOTAL 67 #define DRIVER_LED_TOTAL 67
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#define DRIVER_INDICATOR_LED_TOTAL 0 #define DRIVER_INDICATOR_LED_TOTAL 0
#endif #endif

View file

@ -54,10 +54,8 @@
#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
#define DISABLE_RGB_MATRIX_DIGITAL_RAIN #define DISABLE_RGB_MATRIX_DIGITAL_RAIN
#define DRIVER_ADDR_1 0b1010000 #define DRIVER_ADDR_1 0b1010000
#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. #define DRIVER_COUNT 1
#define DRIVER_COUNT 2 #define DRIVER_LED_TOTAL 52
#define DRIVER_1_LED_TOTAL 52
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#endif #endif
/* disable these deprecated features by default */ /* disable these deprecated features by default */

View file

@ -72,8 +72,6 @@
# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
# define DISABLE_RGB_MATRIX_DIGITAL_RAIN # define DISABLE_RGB_MATRIX_DIGITAL_RAIN
# define DRIVER_ADDR_1 0b1010000 # define DRIVER_ADDR_1 0b1010000
# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. # define DRIVER_COUNT 1
# define DRIVER_COUNT 2 # define DRIVER_LED_TOTAL 60
# define DRIVER_1_LED_TOTAL 60
# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#endif #endif

View file

@ -84,14 +84,9 @@
// 0b1110101 AD <-> SCL // 0b1110101 AD <-> SCL
// 0b1110110 AD <-> SDA // 0b1110110 AD <-> SDA
#define DRIVER_ADDR_1 0b1110100 #define DRIVER_ADDR_1 0b1110100
//#define DRIVER_ADDR_2 0b1110110
#define DRIVER_COUNT 1 #define DRIVER_COUNT 1
#define DRIVER_1_LED_TOTAL 6 #define DRIVER_LED_TOTAL 6
//#define DRIVER_1_LED_TOTAL 25
//#define DRIVER_2_LED_TOTAL 24
//#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#endif #endif
//#define RGB_DI_PIN B7 //#define RGB_DI_PIN B7
//#ifdef RGB_DI_PIN //#ifdef RGB_DI_PIN

View file

@ -50,10 +50,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// 0b1110101 AD <-> SCL // 0b1110101 AD <-> SCL
// 0b1110110 AD <-> SDA // 0b1110110 AD <-> SDA
#define DRIVER_ADDR_1 0b0110010 #define DRIVER_ADDR_1 0b0110010
#define DRIVER_ADDR_2 0b0110010
#define DRIVER_COUNT 1 #define DRIVER_COUNT 1
#define DRIVER_1_LED_TOTAL 66 #define DRIVER_LED_TOTAL 66
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#define RGB_MATRIX_KEYPRESSES // reacts to keypresses #define RGB_MATRIX_KEYPRESSES // reacts to keypresses
#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGB_MATRIX_FRAMEBUFFER_EFFECTS

View file

@ -33,10 +33,7 @@
// 0b1110101 AD <-> SCL // 0b1110101 AD <-> SCL
// 0b1110110 AD <-> SDA // 0b1110110 AD <-> SDA
#define DRIVER_ADDR_1 0b1110110 #define DRIVER_ADDR_1 0b1110110
#define DRIVER_ADDR_2 0b1110100
#define DRIVER_COUNT 1 #define DRIVER_COUNT 1
#define DRIVER_1_LED_TOTAL 25
#define DRIVER_2_LED_TOTAL 0
#define DRIVER_LED_TOTAL 25 #define DRIVER_LED_TOTAL 25
#define RGB_MATRIX_KEYPRESSES // reacts to keypresses #define RGB_MATRIX_KEYPRESSES // reacts to keypresses
#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)

View file

@ -44,8 +44,6 @@
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
//#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_REACTIVE_SIMPLE //#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_REACTIVE_SIMPLE
#define DRIVER_ADDR_1 0b0110010 #define DRIVER_ADDR_1 0b0110010
#define DRIVER_ADDR_2 0b0110010 // this is here for compliancy reasons.
#define DRIVER_COUNT 1 #define DRIVER_COUNT 1
#define DRIVER_1_LED_TOTAL 91 #define DRIVER_LED_TOTAL 91
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#define DRIVER_INDICATOR_LED_TOTAL 0 #define DRIVER_INDICATOR_LED_TOTAL 0

View file

@ -34,8 +34,7 @@
/* COL2ROW, ROW2COL*/ /* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION ROW2COL #define DIODE_DIRECTION ROW2COL
#define DRIVER_1_LED_TOTAL 97 #define DRIVER_LED_TOTAL 97
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#define DRIVER_INDICATOR_LED_TOTAL 3 #define DRIVER_INDICATOR_LED_TOTAL 3

View file

@ -47,5 +47,4 @@
//#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR //#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
#define DRIVER_ADDR_1 0b0110000 #define DRIVER_ADDR_1 0b0110000
#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons.
#define DRIVER_COUNT 1 #define DRIVER_COUNT 1

View file

@ -34,6 +34,5 @@
/* COL2ROW, ROW2COL*/ /* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
#define DRIVER_1_LED_TOTAL 63 #define DRIVER_LED_TOTAL 63
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#define DRIVER_INDICATOR_LED_TOTAL 0 #define DRIVER_INDICATOR_LED_TOTAL 0

View file

@ -34,6 +34,5 @@
/* COL2ROW, ROW2COL*/ /* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
#define DRIVER_1_LED_TOTAL 71 #define DRIVER_LED_TOTAL 71
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#define DRIVER_INDICATOR_LED_TOTAL 0 #define DRIVER_INDICATOR_LED_TOTAL 0

View file

@ -47,5 +47,4 @@
//#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR //#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
#define DRIVER_ADDR_1 0b0110000 #define DRIVER_ADDR_1 0b0110000
#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons.
#define DRIVER_COUNT 1 #define DRIVER_COUNT 1

View file

@ -34,6 +34,5 @@
/* COL2ROW, ROW2COL*/ /* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
#define DRIVER_1_LED_TOTAL 65 #define DRIVER_LED_TOTAL 65
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#define DRIVER_INDICATOR_LED_TOTAL 0 #define DRIVER_INDICATOR_LED_TOTAL 0

View file

@ -34,6 +34,5 @@
/* COL2ROW, ROW2COL*/ /* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
#define DRIVER_1_LED_TOTAL 71 #define DRIVER_LED_TOTAL 71
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#define DRIVER_INDICATOR_LED_TOTAL 0 #define DRIVER_INDICATOR_LED_TOTAL 0

View file

@ -47,5 +47,4 @@
//#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR //#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
#define DRIVER_ADDR_1 0b0110000 #define DRIVER_ADDR_1 0b0110000
#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons.
#define DRIVER_COUNT 1 #define DRIVER_COUNT 1

View file

@ -34,6 +34,5 @@
/* COL2ROW, ROW2COL*/ /* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
#define DRIVER_1_LED_TOTAL 64 #define DRIVER_LED_TOTAL 64
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#define DRIVER_INDICATOR_LED_TOTAL 0 #define DRIVER_INDICATOR_LED_TOTAL 0

View file

@ -34,6 +34,5 @@
/* COL2ROW, ROW2COL*/ /* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
#define DRIVER_1_LED_TOTAL 66 #define DRIVER_LED_TOTAL 66
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#define DRIVER_INDICATOR_LED_TOTAL 0 #define DRIVER_INDICATOR_LED_TOTAL 0

View file

@ -34,6 +34,5 @@
/* COL2ROW, ROW2COL*/ /* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
#define DRIVER_1_LED_TOTAL 72 #define DRIVER_LED_TOTAL 72
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#define DRIVER_INDICATOR_LED_TOTAL 0 #define DRIVER_INDICATOR_LED_TOTAL 0

View file

@ -47,5 +47,4 @@
//#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR //#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
#define DRIVER_ADDR_1 0b0110000 #define DRIVER_ADDR_1 0b0110000
#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons.
#define DRIVER_COUNT 1 #define DRIVER_COUNT 1

View file

@ -34,6 +34,5 @@
/* COL2ROW, ROW2COL*/ /* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
#define DRIVER_1_LED_TOTAL 76 #define DRIVER_LED_TOTAL 76
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#define DRIVER_INDICATOR_LED_TOTAL 0 #define DRIVER_INDICATOR_LED_TOTAL 0

View file

@ -47,5 +47,4 @@
//#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR //#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
#define DRIVER_ADDR_1 0b0110000 #define DRIVER_ADDR_1 0b0110000
#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons.
#define DRIVER_COUNT 1 #define DRIVER_COUNT 1

View file

@ -34,6 +34,5 @@
/* COL2ROW, ROW2COL*/ /* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
#define DRIVER_1_LED_TOTAL 68 #define DRIVER_LED_TOTAL 68
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#define DRIVER_INDICATOR_LED_TOTAL 3 #define DRIVER_INDICATOR_LED_TOTAL 3

View file

@ -48,5 +48,4 @@
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
//#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_REACTIVE_SIMPLE //#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_REACTIVE_SIMPLE
#define DRIVER_ADDR_1 0b0110000 #define DRIVER_ADDR_1 0b0110000
#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons.
#define DRIVER_COUNT 1 #define DRIVER_COUNT 1

View file

@ -34,7 +34,6 @@
/* COL2ROW, ROW2COL*/ /* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
#define DRIVER_1_LED_TOTAL 92 #define DRIVER_LED_TOTAL 92
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#define DRIVER_INDICATOR_LED_TOTAL 0 #define DRIVER_INDICATOR_LED_TOTAL 0

View file

@ -46,8 +46,6 @@
//#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR //#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
#define DRIVER_ADDR_1 0b0110000 #define DRIVER_ADDR_1 0b0110000
#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons.
#define DRIVER_COUNT 1 #define DRIVER_COUNT 1
#define DRIVER_1_LED_TOTAL 69 #define DRIVER_LED_TOTAL 69
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#define DRIVER_INDICATOR_LED_TOTAL 6 #define DRIVER_INDICATOR_LED_TOTAL 6

View file

@ -55,8 +55,6 @@
# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
# define DISABLE_RGB_MATRIX_DIGITAL_RAIN # define DISABLE_RGB_MATRIX_DIGITAL_RAIN
# define DRIVER_ADDR_1 0b1010000 # define DRIVER_ADDR_1 0b1010000
# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. # define DRIVER_COUNT 1
# define DRIVER_COUNT 2 # define DRIVER_LED_TOTAL 62
# define DRIVER_1_LED_TOTAL 62
# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#endif #endif

View file

@ -54,11 +54,9 @@
#define RGB_MATRIX_LED_PROCESS_LIMIT 20 #define RGB_MATRIX_LED_PROCESS_LIMIT 20
#define RGB_MATRIX_LED_FLUSH_LIMIT 26 #define RGB_MATRIX_LED_FLUSH_LIMIT 26
#define DRIVER_ADDR_1 0b1010000 #define DRIVER_ADDR_1 0b1010000
#define DRIVER_ADDR_2 0b1010000
#define DRIVER_COUNT 2 #define DRIVER_COUNT 1
#define DRIVER_1_LED_TOTAL 64 #define DRIVER_LED_TOTAL 64
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE

View file

@ -59,9 +59,8 @@
#define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8 #define RGBLIGHT_VAL_STEP 8
#define DRIVER_1_LED_TOTAL 32
#define DRIVER_ADDR_1 0b1110100 #define DRIVER_ADDR_1 0b1110100
#define DRIVER_COUNT 1 #define DRIVER_COUNT 1
#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL) #define DRIVER_LED_TOTAL 32
#define CAPS_PIN F5 #define CAPS_PIN F5

View file

@ -36,8 +36,7 @@
// RGB matrix // RGB matrix
#define DRIVER_ADDR_1 0b1110100 #define DRIVER_ADDR_1 0b1110100
#define DRIVER_COUNT 1 #define DRIVER_COUNT 1
#define DRIVER_1_LED_TOTAL (4 * 8 * 3) #define DRIVER_LED_TOTAL (4 * 8 * 3)
#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL)
#define RGB_DISABLE_WHEN_USB_SUSPENDED #define RGB_DISABLE_WHEN_USB_SUSPENDED
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_SPIRAL #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_SPIRAL
#define RGB_MATRIX_DISABLE_KEYCODES #define RGB_MATRIX_DISABLE_KEYCODES

View file

@ -77,10 +77,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200
# define RGB_MATRIX_STARTUP_VAL 128 # define RGB_MATRIX_STARTUP_VAL 128
# define DRIVER_ADDR_1 0b0110000 # define DRIVER_ADDR_1 0b0110000
# define DRIVER_ADDR_2 0b0110000 # define DRIVER_COUNT 1
# define DRIVER_COUNT 2 # define DRIVER_LED_TOTAL 67
# define DRIVER_1_LED_TOTAL 67
# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#endif #endif
/* Encoder */ /* Encoder */

View file

@ -76,10 +76,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200
# define RGB_MATRIX_STARTUP_VAL 128 # define RGB_MATRIX_STARTUP_VAL 128
# define DRIVER_ADDR_1 0b0110000 # define DRIVER_ADDR_1 0b0110000
# define DRIVER_ADDR_2 0b0110000 # define DRIVER_COUNT 1
# define DRIVER_COUNT 2 # define DRIVER_LED_TOTAL 71
# define DRIVER_1_LED_TOTAL 71
# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#endif #endif
/* Encoder */ /* Encoder */

View file

@ -120,11 +120,9 @@
//#define WS2812_EXTERNAL_PULLUP //#define WS2812_EXTERNAL_PULLUP
#define DRIVER_ADDR_1 0b1010000 #define DRIVER_ADDR_1 0b1010000
#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons.
#define DRIVER_COUNT 1 #define DRIVER_COUNT 1
#define DRIVER_1_LED_TOTAL 47 #define DRIVER_LED_TOTAL 47
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGB_MATRIX_FRAMEBUFFER_EFFECTS

View file

@ -84,14 +84,9 @@
// 0b1110101 AD <-> SCL // 0b1110101 AD <-> SCL
// 0b1110110 AD <-> SDA // 0b1110110 AD <-> SDA
#define DRIVER_ADDR_1 0b1110100 #define DRIVER_ADDR_1 0b1110100
//#define DRIVER_ADDR_2 0b1110110
#define DRIVER_COUNT 1 #define DRIVER_COUNT 1
#define DRIVER_1_LED_TOTAL 6 #define DRIVER_LED_TOTAL 6
//#define DRIVER_1_LED_TOTAL 25
//#define DRIVER_2_LED_TOTAL 24
//#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#endif #endif
//#define RGB_DI_PIN B7 //#define RGB_DI_PIN B7
//#ifdef RGB_DI_PIN //#ifdef RGB_DI_PIN

View file

@ -46,6 +46,5 @@
# define DRIVER_ADDR_1 0b1110111 # define DRIVER_ADDR_1 0b1110111
# define DRIVER_COUNT 1 # define DRIVER_COUNT 1
# define DRIVER_1_LED_TOTAL 22 # define DRIVER_LED_TOTAL 22
# define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL)
#endif #endif

View file

@ -60,11 +60,10 @@
// RGB Matrix defines // RGB Matrix defines
#define DRIVER_ADDR_1 0b0110000 #define DRIVER_ADDR_1 0b0110000
#define DRIVER_ADDR_2 0b0110001 //#define DRIVER_ADDR_2 0b0110001
#define DRIVER_COUNT 1 #define DRIVER_COUNT 1
#define DRIVER_1_LED_TOTAL 117 #define DRIVER_LED_TOTAL 117
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#define ISSI_DRIVER_TOTAL DRIVER_LED_TOTAL #define ISSI_DRIVER_TOTAL DRIVER_LED_TOTAL
#define RGB_MATRIX_STARTUP_VAL 80 #define RGB_MATRIX_STARTUP_VAL 80

View file

@ -26,114 +26,93 @@
*/ */
#if defined(IS31FL3731) || defined(IS31FL3733) #if defined(IS31FL3731) || defined(IS31FL3733)
# include "i2c_master.h" # include "i2c_master.h"
static void init(void) { static void init(void) {
i2c_init(); i2c_init();
# ifdef IS31FL3731
# ifdef LED_DRIVER_ADDR_1 # if defined(IS31FL3731)
IS31FL3731_init(LED_DRIVER_ADDR_1); IS31FL3731_init(LED_DRIVER_ADDR_1);
# endif # if defined(LED_DRIVER_ADDR_2)
# ifdef LED_DRIVER_ADDR_2
IS31FL3731_init(LED_DRIVER_ADDR_2); IS31FL3731_init(LED_DRIVER_ADDR_2);
# endif # if defined(LED_DRIVER_ADDR_3)
# ifdef LED_DRIVER_ADDR_3
IS31FL3731_init(LED_DRIVER_ADDR_3); IS31FL3731_init(LED_DRIVER_ADDR_3);
# endif # if defined(LED_DRIVER_ADDR_4)
# ifdef LED_DRIVER_ADDR_4
IS31FL3731_init(LED_DRIVER_ADDR_4); IS31FL3731_init(LED_DRIVER_ADDR_4);
# endif # endif
# else # endif
# ifdef LED_DRIVER_ADDR_1 # endif
# ifndef LED_DRIVER_SYNC_1
# elif defined(IS31FL3733)
# if !defined(LED_DRIVER_SYNC_1)
# define LED_DRIVER_SYNC_1 0 # define LED_DRIVER_SYNC_1 0
# endif # endif
IS31FL3733_init(LED_DRIVER_ADDR_1, LED_DRIVER_SYNC_1); IS31FL3733_init(LED_DRIVER_ADDR_1, LED_DRIVER_SYNC_1);
# endif # if defined(LED_DRIVER_ADDR_2)
# ifdef LED_DRIVER_ADDR_2 # if !defined(LED_DRIVER_SYNC_2)
# ifndef LED_DRIVER_SYNC_2
# define LED_DRIVER_SYNC_2 0 # define LED_DRIVER_SYNC_2 0
# endif # endif
IS31FL3733_init(LED_DRIVER_ADDR_2, LED_DRIVER_SYNC_2); IS31FL3733_init(LED_DRIVER_ADDR_2, LED_DRIVER_SYNC_2);
# endif # if defined(LED_DRIVER_ADDR_3)
# ifdef LED_DRIVER_ADDR_3 # if !defined(LED_DRIVER_SYNC_3)
# ifndef LED_DRIVER_SYNC_3
# define LED_DRIVER_SYNC_3 0 # define LED_DRIVER_SYNC_3 0
# endif # endif
IS31FL3733_init(LED_DRIVER_ADDR_3, LED_DRIVER_SYNC_3); IS31FL3733_init(LED_DRIVER_ADDR_3, LED_DRIVER_SYNC_3);
# endif # if defined(LED_DRIVER_ADDR_4)
# ifdef LED_DRIVER_ADDR_4 # if !defined(LED_DRIVER_SYNC_4)
# ifndef LED_DRIVER_SYNC_4
# define LED_DRIVER_SYNC_4 0 # define LED_DRIVER_SYNC_4 0
# endif # endif
IS31FL3733_init(LED_DRIVER_ADDR_4, LED_DRIVER_SYNC_4); IS31FL3733_init(LED_DRIVER_ADDR_4, LED_DRIVER_SYNC_4);
# endif # endif
# endif
# endif
# endif # endif
for (int index = 0; index < DRIVER_LED_TOTAL; index++) { for (int index = 0; index < DRIVER_LED_TOTAL; index++) {
# ifdef IS31FL3731 # if defined(IS31FL3731)
IS31FL3731_set_led_control_register(index, true); IS31FL3731_set_led_control_register(index, true);
# else # elif defined(IS31FL3733)
IS31FL3733_set_led_control_register(index, true); IS31FL3733_set_led_control_register(index, true);
# endif # endif
} }
// This actually updates the LED drivers // This actually updates the LED drivers
# ifdef IS31FL3731 # if defined(IS31FL3731)
# ifdef LED_DRIVER_ADDR_1
IS31FL3731_update_led_control_registers(LED_DRIVER_ADDR_1, 0); IS31FL3731_update_led_control_registers(LED_DRIVER_ADDR_1, 0);
# endif # if defined(LED_DRIVER_ADDR_2)
# ifdef LED_DRIVER_ADDR_2
IS31FL3731_update_led_control_registers(LED_DRIVER_ADDR_2, 1); IS31FL3731_update_led_control_registers(LED_DRIVER_ADDR_2, 1);
# endif # if defined(LED_DRIVER_ADDR_3)
# ifdef LED_DRIVER_ADDR_3
IS31FL3731_update_led_control_registers(LED_DRIVER_ADDR_3, 2); IS31FL3731_update_led_control_registers(LED_DRIVER_ADDR_3, 2);
# endif # if defined(LED_DRIVER_ADDR_4)
# ifdef LED_DRIVER_ADDR_4
IS31FL3731_update_led_control_registers(LED_DRIVER_ADDR_4, 3); IS31FL3731_update_led_control_registers(LED_DRIVER_ADDR_4, 3);
# endif # endif
# else # endif
# ifdef LED_DRIVER_ADDR_1 # endif
# elif defined(IS31FL3733)
IS31FL3733_update_led_control_registers(LED_DRIVER_ADDR_1, 0); IS31FL3733_update_led_control_registers(LED_DRIVER_ADDR_1, 0);
# endif # if defined(LED_DRIVER_ADDR_2)
# ifdef LED_DRIVER_ADDR_2
IS31FL3733_update_led_control_registers(LED_DRIVER_ADDR_2, 1); IS31FL3733_update_led_control_registers(LED_DRIVER_ADDR_2, 1);
# endif # if defined(LED_DRIVER_ADDR_3)
# ifdef LED_DRIVER_ADDR_3
IS31FL3733_update_led_control_registers(LED_DRIVER_ADDR_3, 2); IS31FL3733_update_led_control_registers(LED_DRIVER_ADDR_3, 2);
# endif # if defined(LED_DRIVER_ADDR_4)
# ifdef LED_DRIVER_ADDR_4
IS31FL3733_update_led_control_registers(LED_DRIVER_ADDR_4, 3); IS31FL3733_update_led_control_registers(LED_DRIVER_ADDR_4, 3);
# endif # endif
# endif # endif
# endif
# endif
} }
# if defined(IS31FL3731)
static void flush(void) { static void flush(void) {
# ifdef IS31FL3731
# ifdef LED_DRIVER_ADDR_1
IS31FL3731_update_pwm_buffers(LED_DRIVER_ADDR_1, 0); IS31FL3731_update_pwm_buffers(LED_DRIVER_ADDR_1, 0);
# endif # if defined(LED_DRIVER_ADDR_2)
# ifdef LED_DRIVER_ADDR_2
IS31FL3731_update_pwm_buffers(LED_DRIVER_ADDR_2, 1); IS31FL3731_update_pwm_buffers(LED_DRIVER_ADDR_2, 1);
# endif # if defined(LED_DRIVER_ADDR_3)
# ifdef LED_DRIVER_ADDR_3
IS31FL3731_update_pwm_buffers(LED_DRIVER_ADDR_3, 2); IS31FL3731_update_pwm_buffers(LED_DRIVER_ADDR_3, 2);
# endif # if defined(LED_DRIVER_ADDR_4)
# ifdef LED_DRIVER_ADDR_4
IS31FL3731_update_pwm_buffers(LED_DRIVER_ADDR_4, 3); IS31FL3731_update_pwm_buffers(LED_DRIVER_ADDR_4, 3);
# endif # endif
# else
# ifdef LED_DRIVER_ADDR_1
IS31FL3733_update_pwm_buffers(LED_DRIVER_ADDR_1, 0);
# endif
# ifdef LED_DRIVER_ADDR_2
IS31FL3733_update_pwm_buffers(LED_DRIVER_ADDR_2, 1);
# endif
# ifdef LED_DRIVER_ADDR_3
IS31FL3733_update_pwm_buffers(LED_DRIVER_ADDR_3, 2);
# endif
# ifdef LED_DRIVER_ADDR_4
IS31FL3733_update_pwm_buffers(LED_DRIVER_ADDR_4, 3);
# endif # endif
# endif # endif
} }
@ -141,13 +120,29 @@ static void flush(void) {
const led_matrix_driver_t led_matrix_driver = { const led_matrix_driver_t led_matrix_driver = {
.init = init, .init = init,
.flush = flush, .flush = flush,
# ifdef IS31FL3731
.set_value = IS31FL3731_set_value, .set_value = IS31FL3731_set_value,
.set_value_all = IS31FL3731_set_value_all, .set_value_all = IS31FL3731_set_value_all,
# else
.set_value = IS31FL3733_set_value,
.set_value_all = IS31FL3733_set_value_all,
# endif
}; };
# elif defined(IS31FL3733)
static void flush(void) {
IS31FL3733_update_pwm_buffers(LED_DRIVER_ADDR_1, 0);
# if defined(LED_DRIVER_ADDR_2)
IS31FL3733_update_pwm_buffers(LED_DRIVER_ADDR_2, 1);
# if defined(LED_DRIVER_ADDR_3)
IS31FL3733_update_pwm_buffers(LED_DRIVER_ADDR_3, 2);
# if defined(LED_DRIVER_ADDR_4)
IS31FL3733_update_pwm_buffers(LED_DRIVER_ADDR_4, 3);
# endif
# endif
# endif
# endif
}
const led_matrix_driver_t led_matrix_driver = {
.init = init,
.flush = flush,
.set_value = IS31FL3733_set_value,
.set_value_all = IS31FL3733_set_value_all,
};
#endif #endif

View file

@ -24,111 +24,127 @@
*/ */
#if defined(IS31FL3731) || defined(IS31FL3733) || defined(IS31FL3737) || defined(IS31FL3741) #if defined(IS31FL3731) || defined(IS31FL3733) || defined(IS31FL3737) || defined(IS31FL3741)
# include "i2c_master.h" # include "i2c_master.h"
// TODO: Remove this at some later date
# if defined(DRIVER_ADDR_1) && defined(DRIVER_ADDR_2)
# if DRIVER_ADDR_1 == DRIVER_ADDR_2
# error "Setting DRIVER_ADDR_2 == DRIVER_ADDR_1 is obsolete. If you are only using one ISSI driver, set DRIVER_COUNT to 1 and remove DRIVER_ADDR_2"
# endif
# endif
static void init(void) { static void init(void) {
i2c_init(); i2c_init();
# ifdef IS31FL3731
# if defined(IS31FL3731)
IS31FL3731_init(DRIVER_ADDR_1); IS31FL3731_init(DRIVER_ADDR_1);
# ifdef DRIVER_ADDR_2 # if defined(DRIVER_ADDR_2)
IS31FL3731_init(DRIVER_ADDR_2); IS31FL3731_init(DRIVER_ADDR_2);
# endif # if defined(DRIVER_ADDR_3)
# ifdef DRIVER_ADDR_3
IS31FL3731_init(DRIVER_ADDR_3); IS31FL3731_init(DRIVER_ADDR_3);
# endif # if defined(DRIVER_ADDR_4)
# ifdef DRIVER_ADDR_4
IS31FL3731_init(DRIVER_ADDR_4); IS31FL3731_init(DRIVER_ADDR_4);
# endif # endif
# endif
# endif
# elif defined(IS31FL3733) # elif defined(IS31FL3733)
# ifndef DRIVER_SYNC_1 # if !defined(DRIVER_SYNC_1)
# define DRIVER_SYNC_1 0 # define DRIVER_SYNC_1 0
# endif # endif
IS31FL3733_init(DRIVER_ADDR_1, DRIVER_SYNC_1); IS31FL3733_init(DRIVER_ADDR_1, DRIVER_SYNC_1);
# if defined DRIVER_ADDR_2 && (DRIVER_ADDR_1 != DRIVER_ADDR_2) # if defined(DRIVER_ADDR_2)
# ifndef DRIVER_SYNC_2 # if !defined(DRIVER_SYNC_2)
# define DRIVER_SYNC_2 0 # define DRIVER_SYNC_2 0
# endif # endif
IS31FL3733_init(DRIVER_ADDR_2, DRIVER_SYNC_2); IS31FL3733_init(DRIVER_ADDR_2, DRIVER_SYNC_2);
# endif # if defined(DRIVER_ADDR_3)
# ifdef DRIVER_ADDR_3 # if !defined(DRIVER_SYNC_3)
# ifndef DRIVER_SYNC_3
# define DRIVER_SYNC_3 0 # define DRIVER_SYNC_3 0
# endif # endif
IS31FL3733_init(DRIVER_ADDR_3, DRIVER_SYNC_3); IS31FL3733_init(DRIVER_ADDR_3, DRIVER_SYNC_3);
# endif # if defined(DRIVER_ADDR_4)
# ifdef DRIVER_ADDR_4 # if !defined(DRIVER_SYNC_4)
# ifndef DRIVER_SYNC_4
# define DRIVER_SYNC_4 0 # define DRIVER_SYNC_4 0
# endif # endif
IS31FL3733_init(DRIVER_ADDR_4, DRIVER_SYNC_4); IS31FL3733_init(DRIVER_ADDR_4, DRIVER_SYNC_4);
# endif # endif
# endif
# endif
# elif defined(IS31FL3737) # elif defined(IS31FL3737)
IS31FL3737_init(DRIVER_ADDR_1); IS31FL3737_init(DRIVER_ADDR_1);
# if defined(DRIVER_ADDR_2) && (DRIVER_ADDR_2 != DRIVER_ADDR_1) // provides backward compatibility # if defined(DRIVER_ADDR_2)
IS31FL3737_init(DRIVER_ADDR_2); IS31FL3737_init(DRIVER_ADDR_2);
# endif # endif
# else
# elif defined(IS31FL3741)
IS31FL3741_init(DRIVER_ADDR_1); IS31FL3741_init(DRIVER_ADDR_1);
# endif # endif
for (int index = 0; index < DRIVER_LED_TOTAL; index++) { for (int index = 0; index < DRIVER_LED_TOTAL; index++) {
bool enabled = true; bool enabled = true;
// This only caches it for later // This only caches it for later
# ifdef IS31FL3731 # if defined(IS31FL3731)
IS31FL3731_set_led_control_register(index, enabled, enabled, enabled); IS31FL3731_set_led_control_register(index, enabled, enabled, enabled);
# elif defined(IS31FL3733) # elif defined(IS31FL3733)
IS31FL3733_set_led_control_register(index, enabled, enabled, enabled); IS31FL3733_set_led_control_register(index, enabled, enabled, enabled);
# elif defined(IS31FL3737) # elif defined(IS31FL3737)
IS31FL3737_set_led_control_register(index, enabled, enabled, enabled); IS31FL3737_set_led_control_register(index, enabled, enabled, enabled);
# else # elif defined(IS31FL3741)
IS31FL3741_set_led_control_register(index, enabled, enabled, enabled); IS31FL3741_set_led_control_register(index, enabled, enabled, enabled);
# endif # endif
} }
// This actually updates the LED drivers // This actually updates the LED drivers
# ifdef IS31FL3731 # if defined(IS31FL3731)
IS31FL3731_update_led_control_registers(DRIVER_ADDR_1, 0); IS31FL3731_update_led_control_registers(DRIVER_ADDR_1, 0);
# ifdef DRIVER_ADDR_2 # if defined(DRIVER_ADDR_2)
IS31FL3731_update_led_control_registers(DRIVER_ADDR_2, 1); IS31FL3731_update_led_control_registers(DRIVER_ADDR_2, 1);
# endif # if defined(DRIVER_ADDR_3)
# ifdef DRIVER_ADDR_3
IS31FL3731_update_led_control_registers(DRIVER_ADDR_3, 2); IS31FL3731_update_led_control_registers(DRIVER_ADDR_3, 2);
# endif # if defined(DRIVER_ADDR_4)
# ifdef DRIVER_ADDR_4
IS31FL3731_update_led_control_registers(DRIVER_ADDR_4, 3); IS31FL3731_update_led_control_registers(DRIVER_ADDR_4, 3);
# endif # endif
# endif
# endif
# elif defined(IS31FL3733) # elif defined(IS31FL3733)
IS31FL3733_update_led_control_registers(DRIVER_ADDR_1, 0); IS31FL3733_update_led_control_registers(DRIVER_ADDR_1, 0);
# ifdef DRIVER_ADDR_2 # if defined(DRIVER_ADDR_2)
IS31FL3733_update_led_control_registers(DRIVER_ADDR_2, 1); IS31FL3733_update_led_control_registers(DRIVER_ADDR_2, 1);
# endif # if defined(DRIVER_ADDR_3)
# ifdef DRIVER_ADDR_3
IS31FL3733_update_led_control_registers(DRIVER_ADDR_3, 2); IS31FL3733_update_led_control_registers(DRIVER_ADDR_3, 2);
# endif # if defined(DRIVER_ADDR_4)
# ifdef DRIVER_ADDR_4
IS31FL3733_update_led_control_registers(DRIVER_ADDR_4, 3); IS31FL3733_update_led_control_registers(DRIVER_ADDR_4, 3);
# endif # endif
# endif
# endif
# elif defined(IS31FL3737) # elif defined(IS31FL3737)
IS31FL3737_update_led_control_registers(DRIVER_ADDR_1, 0); IS31FL3737_update_led_control_registers(DRIVER_ADDR_1, 0);
# if defined(DRIVER_ADDR_2) && (DRIVER_ADDR_2 != DRIVER_ADDR_1) // provides backward compatibility # if defined(DRIVER_ADDR_2)
IS31FL3737_update_led_control_registers(DRIVER_ADDR_2, 1); IS31FL3737_update_led_control_registers(DRIVER_ADDR_2, 1);
# endif # endif
# else
# elif defined(IS31FL3741)
IS31FL3741_update_led_control_registers(DRIVER_ADDR_1, 0); IS31FL3741_update_led_control_registers(DRIVER_ADDR_1, 0);
# endif # endif
} }
# ifdef IS31FL3731 # if defined(IS31FL3731)
static void flush(void) { static void flush(void) {
IS31FL3731_update_pwm_buffers(DRIVER_ADDR_1, 0); IS31FL3731_update_pwm_buffers(DRIVER_ADDR_1, 0);
# ifdef DRIVER_ADDR_2 # if defined(DRIVER_ADDR_2)
IS31FL3731_update_pwm_buffers(DRIVER_ADDR_2, 1); IS31FL3731_update_pwm_buffers(DRIVER_ADDR_2, 1);
# endif # if defined(DRIVER_ADDR_3)
# ifdef DRIVER_ADDR_3
IS31FL3731_update_pwm_buffers(DRIVER_ADDR_3, 2); IS31FL3731_update_pwm_buffers(DRIVER_ADDR_3, 2);
# endif # if defined(DRIVER_ADDR_4)
# ifdef DRIVER_ADDR_4
IS31FL3731_update_pwm_buffers(DRIVER_ADDR_4, 3); IS31FL3731_update_pwm_buffers(DRIVER_ADDR_4, 3);
# endif # endif
# endif
# endif
} }
const rgb_matrix_driver_t rgb_matrix_driver = { const rgb_matrix_driver_t rgb_matrix_driver = {
@ -137,18 +153,19 @@ const rgb_matrix_driver_t rgb_matrix_driver = {
.set_color = IS31FL3731_set_color, .set_color = IS31FL3731_set_color,
.set_color_all = IS31FL3731_set_color_all, .set_color_all = IS31FL3731_set_color_all,
}; };
# elif defined(IS31FL3733) # elif defined(IS31FL3733)
static void flush(void) { static void flush(void) {
IS31FL3733_update_pwm_buffers(DRIVER_ADDR_1, 0); IS31FL3733_update_pwm_buffers(DRIVER_ADDR_1, 0);
# ifdef DRIVER_ADDR_2 # if defined(DRIVER_ADDR_2)
IS31FL3733_update_pwm_buffers(DRIVER_ADDR_2, 1); IS31FL3733_update_pwm_buffers(DRIVER_ADDR_2, 1);
# endif # if defined(DRIVER_ADDR_3)
# ifdef DRIVER_ADDR_3
IS31FL3733_update_pwm_buffers(DRIVER_ADDR_3, 2); IS31FL3733_update_pwm_buffers(DRIVER_ADDR_3, 2);
# endif # if defined(DRIVER_ADDR_4)
# ifdef DRIVER_ADDR_4
IS31FL3733_update_pwm_buffers(DRIVER_ADDR_4, 3); IS31FL3733_update_pwm_buffers(DRIVER_ADDR_4, 3);
# endif # endif
# endif
# endif
} }
const rgb_matrix_driver_t rgb_matrix_driver = { const rgb_matrix_driver_t rgb_matrix_driver = {
@ -157,10 +174,11 @@ const rgb_matrix_driver_t rgb_matrix_driver = {
.set_color = IS31FL3733_set_color, .set_color = IS31FL3733_set_color,
.set_color_all = IS31FL3733_set_color_all, .set_color_all = IS31FL3733_set_color_all,
}; };
# elif defined(IS31FL3737) # elif defined(IS31FL3737)
static void flush(void) { static void flush(void) {
IS31FL3737_update_pwm_buffers(DRIVER_ADDR_1, 0); IS31FL3737_update_pwm_buffers(DRIVER_ADDR_1, 0);
# if defined(DRIVER_ADDR_2) && (DRIVER_ADDR_2 != DRIVER_ADDR_1) // provides backward compatibility # if defined(DRIVER_ADDR_2)
IS31FL3737_update_pwm_buffers(DRIVER_ADDR_2, 1); IS31FL3737_update_pwm_buffers(DRIVER_ADDR_2, 1);
# endif # endif
} }
@ -171,10 +189,11 @@ const rgb_matrix_driver_t rgb_matrix_driver = {
.set_color = IS31FL3737_set_color, .set_color = IS31FL3737_set_color,
.set_color_all = IS31FL3737_set_color_all, .set_color_all = IS31FL3737_set_color_all,
}; };
# else
# elif defined(IS31FL3741)
static void flush(void) { static void flush(void) {
IS31FL3741_update_pwm_buffers(DRIVER_ADDR_1, 0); IS31FL3741_update_pwm_buffers(DRIVER_ADDR_1, 0);
# if defined(DRIVER_ADDR_2) && (DRIVER_ADDR_2 != DRIVER_ADDR_1) // provides backward compatibility # if defined(DRIVER_ADDR_2)
IS31FL3741_update_pwm_buffers(DRIVER_ADDR_2, 1); IS31FL3741_update_pwm_buffers(DRIVER_ADDR_2, 1);
# endif # endif
} }
@ -189,17 +208,19 @@ const rgb_matrix_driver_t rgb_matrix_driver = {
#elif defined(AW20216) #elif defined(AW20216)
# include "spi_master.h" # include "spi_master.h"
static void init(void) { static void init(void) {
spi_init(); spi_init();
AW20216_init(DRIVER_1_CS, DRIVER_1_EN); AW20216_init(DRIVER_1_CS, DRIVER_1_EN);
# ifdef DRIVER_2_CS # if defined(DRIVER_2_CS)
AW20216_init(DRIVER_2_CS, DRIVER_2_EN); AW20216_init(DRIVER_2_CS, DRIVER_2_EN);
# endif # endif
} }
static void flush(void) { static void flush(void) {
AW20216_update_pwm_buffers(DRIVER_1_CS, 0); AW20216_update_pwm_buffers(DRIVER_1_CS, 0);
# ifdef DRIVER_2_CS # if defined(DRIVER_2_CS)
AW20216_update_pwm_buffers(DRIVER_2_CS, 1); AW20216_update_pwm_buffers(DRIVER_2_CS, 1);
# endif # endif
} }