diff options
Diffstat (limited to 'common/backlight.c')
-rw-r--r-- | common/backlight.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/common/backlight.c b/common/backlight.c index 00dc04a07..558ad9b01 100644 --- a/common/backlight.c +++ b/common/backlight.c @@ -75,3 +75,11 @@ void backlight_step(void) dprintf("backlight step: %u\n", backlight_config.level); backlight_set(backlight_config.level); } + +void backlight_level(uint8_t level) +{ + backlight_config.level ^= level; + backlight_config.enable = !!backlight_config.level; + eeconfig_write_backlight(backlight_config.raw); + backlight_set(backlight_config.level); +} |