From 26c8eebe4ff447349b4980683739c632c84e2f05 Mon Sep 17 00:00:00 2001 From: Rafaël Carré Date: Thu, 20 May 2010 23:15:56 +0000 Subject: 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 --- firmware/target/arm/as3525/sansa-clip/button-clip.c | 10 +++++----- 1 file 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 53ebfa1295..a64fddb564 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; -- cgit v1.2.3