From 9131b169388dc1ba63a0ba24feb64acaf8a8b1cf Mon Sep 17 00:00:00 2001 From: Vitja Makarov Date: Wed, 2 Sep 2009 12:03:37 +0000 Subject: 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 --- firmware/target/arm/tcc77x/iaudio7/button-iaudio7.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'firmware/target') 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; -- cgit v1.2.3