1
0
Fork 0

Move backlight config to data driven, part 1 (#19887)

This commit is contained in:
Ryan 2023-02-21 12:05:40 +11:00 committed by GitHub
parent 4b69225c22
commit 9c0ce80d7e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
128 changed files with 110 additions and 131 deletions

View file

@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// Add backwards compatibility for existing keymaps
static inline void backlight_set_value(uint8_t index, uint8_t level) {
static const uint8_t backlight_pins[BACKLIGHT_LED_COUNT] = BACKLIGHT_PINS;
static const uint8_t backlight_pins[] = BACKLIGHT_PINS;
if (level) {
setPinOutput(backlight_pins[index]);
} else {

View file

@ -30,8 +30,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGBLIGHT_EFFECT_TWINKLE
#define RGBLIGHT_LIMIT_VAL 200
#undef BACKLIGHT_PIN
#define BACKLIGHT_PINS { C2, C7, D5, D6, B0 }
#define BACKLIGHT_LED_COUNT 5
#define BACKLIGHT_LEVELS 10

View file

@ -8,6 +8,9 @@
"pid": "0x2328",
"device_version": "2.0.5"
},
"backlight": {
"pins": ["C2", "C7", "D5", "D6", "B0"]
},
"bootmagic": {
"matrix": [0, 1]
},