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 RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
# define DRIVER_ADDR_1 0b1010000
# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons.
# define DRIVER_COUNT 2
# define DRIVER_1_LED_TOTAL 63
# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
# define DRIVER_COUNT 1
# define DRIVER_LED_TOTAL 63
#endif

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -49,9 +49,7 @@
# define RGB_MATRIX_LED_FLUSH_LIMIT 26
# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
# define DRIVER_ADDR_1 0b0110000
# define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons.
# define DRIVER_COUNT 1
# define DRIVER_1_LED_TOTAL 68
# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
# define DRIVER_LED_TOTAL 68
# define DRIVER_INDICATOR_LED_TOTAL 0
#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.
// The result is: 0b101(ADDR2)(ADDR1)
#define DRIVER_ADDR_1 0b1010000
#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons.
#define DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 64
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#define DRIVER_COUNT 1
#define DRIVER_LED_TOTAL 64

View file

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

View file

@ -48,10 +48,8 @@
//#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
#define DRIVER_ADDR_1 0b0110000
#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons.
#define DRIVER_COUNT 1
#define DRIVER_1_LED_TOTAL 108
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#define DRIVER_LED_TOTAL 108
#define DRIVER_INDICATOR_LED_TOTAL 0
#endif
#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_CYCLE_ALL
#define DRIVER_ADDR_1 0b0110000
#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons.
#define DRIVER_COUNT 1
#define DRIVER_1_LED_TOTAL 109
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#define DRIVER_LED_TOTAL 109
#define DRIVER_INDICATOR_LED_TOTAL 0
#endif
#define DYNAMIC_KEYMAP_LAYER_COUNT 2

View file

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

View file

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

View file

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

View file

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

View file

@ -84,14 +84,9 @@
// 0b1110101 AD <-> SCL
// 0b1110110 AD <-> SDA
#define DRIVER_ADDR_1 0b1110100
//#define DRIVER_ADDR_2 0b1110110
#define DRIVER_COUNT 1
#define DRIVER_1_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
#define DRIVER_LED_TOTAL 6
#endif
//#define RGB_DI_PIN B7
//#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
// 0b1110110 AD <-> SDA
#define DRIVER_ADDR_1 0b0110010
#define DRIVER_ADDR_2 0b0110010
#define DRIVER_COUNT 1
#define DRIVER_1_LED_TOTAL 66
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#define DRIVER_LED_TOTAL 66
#define RGB_MATRIX_KEYPRESSES // reacts to keypresses
#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS

View file

@ -33,10 +33,7 @@
// 0b1110101 AD <-> SCL
// 0b1110110 AD <-> SDA
#define DRIVER_ADDR_1 0b1110110
#define DRIVER_ADDR_2 0b1110100
#define DRIVER_COUNT 1
#define DRIVER_1_LED_TOTAL 25
#define DRIVER_2_LED_TOTAL 0
#define DRIVER_LED_TOTAL 25
#define RGB_MATRIX_KEYPRESSES // reacts to 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_SOLID_REACTIVE_SIMPLE
#define DRIVER_ADDR_1 0b0110010
#define DRIVER_ADDR_2 0b0110010 // this is here for compliancy reasons.
#define DRIVER_COUNT 1
#define DRIVER_1_LED_TOTAL 91
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#define DRIVER_LED_TOTAL 91
#define DRIVER_INDICATOR_LED_TOTAL 0

View file

@ -34,8 +34,7 @@
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION ROW2COL
#define DRIVER_1_LED_TOTAL 97
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#define DRIVER_LED_TOTAL 97
#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_CYCLE_ALL
#define DRIVER_ADDR_1 0b0110000
#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons.
#define DRIVER_COUNT 1

View file

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

View file

@ -34,6 +34,5 @@
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
#define DRIVER_1_LED_TOTAL 71
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#define DRIVER_LED_TOTAL 71
#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_CYCLE_ALL
#define DRIVER_ADDR_1 0b0110000
#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons.
#define DRIVER_COUNT 1

View file

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

View file

@ -34,6 +34,5 @@
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
#define DRIVER_1_LED_TOTAL 71
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#define DRIVER_LED_TOTAL 71
#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_CYCLE_ALL
#define DRIVER_ADDR_1 0b0110000
#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons.
#define DRIVER_COUNT 1

View file

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

View file

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

View file

@ -34,6 +34,5 @@
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
#define DRIVER_1_LED_TOTAL 72
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#define DRIVER_LED_TOTAL 72
#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_CYCLE_ALL
#define DRIVER_ADDR_1 0b0110000
#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons.
#define DRIVER_COUNT 1

