Skip to content

Commit

Permalink
sonix keyboards: migrate more RGB configs to data driven
Browse files Browse the repository at this point in the history
  • Loading branch information
dexter93 committed Jan 2, 2024
1 parent a6bcc9c commit 284c7b4
Show file tree
Hide file tree
Showing 20 changed files with 37 additions and 83 deletions.
7 changes: 1 addition & 6 deletions keyboards/czc/dwarf/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,4 @@

/* RGB matrix configuration can't be fully expressed in JSON as of now */
#define RGB_MATRIX_LED_COUNT 87
#define SN32_RGB_MATRIX_ROW_PINS {C0, C1, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, B13, D3, B15, B14}

#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended

#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_MATRIX_KEYPRESSES
#define SN32_RGB_MATRIX_ROW_PINS {C0, C1, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, B13, D3, B15, B14}
4 changes: 3 additions & 1 deletion keyboards/czc/dwarf/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,8 @@
{"matrix": [5, 14],"flags": 1,"x":198, "y":64},
{"matrix": [5, 15],"flags": 1,"x":211, "y":64},
{"matrix": [5, 16],"flags": 1,"x":224, "y":64}
]
],
"react_on_keyup": true,
"sleep": true
}
}
9 changes: 1 addition & 8 deletions keyboards/designedbygg/berserker/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,4 @@

/* RGB LED Config */
#define SN32_RGB_MATRIX_ROW_PINS { C0, C1, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, B6, B7, B8, B9, B10, B11 }
#define RGB_MATRIX_LED_COUNT (88)

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

/* RGB Matrix Effects */
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_LED_COUNT (88)
4 changes: 3 additions & 1 deletion keyboards/designedbygg/berserker/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,8 @@
{"matrix": [5, 14],"flags": 1,"x":198, "y":64},
{"matrix": [5, 15],"flags": 1,"x":211, "y":64},
{"matrix": [5, 16],"flags": 1,"x":224, "y":64},
]
],
"react_on_keyup": true,
"sleep": true
}
}
9 changes: 1 addition & 8 deletions keyboards/designedbygg/ironclad/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,4 @@
#define GPIO_INPUT_PIN_DELAY 0

/* Debug options */
#define DEBUG_MATRIX_SCAN_RATE

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

/* RGB Matrix Effects */
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_MATRIX_KEYPRESSES
#define DEBUG_MATRIX_SCAN_RATE
4 changes: 3 additions & 1 deletion keyboards/designedbygg/ironclad/icl01/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,8 @@
{"matrix": [5, 16],"flags": 1,"x":180, "y":64},
{"matrix": [5, 18],"flags": 4,"x":198, "y":64},
{"matrix": [5, 19],"flags": 4,"x":214, "y":64}
]
],
"react_on_keyup": true,
"sleep": true
}
}
4 changes: 3 additions & 1 deletion keyboards/designedbygg/ironclad/icl03/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,9 @@
{"matrix": [5, 16],"flags": 1,"x":180, "y":64},
{"matrix": [5, 18],"flags": 4,"x":198, "y":64},
{"matrix": [5, 19],"flags": 4,"x":214, "y":64}
]
],
"react_on_keyup": true,
"sleep": true
}
}

10 changes: 1 addition & 9 deletions keyboards/flesports/fl980/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,4 @@
#define RGB_MATRIX_LED_COUNT 98
#define MATRIX_UNSELECT_DRIVE_HIGH
#define SN32_PWM_OUTPUT_ACTIVE_LEVEL SN32_PWM_OUTPUT_ACTIVE_HIGH
#define SN32_RGB_OUTPUT_ACTIVE_LEVEL SN32_RGB_OUTPUT_ACTIVE_HIGH

/* RGB Reactive Effects Toggle */
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_MATRIX_KEYPRESSES
//#define RGB_MATRIX_KEYRELEASES

