diff options
author | Vitja Makarov <vitja.makarov@gmail.com> | 2009-09-02 12:03:37 +0000 |
---|---|---|
committer | Vitja Makarov <vitja.makarov@gmail.com> | 2009-09-02 12:03:37 +0000 |
commit | 9131b169388dc1ba63a0ba24feb64acaf8a8b1cf (patch) | |
tree | 1a8d8a5343d958e9f0e10e42cc0a51f82fda5869 /firmware/target | |
parent | 8f76e7ff8f512541b80818a175525f84b943e39d (diff) |
i7: Notify the backlight driver when the HOLD button is toggled, same as D2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22607 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target')
-rw-r--r-- | firmware/target/arm/tcc77x/iaudio7/button-iaudio7.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/firmware/target/arm/tcc77x/iaudio7/button-iaudio7.c b/firmware/target/arm/tcc77x/iaudio7/button-iaudio7.c index 3aad4f75a4..abf31b4feb 100644 --- a/firmware/target/arm/tcc77x/iaudio7/button-iaudio7.c +++ b/firmware/target/arm/tcc77x/iaudio7/button-iaudio7.c @@ -21,6 +21,7 @@ #include "config.h" #include "cpu.h" #include "button.h" +#include "backlight.h" #include "adc.h" #include "button-target.h" @@ -42,10 +43,21 @@ void button_init_device(void) int button_read_device(void) { + static bool hold_button = false; + bool hold_button_old; + int btn = BUTTON_NONE; int adc; int sensor; + hold_button_old = hold_button; + hold_button = button_hold(); + +#ifndef BOOTLOADER + if (hold_button != hold_button_old) + backlight_hold_changed(hold_button); +#endif + if (button_hold()) return BUTTON_NONE; |