Skip to content

Commit

Permalink
Migrate RGB Matrix config to info.json (qmk#22998)
Browse files Browse the repository at this point in the history
  • Loading branch information
zvecr authored and nuess0r committed Sep 8, 2024
1 parent d905246 commit 549fea5
Show file tree
Hide file tree
Showing 173 changed files with 429 additions and 1,408 deletions.
14 changes: 0 additions & 14 deletions keyboards/keychron/c1_pro/ansi/rgb/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,10 @@
#define SNLED27351_I2C_ADDRESS_1 SNLED27351_I2C_ADDRESS_VDDIO
#define SNLED27351_I2C_ADDRESS_2 SNLED27351_I2C_ADDRESS_GND

/* RGB Matrix Configuration */
#define DRIVER_1_LED_TOTAL 49
#define DRIVER_2_LED_TOTAL 39
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)

#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 RGB_MATRIX_SLEEP

/* Enable caps_lock, win os and mac os indicator */
#define CAPS_MAC_WIN_LED_INDEX 63

// RGB Matrix Animation modes. Explicitly enabled
// For full list of effects, see:
// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_MATRIX_KEYPRESSES
3 changes: 2 additions & 1 deletion keyboards/keychron/c1_pro/ansi/rgb/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@
{"matrix":[5, 14], "flags":1, "x":198, "y":64},
{"matrix":[5, 15], "flags":1, "x":211, "y":64},
{"matrix":[4, 14], "flags":1, "x":224, "y":64}
]
],
"sleep": true
}
}
14 changes: 0 additions & 14 deletions keyboards/keychron/c2_pro/ansi/rgb/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,8 @@
#define SNLED27351_CURRENT_TUNE \
{ 0xAA, 0xAA, 0x56, 0xAA, 0xAA, 0x56, 0xAA, 0xAA, 0x56, 0xAA, 0xAA, 0x56 }

/* RGB Matrix Configuration */
#define DRIVER_1_LED_TOTAL 60
#define DRIVER_2_LED_TOTAL 48
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)

/* 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 RGB_MATRIX_SLEEP

// RGB Matrix Animation modes. Explicitly enabled
// For full list of effects, see:
// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_MATRIX_KEYPRESSES
3 changes: 2 additions & 1 deletion keyboards/keychron/c2_pro/ansi/rgb/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@
{"matrix":[5, 16], "flags":1, "x":180, "y":64},
{"matrix":[5, 17], "flags":4, "x":198, "y":64},
{"matrix":[5, 18], "flags":4, "x":214, "y":64}
]
],
"sleep": true
}
}
3 changes: 0 additions & 3 deletions keyboards/keychron/q0/base/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,5 @@
/* RGB Matrix Driver Configuration */
#define SNLED27351_I2C_ADDRESS_1 SNLED27351_I2C_ADDRESS_GND

/* RGB Matrix Configuration */
#define RGB_MATRIX_LED_COUNT 21

/* Enable num-lock LED */
#define NUM_LOCK_LED_INDEX 4
6 changes: 0 additions & 6 deletions keyboards/keychron/q0/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,3 @@
#pragma once

#define SNLED27351_CURRENT_TUNE { 0xFF, 0xFF, 0x70, 0xFF, 0xFF, 0x70, 0xFF, 0xFF, 0x70, 0xFF, 0xFF, 0x70 }

/* turn off effects when suspended */
#define RGB_MATRIX_SLEEP

#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
3 changes: 2 additions & 1 deletion keyboards/keychron/q0/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
"splash": true,
"typing_heatmap": true
},
"driver": "snled27351"
"driver": "snled27351",
"sleep": true
},
"url": "https://github.com/Keychron",
"usb": {
Expand Down
3 changes: 0 additions & 3 deletions keyboards/keychron/q0/plus/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
/* RGB Matrix Driver Configuration */
#define SNLED27351_I2C_ADDRESS_1 SNLED27351_I2C_ADDRESS_VDDIO

/* RGB Matrix Configuration */
#define RGB_MATRIX_LED_COUNT 26

#define SNLED27351_PHASE_CHANNEL SNLED27351_SCAN_PHASE_9_CHANNEL

/* Encoder Configuration*/
Expand Down
5 changes: 0 additions & 5 deletions keyboards/keychron/q10/ansi_encoder/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@

#pragma once

/* RGB Matrix Configuration */
#define DRIVER_1_LED_TOTAL 47
#define DRIVER_2_LED_TOTAL 41
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)