/* Enable RGB sleep */
#define RGB_DISABLE_WHEN_USB_SUSPENDED
#define SN32_RGB_OUTPUT_ACTIVE_LEVEL SN32_RGB_OUTPUT_ACTIVE_HIGH
4 changes: 3 additions & 1 deletion keyboards/flesports/fl980/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,9 @@
{ "matrix":[5, 15], "flags":4, "x":173, "y":64 },
{ "matrix":[5, 16], "flags":4, "x":185, "y":64 },
{ "matrix":[5, 17], "flags":4, "x":200, "y":61 }
]
],
"react_on_keyup": true,
"sleep": true
},
"layouts": {
"LAYOUT_default": {
Expand Down
5 changes: 1 addition & 4 deletions keyboards/keychron/k2/rgb/v2/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,4 @@
#pragma once
#define SN32_RGB_MATRIX_ROW_PINS { C3, C1, C0, C6, C5, C4, C9, C8, C7, C12, C11, C10, B13, C14, C13, B14, B15, D3 }
#define DIP_SWITCH_PINS { D4, D5 }
#define WEAR_LEVELING_SN32_EMULATION_PAGE_COUNT 29
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_MATRIX_KEYPRESSES
#define RGB_DISABLE_WHEN_USB_SUSPENDED
#define WEAR_LEVELING_SN32_EMULATION_PAGE_COUNT 29
12 changes: 1 addition & 11 deletions keyboards/keychron/k4/rgb/v2/ansi/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,4 @@
#define DIP_SWITCH_PINS { D5, D6 }
#define RGB_MATRIX_LED_COUNT 100

/* 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_KEYPRESSES
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS

#define SN32_RGB_MATRIX_ROW_PINS { C3, C1, C0, C6, C5, C4, C9, C8, C7, C12, C11, C10, B13, C14, C13, B14, B15, D3 }

#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define SN32_RGB_MATRIX_ROW_PINS { C3, C1, C0, C6, C5, C4, C9, C8, C7, C12, C11, C10, B13, C14, C13, B14, B15, D3 }
2 changes: 2 additions & 0 deletions keyboards/keychron/k4/rgb/v2/ansi/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,8 @@
{ "matrix": [ 5, 16 ], "flags": 4, "x": 199, "y": 64 },
{ "matrix": [ 5, 17 ], "flags": 4, "x": 212, "y": 64 }
],
"react_on_keyup": true,
"sleep": true,

"animations": {
"gradient_up_down": true,
Expand Down
13 changes: 1 addition & 12 deletions keyboards/keychron/k4/rgb/v2/iso/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,4 @@
#define DIP_SWITCH_PINS { D5, D6 }
#define RGB_MATRIX_LED_COUNT 101

/* 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_KEYPRESSES
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS

#define SN32_RGB_MATRIX_ROW_PINS { C3, C1, C0, C6, C5, C4, C9, C8, C7, C12, C11, C10, B13, C14, C13, B14, B15, D3 }

#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended

#define SN32_RGB_MATRIX_ROW_PINS { C3, C1, C0, C6, C5, C4, C9, C8, C7, C12, C11, C10, B13, C14, C13, B14, B15, D3 }
2 changes: 2 additions & 0 deletions keyboards/keychron/k4/rgb/v2/iso/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,8 @@
{ "matrix": [ 5, 16 ], "flags": 4, "x": 199, "y": 64 },
{ "matrix": [ 5, 17 ], "flags": 4, "x": 212, "y": 64 }
],
"react_on_keyup": true,
"sleep": true,

"animations": {
"gradient_up_down": true,
Expand Down
6 changes: 1 addition & 5 deletions keyboards/keychron/k8/rgb/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,4 @@
#define DIP_SWITCH_PINS { D4, D5 }

// RGB LED Config
#define SN32_RGB_MATRIX_ROW_PINS { C3, C1, C0, C6, C5, C4, C9, C8, C7, C12, C11, C10, B13, C14, C13, B14, B15, D3 }

// RGB Matrix Effects
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_MATRIX_KEYPRESSES
#define SN32_RGB_MATRIX_ROW_PINS { C3, C1, C0, C6, C5, C4, C9, C8, C7, C12, C11, C10, B13, C14, C13, B14, B15, D3 }
4 changes: 3 additions & 1 deletion keyboards/keychron/k8/rgb/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@
"splash" : true,
"typing_heatmap" : true,
},
"driver": "sn32f24xb"
"driver": "sn32f24xb",
"react_on_keyup": true,
"sleep": true
},
"matrix_pins": {
"cols": [ "A8", "A9", "A10", "A11", "A12", "A13", "A14", "A15", "B0", "B1", "B2", "B3", "B4", "B5", "B6", "B7", "B8"],
Expand Down
9 changes: 1 addition & 8 deletions keyboards/redragon/k556/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,9 @@

#define SN32_RGB_MATRIX_ROW_PINS { C0, C1, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, B6, B7, B8, B9, B10, B11 }

/* Enable additional RGB effects */
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_MATRIX_KEYPRESSES

/* Configure the effects: */
#define RGB_MATRIX_TYPING_HEATMAP_DECREASE_DELAY_MS 50

/* Configure transistor logic for RGB matrix */
#define SN32_PWM_OUTPUT_ACTIVE_LEVEL SN32_PWM_OUTPUT_ACTIVE_HIGH
#define SN32_RGB_OUTPUT_ACTIVE_LEVEL SN32_RGB_OUTPUT_ACTIVE_LOW

/* Enable RGB sleep */
#define RGB_DISABLE_WHEN_USB_SUSPENDED
#define SN32_RGB_OUTPUT_ACTIVE_LEVEL SN32_RGB_OUTPUT_ACTIVE_LOW
4 changes: 3 additions & 1 deletion keyboards/redragon/k556/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,9 @@

{"matrix": [5, 18], "x": 19.5, "y": 5.25, "w": 2},
{"matrix": [5, 19], "x": 21.5, "y": 5.25}
]
],
"react_on_keyup": true,
"sleep": true
}
}
}
4 changes: 0 additions & 4 deletions keyboards/redragon/k630/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,5 @@
#define RGB_MATRIX_LED_COUNT 61
#define SN32_RGB_MATRIX_ROW_PINS { C4, C5, C6, C7, C8, C9, C10, C11, C12, B6, B7, B8, B9, B10, B11 }

/* Enable additional RGB effects */
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_MATRIX_KEYPRESSES

/* Configure the effects: */
#define RGB_MATRIX_TYPING_HEATMAP_DECREASE_DELAY_MS 50
4 changes: 3 additions & 1 deletion keyboards/redragon/k630/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,9 @@
{ "matrix":[4, 11], "x":11.25, "y":4, "w":1.25 },
{ "matrix":[4, 12], "x":12.5, "y":4, "w":1.25 },
{ "matrix":[4, 13], "x":13.75, "y":4, "w":1.25 }
]
],
"react_on_keyup": true,
"sleep": true
}
}
}

0 comments on commit 284c7b4

Please sign in to comment.