summaryrefslogtreecommitdiffstats
path: root/firmware/target/coldfire
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 /firmware/target/coldfire
parent029f0d5223c2fd6b3d2e33b4285c6b0de7b4543c (diff)
downloadrockbox-18accc018bc58b04d994e25a791702e88ef222e6.tar.gz
rockbox-18accc018bc58b04d994e25a791702e88ef222e6.tar.bz2
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
Diffstat (limited to 'firmware/target/coldfire')
-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)
#ifndef BOOTLOADER
/* Only main hold affects backlight */
if (hold_button != hold_button_old)
+ {
backlight_hold_changed(hold_button);
+
+ if ( hold_button )
+ disable_scrollstrip_interrupts();
+ else
+ enable_scrollstrip_interrupts();
+ }
#endif
/* Skip if main hold is active */
@@ -207,28 +214,26 @@ int button_read_device(void)
if (data > 950)
btn |= BUTTON_REC;
}
- }
-
- /* Handle GPIOs buttons
- *
- * GPIO56 active high PLAY/PAUSE/ON
- * GPIO45 active low ENTER
- * GPIO41 active low MENU
- */
+
+ /* Handle GPIOs buttons
+ *
+ * GPIO56 active high PLAY/PAUSE/ON
+ * GPIO45 active low ENTER
+ * GPIO41 active low MENU
+ */
- data = GPIO1_READ;
+ data = GPIO1_READ;
- if (!hold_button)
- {
- if (data & (1<<24))
- btn |= BUTTON_PLAY;
+ if (data & (1<<24))
+ btn |= BUTTON_PLAY;
- if (!(data & (1<<13)))
- btn |= BUTTON_ENTER;
+ if (!(data & (1<<13)))
+ btn |= BUTTON_ENTER;
- if (!(data & (1<<9)))
- btn |= BUTTON_MENU;
- }
+ if (!(data & (1<<9)))
+ btn |= BUTTON_MENU;
+
+ } /* !button_hold() */
return btn;
}