diff options
author | tmk <tmk@users.noreply.github.com> | 2014-04-09 03:02:53 +0200 |
---|---|---|
committer | tmk <tmk@users.noreply.github.com> | 2014-04-09 03:02:53 +0200 |
commit | 894a387d1fd8c823b5339e524e1f9336601ce2ef (patch) | |
tree | 3d6f83a71ffe03a2855046de58ba7ae9095f0733 /common/backlight.c | |
parent | 5c63751790bca2d7e0c6f368bd446db8fe671848 (diff) | |
parent | 589d99b448e6085513799fbb183f6389d4df408d (diff) | |
download | qmk_firmware-894a387d1fd8c823b5339e524e1f9336601ce2ef.tar.gz qmk_firmware-894a387d1fd8c823b5339e524e1f9336601ce2ef.tar.xz |
Merge pull request #110 from xauser/master
Enhanced Backlight Support
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); +} |