From 4a3d04654580b1771fcda3492491843d5eac10ad Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Tue, 13 Oct 2020 13:06:18 -0400 Subject: Fix a pile of yellow in the bootloader Change-Id: Ia89a33bbb13683566e421ac2a002baa20cdb07de --- firmware/target/arm/s3c2440/gigabeat-fx/button-meg-fx.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'firmware/target/arm/s3c2440/gigabeat-fx/button-meg-fx.c') diff --git a/firmware/target/arm/s3c2440/gigabeat-fx/button-meg-fx.c b/firmware/target/arm/s3c2440/gigabeat-fx/button-meg-fx.c index 1d13a21b22..0185186008 100644 --- a/firmware/target/arm/s3c2440/gigabeat-fx/button-meg-fx.c +++ b/firmware/target/arm/s3c2440/gigabeat-fx/button-meg-fx.c @@ -77,10 +77,14 @@ int button_read_device(void) static int lastbutton; unsigned short remote_adc; int btn = BUTTON_NONE; +#ifndef BOOTLOADER bool hold_button_old; +#endif /* normal buttons */ +#ifndef BOOTLOADER hold_button_old = hold_button; +#endif hold_button = button_hold(); #ifndef BOOTLOADER @@ -121,7 +125,7 @@ int button_read_device(void) { btn |= buttons; } - + /* the touchpad - only watch the lines we actually read */ touchpad = GPJDAT & touchpad_mask; @@ -151,7 +155,7 @@ int button_read_device(void) btn |= BUTTON_LEFT; } - + /* the cradle buttons */ buttons = ~GPFDAT & 0xc0; if (buttons) @@ -163,7 +167,7 @@ int button_read_device(void) btn |= BUTTON_POWER; buttonlight_on(); } - + return btn; } -- cgit v1.2.3