View file

@ -34,6 +34,5 @@
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
#define DRIVER_1_LED_TOTAL 76
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#define DRIVER_LED_TOTAL 76
#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_CYCLE_ALL
#define DRIVER_ADDR_1 0b0110000
#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons.
#define DRIVER_COUNT 1

View file

@ -34,6 +34,5 @@
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
#define DRIVER_1_LED_TOTAL 68
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#define DRIVER_LED_TOTAL 68
#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_SOLID_REACTIVE_SIMPLE
#define DRIVER_ADDR_1 0b0110000
#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons.
#define DRIVER_COUNT 1

View file

@ -34,7 +34,6 @@
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
#define DRIVER_1_LED_TOTAL 92
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#define DRIVER_LED_TOTAL 92
#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_CYCLE_ALL
#define DRIVER_ADDR_1 0b0110000
#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons.
#define DRIVER_COUNT 1
#define DRIVER_1_LED_TOTAL 69
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#define DRIVER_LED_TOTAL 69
#define DRIVER_INDICATOR_LED_TOTAL 6

View file

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

View file

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

View file

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

View file

@ -36,8 +36,7 @@
// RGB matrix
#define DRIVER_ADDR_1 0b1110100
#define DRIVER_COUNT 1
#define DRIVER_1_LED_TOTAL (4 * 8 * 3)
#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL)
#define DRIVER_LED_TOTAL (4 * 8 * 3)
#define RGB_DISABLE_WHEN_USB_SUSPENDED
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_SPIRAL
#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_STARTUP_VAL 128
# define DRIVER_ADDR_1 0b0110000
# define DRIVER_ADDR_2 0b0110000
# define DRIVER_COUNT 2
# define DRIVER_1_LED_TOTAL 67
# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
# define DRIVER_COUNT 1
# define DRIVER_LED_TOTAL 67
#endif
/* 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_STARTUP_VAL 128
# define DRIVER_ADDR_1 0b0110000
# define DRIVER_ADDR_2 0b0110000
# define DRIVER_COUNT 2
# define DRIVER_1_LED_TOTAL 71
# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
# define DRIVER_COUNT 1
# define DRIVER_LED_TOTAL 71
#endif
/* Encoder */

View file

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

View file

@ -84,14 +84,9 @@
// 0b1110101 AD <-> SCL
// 0b1110110 AD <-> SDA
#define DRIVER_ADDR_1 0b1110100
//#define DRIVER_ADDR_2 0b1110110
#define DRIVER_COUNT 1
#define DRIVER_1_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
#define DRIVER_LED_TOTAL 6
#endif
//#define RGB_DI_PIN B7
//#ifdef RGB_DI_PIN

View file

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

View file

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

View file

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

View file