/* Encoder Configuration */
#define ENCODER_DEFAULT_POS 0x3

Expand Down
3 changes: 0 additions & 3 deletions keyboards/keychron/q10/ansi_encoder/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
"pid": "0x01A1",
"device_version": "1.0.0"
},
"rgb_matrix": {
"driver": "snled27351"
},
"encoder": {
"rotary": [
{"pin_a": "A10", "pin_b": "A8"}
Expand Down
55 changes: 0 additions & 55 deletions keyboards/keychron/q10/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,61 +44,6 @@
#define SNLED27351_CURRENT_TUNE \
{ 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A, 0x98, 0x98, 0x4A }

/* Disable RGB lighting when PC is in suspend */
#define RGB_MATRIX_SLEEP

/* EEPROM Driver Configuration */
#define WEAR_LEVELING_LOGICAL_SIZE 2048
#define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2)

// RGB Matrix Animation modes. Explicitly enabled
// For full list of effects, see:
// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
// #define ENABLE_RGB_MATRIX_ALPHAS_MODS
// #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
// #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
#define ENABLE_RGB_MATRIX_BREATHING
// #define ENABLE_RGB_MATRIX_BAND_SAT
// #define ENABLE_RGB_MATRIX_BAND_VAL
// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
#define ENABLE_RGB_MATRIX_CYCLE_ALL
#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
#define ENABLE_RGB_MATRIX_DUAL_BEACON
#define ENABLE_RGB_MATRIX_RAINBOW_BEACON
// #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
// #define ENABLE_RGB_MATRIX_RAINDROPS
#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
// #define ENABLE_RGB_MATRIX_HUE_BREATHING
// #define ENABLE_RGB_MATRIX_HUE_PENDULUM
// #define ENABLE_RGB_MATRIX_HUE_WAVE
#define ENABLE_RGB_MATRIX_PIXEL_RAIN
// #define ENABLE_RGB_MATRIX_PIXEL_FLOW
// #define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined
#define ENABLE_RGB_MATRIX_TYPING_HEATMAP
#define ENABLE_RGB_MATRIX_DIGITAL_RAIN
// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE
// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
#define ENABLE_RGB_MATRIX_SPLASH
// #define ENABLE_RGB_MATRIX_MULTISPLASH
#define ENABLE_RGB_MATRIX_SOLID_SPLASH
// #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH

#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_MATRIX_KEYPRESSES
27 changes: 27 additions & 0 deletions keyboards/keychron/q10/info.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
{
"dip_switch": {
"matrix_grid": [ [5, 5] ]
},
"rgb_matrix": {
"animations": {
"breathing": true,
"band_spiral_val": true,
"cycle_all": true,
"cycle_left_right": true,
"cycle_up_down": true,
"rainbow_moving_chevron": true,
"cycle_out_in": true,
"cycle_out_in_dual": true,
"cycle_pinwheel": true,
"cycle_spiral": true,
"dual_beacon": true,
"rainbow_beacon": true,
"jellybean_raindrops": true,
"pixel_rain": true,
"typing_heatmap": true,
"digital_rain": true,
"solid_reactive_simple": true,
"solid_reactive_multiwide": true,
"solid_reactive_multinexus": true,
"splash": true,
"solid_splash": true
},
"driver": "snled27351",
"sleep": true
}
}
5 changes: 0 additions & 5 deletions keyboards/keychron/q10/iso_encoder/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@

#pragma once

/* RGB Matrix Configuration */
#define DRIVER_1_LED_TOTAL 47
#define DRIVER_2_LED_TOTAL 42
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)

/* Encoder Configuration */
#define ENCODER_DEFAULT_POS 0x3

Expand Down
3 changes: 0 additions & 3 deletions keyboards/keychron/q10/iso_encoder/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
"pid": "0x01A3",
"device_version": "1.0.0"
},
"rgb_matrix": {
"driver": "snled27351"
},
"encoder": {
"rotary": [
{"pin_a": "A10", "pin_b": "A8"}
Expand Down
3 changes: 0 additions & 3 deletions keyboards/keychron/q11/ansi_encoder/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,5 @@

#pragma once

/* RGB Matrix Configuration */
#define RGB_MATRIX_LED_COUNT 89

/* Enable caps-lock LED */
#define CAPS_LOCK_LED_INDEX 23
9 changes: 0 additions & 9 deletions keyboards/keychron/q11/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,6 @@
/* Encoder Configuration */
#define ENCODER_DEFAULT_POS 0x3

/* Disable RGB lighting when PC is in suspend */
#define RGB_MATRIX_SLEEP

// RGB Matrix Animation modes. Explicitly enabled
// For full list of effects, see:
// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_MATRIX_KEYPRESSES

// Needed as the master side could enter slave state during poweron
// of host, due to missing VUSB detection.
#define SPLIT_WATCHDOG_ENABLE
3 changes: 2 additions & 1 deletion keyboards/keychron/q11/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@
"solid_reactive_multinexus": true,
"splash": true,
"solid_splash": true
}
},
"sleep": true
},
"layouts": {
"LAYOUT_91_ansi": {
Expand Down
3 changes: 0 additions & 3 deletions keyboards/keychron/q11/iso_encoder/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,5 @@

#pragma once

/* RGB Matrix Configuration */
#define RGB_MATRIX_LED_COUNT 90

/* Enable caps-lock LED */
#define CAPS_LOCK_LED_INDEX 23
5 changes: 0 additions & 5 deletions keyboards/keychron/q12/ansi_encoder/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@

#pragma once

/* RGB Matrix Configuration */
#define DRIVER_1_LED_TOTAL 56
#define DRIVER_2_LED_TOTAL 46
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)

#define ENCODER_DEFAULT_POS 0x3

/* Enable caps-lock LED */
Expand Down
3 changes: 0 additions & 3 deletions keyboards/keychron/q12/ansi_encoder/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
"pid": "0x01D1",
"device_version": "1.0.0"
},
"rgb_matrix": {
"driver": "snled27351"
},
"encoder": {
"rotary": [
{"pin_a": "A2", "pin_b": "C14"}
Expand Down
59 changes: 0 additions & 59 deletions keyboards/keychron/q12/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,62 +40,3 @@
{ 0xAD, 0xAD, 0x55, 0xAD, 0xAD, 0x55, 0xAD, 0xAD, 0x55, 0xAD, 0xAD, 0x55 }

#define SCAN_COUNT_MAX 100

/* turn off effects when suspended */
#define RGB_MATRIX_SLEEP

/* EEPROM Driver Configuration */
// #define WEAR_LEVELING_LOGICAL_SIZE 2048 // default
// #define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2) // default

// RGB Matrix Animation modes. Explicitly enabled
// For full list of effects, see:
// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
// #define ENABLE_RGB_MATRIX_ALPHAS_MODS
// #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
// #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
#define ENABLE_RGB_MATRIX_BREATHING
// #define ENABLE_RGB_MATRIX_BAND_SAT
// #define ENABLE_RGB_MATRIX_BAND_VAL
// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
#define ENABLE_RGB_MATRIX_CYCLE_ALL
#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
#define ENABLE_RGB_MATRIX_DUAL_BEACON
#define ENABLE_RGB_MATRIX_RAINBOW_BEACON
// #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
// #define ENABLE_RGB_MATRIX_RAINDROPS
#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
// #define ENABLE_RGB_MATRIX_HUE_BREATHING
// #define ENABLE_RGB_MATRIX_HUE_PENDULUM
// #define ENABLE_RGB_MATRIX_HUE_WAVE
#define ENABLE_RGB_MATRIX_PIXEL_RAIN
// #define ENABLE_RGB_MATRIX_PIXEL_FLOW
// #define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined
#define ENABLE_RGB_MATRIX_TYPING_HEATMAP
#define ENABLE_RGB_MATRIX_DIGITAL_RAIN
// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE
// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
#define ENABLE_RGB_MATRIX_SPLASH
// #define ENABLE_RGB_MATRIX_MULTISPLASH
#define ENABLE_RGB_MATRIX_SOLID_SPLASH
// #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH

#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_MATRIX_KEYPRESSES
Loading

0 comments on commit 549fea5

Please sign in to comment.