New macro: ACTION_BACKLIGHT_LEVEL(level)
To have full control of the backlight level.
This commit is contained in:
parent
5c63751790
commit
589d99b448
8 changed files with 89 additions and 24 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue