diff options
Diffstat (limited to 'firmware/target/arm/s3c2440/gigabeat-fx/button-meg-fx.c')
-rw-r--r-- | firmware/target/arm/s3c2440/gigabeat-fx/button-meg-fx.c | 10 |
1 files changed, 7 insertions, 3 deletions
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) | |||
77 | static int lastbutton; | 77 | static int lastbutton; |
78 | unsigned short remote_adc; | 78 | unsigned short remote_adc; |
79 | int btn = BUTTON_NONE; | 79 | int btn = BUTTON_NONE; |
80 | #ifndef BOOTLOADER | ||
80 | bool hold_button_old; | 81 | bool hold_button_old; |
82 | #endif | ||
81 | 83 | ||
82 | /* normal buttons */ | 84 | /* normal buttons */ |
85 | #ifndef BOOTLOADER | ||
83 | hold_button_old = hold_button; | 86 | hold_button_old = hold_button; |
87 | #endif | ||
84 | hold_button = button_hold(); | 88 | hold_button = button_hold(); |
85 | 89 | ||
86 | #ifndef BOOTLOADER | 90 | #ifndef BOOTLOADER |
@@ -121,7 +125,7 @@ int button_read_device(void) | |||
121 | { | 125 | { |
122 | btn |= buttons; | 126 | btn |= buttons; |
123 | } | 127 | } |
124 | 128 | ||
125 | /* the touchpad - only watch the lines we actually read */ | 129 | /* the touchpad - only watch the lines we actually read */ |
126 | touchpad = GPJDAT & touchpad_mask; | 130 | touchpad = GPJDAT & touchpad_mask; |
127 | 131 | ||
@@ -151,7 +155,7 @@ int button_read_device(void) | |||
151 | btn |= BUTTON_LEFT; | 155 | btn |= BUTTON_LEFT; |
152 | 156 | ||
153 | } | 157 | } |
154 | 158 | ||
155 | /* the cradle buttons */ | 159 | /* the cradle buttons */ |
156 | buttons = ~GPFDAT & 0xc0; | 160 | buttons = ~GPFDAT & 0xc0; |
157 | if (buttons) | 161 | if (buttons) |
@@ -163,7 +167,7 @@ int button_read_device(void) | |||
163 | btn |= BUTTON_POWER; | 167 | btn |= BUTTON_POWER; |
164 | buttonlight_on(); | 168 | buttonlight_on(); |
165 | } | 169 | } |
166 | 170 | ||
167 | return btn; | 171 | return btn; |
168 | } | 172 | } |
169 | 173 | ||