diff options
| author | Rafaël Carré <rafael.carre@gmail.com> | 2010-05-20 23:15:56 +0000 |
|---|---|---|
| committer | Rafaël Carré <rafael.carre@gmail.com> | 2010-05-20 23:15:56 +0000 |
| commit | 26c8eebe4ff447349b4980683739c632c84e2f05 (patch) | |
| tree | 7277258d8bb1fb283e26ebc37c89d6fed7e1c6b1 | |
| parent | 59462a8bf82aa453f09e85feb607555a582625f4 (diff) | |
| download | rockbox-26c8eebe4ff447349b4980683739c632c84e2f05.zip rockbox-26c8eebe4ff447349b4980683739c632c84e2f05.tar.gz rockbox-26c8eebe4ff447349b4980683739c632c84e2f05.tar.bz2 rockbox-26c8eebe4ff447349b4980683739c632c84e2f05.tar.xz | |
Clipv1: cosmetics
Move code not defined for bootloader under a single preprocessor check
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26219 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | firmware/target/arm/as3525/sansa-clip/button-clip.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/firmware/target/arm/as3525/sansa-clip/button-clip.c b/firmware/target/arm/as3525/sansa-clip/button-clip.c index 53ebfa1..a64fddb 100644 --- a/firmware/target/arm/as3525/sansa-clip/button-clip.c +++ b/firmware/target/arm/as3525/sansa-clip/button-clip.c @@ -23,7 +23,7 @@ #include "system.h" #include "button-target.h" #include "as3525.h" -#ifndef BOOTLOADER +#ifndef BOOTLOADER /* backlight on hold handling */ #include "backlight.h" #endif @@ -138,13 +138,13 @@ int button_read_device(void) bool button_hold(void) { -#ifndef BOOTLOADER - static bool hold_button_old = false; -#endif bool hold_button = (GPIOA_PIN(3) != 0); #ifndef BOOTLOADER - /* light handling */ + /* backlight handling */ + + static bool hold_button_old = false; + if (hold_button != hold_button_old) { hold_button_old = hold_button; |