@ -24,110 +24,126 @@
*/
#if defined(IS31FL3731) || defined(IS31FL3733) || defined(IS31FL3737) || defined(IS31FL3741)
# 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) {
i2c_init();
# ifdef IS31FL3731
# if defined(IS31FL3731)
IS31FL3731_init(DRIVER_ADDR_1);
# ifdef DRIVER_ADDR_2
# if defined(DRIVER_ADDR_2)
IS31FL3731_init(DRIVER_ADDR_2);
# endif
# ifdef DRIVER_ADDR_3
# if defined(DRIVER_ADDR_3)
IS31FL3731_init(DRIVER_ADDR_3);
# endif
# ifdef DRIVER_ADDR_4
# if defined(DRIVER_ADDR_4)
IS31FL3731_init(DRIVER_ADDR_4);
# endif
# endif
# endif
# elif defined(IS31FL3733)
# ifndef DRIVER_SYNC_1
# if !defined(DRIVER_SYNC_1)
# define DRIVER_SYNC_1 0
# endif
IS31FL3733_init(DRIVER_ADDR_1, DRIVER_SYNC_1);
# if defined DRIVER_ADDR_2 && (DRIVER_ADDR_1 != DRIVER_ADDR_2)
# ifndef DRIVER_SYNC_2
# if defined(DRIVER_ADDR_2)
# if !defined(DRIVER_SYNC_2)
# define DRIVER_SYNC_2 0
# endif
IS31FL3733_init(DRIVER_ADDR_2, DRIVER_SYNC_2);
# endif
# ifdef DRIVER_ADDR_3
# ifndef DRIVER_SYNC_3
# define DRIVER_SYNC_3 0
# endif
# if defined(DRIVER_ADDR_3)
# if !defined(DRIVER_SYNC_3)
# define DRIVER_SYNC_3 0
# endif
IS31FL3733_init(DRIVER_ADDR_3, DRIVER_SYNC_3);
# endif
# ifdef DRIVER_ADDR_4
# ifndef DRIVER_SYNC_4
# define DRIVER_SYNC_4 0
# endif
# if defined(DRIVER_ADDR_4)
# if !defined(DRIVER_SYNC_4)
# define DRIVER_SYNC_4 0
# endif
IS31FL3733_init(DRIVER_ADDR_4, DRIVER_SYNC_4);
# endif
# endif
# endif
# elif defined(IS31FL3737)
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);
# endif
# else
# elif defined(IS31FL3741)
IS31FL3741_init(DRIVER_ADDR_1);
# endif
for (int index = 0; index < DRIVER_LED_TOTAL; index++) {
bool enabled = true;
// This only caches it for later
# ifdef IS31FL3731
# if defined(IS31FL3731)
IS31FL3731_set_led_control_register(index, enabled, enabled, enabled);
# elif defined(IS31FL3733)
IS31FL3733_set_led_control_register(index, enabled, enabled, enabled);
# elif defined(IS31FL3737)
IS31FL3737_set_led_control_register(index, enabled, enabled, enabled);
# else
# elif defined(IS31FL3741)
IS31FL3741_set_led_control_register(index, enabled, enabled, enabled);
# endif
}
// This actually updates the LED drivers
# ifdef IS31FL3731
# if defined(IS31FL3731)
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);
# endif
# ifdef DRIVER_ADDR_3
# if defined(DRIVER_ADDR_3)
IS31FL3731_update_led_control_registers(DRIVER_ADDR_3, 2);
# endif
# ifdef DRIVER_ADDR_4
# if defined(DRIVER_ADDR_4)
IS31FL3731_update_led_control_registers(DRIVER_ADDR_4, 3);
# endif
# endif
# endif
# elif defined(IS31FL3733)
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);
# endif
# ifdef DRIVER_ADDR_3
# if defined(DRIVER_ADDR_3)
IS31FL3733_update_led_control_registers(DRIVER_ADDR_3, 2);
# endif
# ifdef DRIVER_ADDR_4
# if defined(DRIVER_ADDR_4)
IS31FL3733_update_led_control_registers(DRIVER_ADDR_4, 3);
# endif
# endif
# endif
# elif defined(IS31FL3737)
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);
# endif
# else
# elif defined(IS31FL3741)
IS31FL3741_update_led_control_registers(DRIVER_ADDR_1, 0);
# endif
}
# ifdef IS31FL3731
# if defined(IS31FL3731)
static void flush(void) {
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);
# endif
# ifdef DRIVER_ADDR_3
# if defined(DRIVER_ADDR_3)
IS31FL3731_update_pwm_buffers(DRIVER_ADDR_3, 2);
# endif
# ifdef DRIVER_ADDR_4
# if defined(DRIVER_ADDR_4)
IS31FL3731_update_pwm_buffers(DRIVER_ADDR_4, 3);
# endif
# endif
# endif
}
@ -137,17 +153,18 @@ const rgb_matrix_driver_t rgb_matrix_driver = {
.set_color = IS31FL3731_set_color,
.set_color_all = IS31FL3731_set_color_all,
};
# elif defined(IS31FL3733)
static void flush(void) {
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);
# endif
# ifdef DRIVER_ADDR_3
# if defined(DRIVER_ADDR_3)
IS31FL3733_update_pwm_buffers(DRIVER_ADDR_3, 2);
# endif
# ifdef DRIVER_ADDR_4
# if defined(DRIVER_ADDR_4)
IS31FL3733_update_pwm_buffers(DRIVER_ADDR_4, 3);
# endif
# endif
# endif
}
@ -157,10 +174,11 @@ const rgb_matrix_driver_t rgb_matrix_driver = {
.set_color = IS31FL3733_set_color,
.set_color_all = IS31FL3733_set_color_all,
};
# elif defined(IS31FL3737)
static void flush(void) {
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);
# endif
}
@ -171,10 +189,11 @@ const rgb_matrix_driver_t rgb_matrix_driver = {
.set_color = IS31FL3737_set_color,
.set_color_all = IS31FL3737_set_color_all,
};
# else
# elif defined(IS31FL3741)
static void flush(void) {
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);
# endif
}
@ -189,17 +208,19 @@ const rgb_matrix_driver_t rgb_matrix_driver = {
#elif defined(AW20216)
# include "spi_master.h"
static void init(void) {
spi_init();
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);
# endif
}
static void flush(void) {
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);
# endif
}