diff options
author | Rob Purchase <shotofadds@rockbox.org> | 2009-07-22 22:59:08 +0000 |
---|---|---|
committer | Rob Purchase <shotofadds@rockbox.org> | 2009-07-22 22:59:08 +0000 |
commit | 07a6aac401ab28c4beb066072d7e6786148fd57a (patch) | |
tree | 1a49023f743f56118713fc146d93a144bc6a5151 | |
parent | 9f828fd522493d8ca0ab43abbdc011b4866c69ae (diff) | |
download | rockbox-07a6aac401ab28c4beb066072d7e6786148fd57a.tar.gz rockbox-07a6aac401ab28c4beb066072d7e6786148fd57a.zip |
D2: Notify the backlight driver when the HOLD button is toggled. Fixes FS#10451.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22007 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | firmware/target/arm/tcc780x/cowond2/button-cowond2.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/firmware/target/arm/tcc780x/cowond2/button-cowond2.c b/firmware/target/arm/tcc780x/cowond2/button-cowond2.c index 290058b78a..6ff87dd49c 100644 --- a/firmware/target/arm/tcc780x/cowond2/button-cowond2.c +++ b/firmware/target/arm/tcc780x/cowond2/button-cowond2.c | |||
@@ -103,9 +103,22 @@ int button_read_device(int *data) | |||
103 | { | 103 | { |
104 | int btn = BUTTON_NONE; | 104 | int btn = BUTTON_NONE; |
105 | int adc; | 105 | int adc; |
106 | *data = 0; | 106 | |
107 | static bool hold_button = false; | ||
108 | bool hold_button_old; | ||
107 | 109 | ||
108 | if (button_hold()) return BUTTON_NONE; | 110 | *data = 0; |
111 | |||
112 | hold_button_old = hold_button; | ||
113 | hold_button = button_hold(); | ||
114 | |||
115 | #ifndef BOOTLOADER | ||
116 | if (hold_button != hold_button_old) | ||
117 | backlight_hold_changed(hold_button); | ||
118 | #endif | ||
119 | |||
120 | if (hold_button) | ||
121 | return BUTTON_NONE; | ||
109 | 122 | ||
110 | if (GPIOB & 0x4) | 123 | if (GPIOB & 0x4) |
111 | { | 124 | { |