1
0
Fork 0

LED Matrix: decouple from Backlight (#12054)

This commit is contained in:
Ryan 2021-03-08 16:55:00 +11:00 committed by GitHub
parent b0069c5c05
commit 9155b59e1a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 45 additions and 27 deletions

View file

@ -45,10 +45,6 @@ led_eeconfig_t led_matrix_eeconfig;
# define LED_DISABLE_WHEN_USB_SUSPENDED false
#endif
#ifndef EECONFIG_LED_MATRIX
# define EECONFIG_LED_MATRIX EECONFIG_RGBLIGHT
#endif
#if !defined(LED_MATRIX_MAXIMUM_BRIGHTNESS) || LED_MATRIX_MAXIMUM_BRIGHTNESS > 255
# define LED_MATRIX_MAXIMUM_BRIGHTNESS 255
#endif
@ -135,7 +131,7 @@ void led_matrix_set_suspend_state(bool state) { g_suspend_state = state; }
void led_matrix_all_off(void) { led_matrix_set_index_value_all(0); }
// Uniform brightness
void led_matrix_uniform_brightness(void) { led_matrix_set_index_value_all(LED_MATRIX_MAXIMUM_BRIGHTNESS / BACKLIGHT_LEVELS * led_matrix_eeconfig.val); }
void led_matrix_uniform_brightness(void) { led_matrix_set_index_value_all(led_matrix_eeconfig.val); }
void led_matrix_custom(void) {}
@ -344,5 +340,3 @@ void led_matrix_set_value(uint8_t val) {
led_matrix_set_value_noeeprom(val);
eeconfig_update_led_matrix(led_matrix_eeconfig.raw);
}
void backlight_set(uint8_t val) { led_matrix_set_value(val); }