summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Bukat <marcin.bukat@gmail.com>2010-12-10 15:12:16 +0000
committerMarcin Bukat <marcin.bukat@gmail.com>2010-12-10 15:12:16 +0000
commit18accc018bc58b04d994e25a791702e88ef222e6 (patch)
treea7fe96155a9917ef04b128e3597f47ac109ab6e1
parent029f0d5223c2fd6b3d2e33b4285c6b0de7b4543c (diff)
downloadrockbox-18accc018bc58b04d994e25a791702e88ef222e6.tar.gz
rockbox-18accc018bc58b04d994e25a791702e88ef222e6.zip
HD300 - do not handle scrollstrip events when hold is on
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28782 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/target/coldfire/mpio/hd300/button-hd300.c41
1 files changed, 23 insertions, 18 deletions
diff --git a/firmware/target/coldfire/mpio/hd300/button-hd300.c b/firmware/target/coldfire/mpio/hd300/button-hd300.c
index 2b7add7820..8239b54e28 100644
--- a/firmware/target/coldfire/mpio/hd300/button-hd300.c
+++ b/firmware/target/coldfire/mpio/hd300/button-hd300.c
@@ -180,7 +180,14 @@ int button_read_device(void)
180#ifndef BOOTLOADER 180#ifndef BOOTLOADER
181 /* Only main hold affects backlight */ 181 /* Only main hold affects backlight */
182 if (hold_button != hold_button_old) 182 if (hold_button != hold_button_old)
183 {
183 backlight_hold_changed(hold_button); 184 backlight_hold_changed(hold_button);
185
186 if ( hold_button )
187 disable_scrollstrip_interrupts();
188 else
189 enable_scrollstrip_interrupts();
190 }
184#endif 191#endif
185 192
186 /* Skip if main hold is active */ 193 /* Skip if main hold is active */
@@ -207,28 +214,26 @@ int button_read_device(void)
207 if (data > 950) 214 if (data > 950)
208 btn |= BUTTON_REC; 215 btn |= BUTTON_REC;
209 } 216 }
210 } 217
211 218 /* Handle GPIOs buttons
212 /* Handle GPIOs buttons 219 *
213 * 220 * GPIO56 active high PLAY/PAUSE/ON
214 * GPIO56 active high PLAY/PAUSE/ON 221 * GPIO45 active low ENTER
215 * GPIO45 active low ENTER 222 * GPIO41 active low MENU
216 * GPIO41 active low MENU 223 */
217 */
218 224
219 data = GPIO1_READ; 225 data = GPIO1_READ;
220 226
221 if (!hold_button) 227 if (data & (1<<24))
222 { 228 btn |= BUTTON_PLAY;
223 if (data & (1<<24))
224 btn |= BUTTON_PLAY;
225 229
226 if (!(data & (1<<13))) 230 if (!(data & (1<<13)))
227 btn |= BUTTON_ENTER; 231 btn |= BUTTON_ENTER;
228 232
229 if (!(data & (1<<9))) 233 if (!(data & (1<<9)))
230 btn |= BUTTON_MENU; 234 btn |= BUTTON_MENU;
231 } 235
236 } /* !button_hold() */
232 237
233 return btn; 238 return btn;
234} 239}