Migrate LED Matrix config to info.json (#22792)

This commit is contained in:
Joel Challis 2024-01-01 01:33:20 +00:00 committed by GitHub
parent ef356ddee6
commit 709d07aebc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 157 additions and 228 deletions

View file

@ -21,26 +21,11 @@
/* LED Matrix Driver Configuration */
#define SNLED27351_I2C_ADDRESS_1 SNLED27351_I2C_ADDRESS_GND
/* LED Matrix Configuration */
#define LED_MATRIX_LED_COUNT 90
#define SNLED27351_PHASE_CHANNEL SNLED27351_SCAN_PHASE_9_CHANNEL
/* Set led driver current */
#define SNLED27351_CURRENT_TUNE \
{ 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44 }
/* turn off effects when suspended */
#define LED_MATRIX_SLEEP
/* Enbale caps_lcok, win os and mac os indicator */
#define CAPS_LOCK_LED_INDEX 63
#define MAC_LOCK_LED_INDEX 64
#define WIN_LOCK_LED_INDEX 65
// LED Matrix Animation modes. Explicitly enabled
// For full list of effects, see:
// https://docs.qmk.fm/#/feature_led_matrix?id=led-matrix-effects
// #if defined(LED_MATRIX_KEYPRESSES) || defined(LED_MATRIX_KEYRELEASES)
#define LED_MATRIX_KEYPRESSES
#define LED_MATRIX_KEYRELEASES

View file

@ -221,6 +221,8 @@
{"matrix":[5, 14], "flags":1, "x":198, "y":64},
{"matrix":[5, 15], "flags":1, "x":211, "y":64},
{"matrix":[3, 15], "flags":1, "x":224, "y":64}
]
],
"sleep": true,
"react_on_keyup": true
}
}

View file

@ -18,26 +18,11 @@
/* LED Matrix Driver Configuration */
#define SNLED27351_I2C_ADDRESS_1 SNLED27351_I2C_ADDRESS_GND
/* Set LED driver current */
#define SNLED27351_CURRENT_TUNE \
{ 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0 }
/* LED Matrix Configuration */
#define LED_MATRIX_LED_COUNT 108
/* Enable indicator LED*/
#define NUM_LED_INDEX 16
#define CAPS_LED_INDEX 17
#define MAC_LED_INDEX 18
#define WIN_LED_INDEX 19
/* turn off effects when suspended */
#define LED_MATRIX_SLEEP
// LED Matrix Animation modes. Explicitly enabled
// For full list of effects, see:
// https://docs.qmk.fm/#/feature_led_matrix?id=led-matrix-effects
// #if defined(LED_MATRIX_KEYPRESSES) || defined(LED_MATRIX_KEYRELEASES)
#define LED_MATRIX_KEYPRESSES
#define LED_MATRIX_KEYRELEASES

View file

@ -256,6 +256,8 @@
{"matrix":[5, 16], "flags":1, "x":180, "y":64},
{"matrix":[5, 17], "flags":4, "x":198, "y":64},
{"matrix":[5, 19], "flags":4, "x":214, "y":64}
]
],
"sleep": true,
"react_on_keyup": true
}
}

View file

@ -18,48 +18,10 @@
/* LED Matrix Driver Configuration */
#define SNLED27351_I2C_ADDRESS_1 SNLED27351_I2C_ADDRESS_GND
#define DRIVER_1_LED_TOTAL 84
#define LED_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL
#define SNLED27351_PHASE_CHANNEL SNLED27351_SCAN_PHASE_6_CHANNEL
#define SNLED27351_CURRENT_TUNE \
{ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80 } // 250mA
// { 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40 } // 127mA
/* Disable LED lighting when PC is in suspend */
#define LED_MATRIX_SLEEP
/* Enable caps-lock LED */
#define CAPS_LOCK_LED_INDEX 46
// LED Matrix Animation modes. Explicitly enabled
// For full list of effects, see:
// https://docs.qmk.fm/#/feature_led_matrix?id=led-matrix-effects
#define ENABLE_LED_MATRIX_NONE
#define ENABLE_LED_MATRIX_SOLID // Static single val, no speed support
// #define ENABLE_LED_MATRIX_ALPHAS_MODS // Static dual val, speed is val for LEDs marked as modifiers
#define ENABLE_LED_MATRIX_BREATHING // Cycling brightness animation
// #define ENABLE_LED_MATRIX_BAND // Band fading brightness scrolling left to right
#define ENABLE_LED_MATRIX_BAND_PINWHEEL // 3 blade spinning pinwheel fades brightness
#define ENABLE_LED_MATRIX_BAND_SPIRAL // Spinning spiral fades brightness
#define ENABLE_LED_MATRIX_CYCLE_LEFT_RIGHT // Full gradient scrolling left to right
#define ENABLE_LED_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom
#define ENABLE_LED_MATRIX_CYCLE_OUT_IN // Full gradient scrolling out to in
#define ENABLE_LED_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard
// #if defined(LED_MATRIX_KEYPRESSES) || defined(LED_MATRIX_KEYRELEASES)
#define LED_MATRIX_KEYPRESSES
#define LED_MATRIX_KEYRELEASES
#define ENABLE_LED_MATRIX_SOLID_REACTIVE_SIMPLE // Pulses keys hit then fades out
// #define ENABLE_LED_MATRIX_SOLID_REACTIVE_WIDE // Value pulses near a single key hit then fades out
#define ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE // Value pulses near multiple key hits then fades out
#define ENABLE_LED_MATRIX_SOLID_REACTIVE_CROSS // Value pulses the same column and row of a single key hit then fades out
// #define ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS // Value pulses the same column and row of multiple key hits then fades out
// #define ENABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS // Value pulses away on the same column and row of a single key hit then fades out
// #define ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS // Value pulses away on the same column and row of multiple key hits then fades out
#define ENABLE_LED_MATRIX_SOLID_SPLASH // Value pulses away from a single key hit then fades out
#define ENABLE_LED_MATRIX_SOLID_MULTISPLASH // Value pulses away from multiple key hits then fades out
// #endif
#define ENABLE_LED_MATRIX_WAVE_LEFT_RIGHT // Sine wave scrolling from left to right
#define ENBALE_LED_MATRIX_WAVE_UP_DOWN // Sine wave scrolling from up to down
// #define ENABLE_LED_MATRIX_EFFECT_MAX

View file

@ -9,7 +9,31 @@
"device_version": "1.0.0"
},
"led_matrix": {
"driver": "snled27351"
"animations":{
"alphas_mods": true,
"breathing": true,
"band": true,
"band_pinwheel": true,
"band_spiral": true,
"cycle_left_right": true,
"cycle_up_down": true,
"cycle_out_in": true,
"dual_beacon": true,
"solid_reactive_simple": true,
"solid_reactive_wide": true,
"solid_reactive_multiwide": true,
"solid_reactive_cross": true,
"solid_reactive_multicross": true,
"solid_reactive_nexus": true,
"solid_reactive_multinexus": true,
"splash": true,
"multisplash": true,
"wave_left_right": true,
"wave_up_down": true
},
"driver": "snled27351",
"sleep": true,
"react_on_keyup": true
},
"matrix_pins": {
"cols": ["A10", "A9", "A8", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14"],