summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Häggqvist <rasher@rasher.dk>2005-09-22 11:31:40 +0000
committerJonas Häggqvist <rasher@rasher.dk>2005-09-22 11:31:40 +0000
commitaafb343d10c9190d76e5983d55056a8564fee01a (patch)
tree93982ca83939db1b9dc573989befa64eefade1c6
parentc0f455993a8a82b2e85b07d6b9fa8c885c029b0f (diff)
Fix to remote-hold check by Stephan Wezel - it always returned true when the remote wasn't present.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7538 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/drivers/button.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/firmware/drivers/button.c b/firmware/drivers/button.c
index 4d1652984b..5959bf033d 100644
--- a/firmware/drivers/button.c
+++ b/firmware/drivers/button.c
@@ -591,7 +591,12 @@ bool button_hold(void)
bool remote_button_hold(void)
{
- return (GPIO1_READ & 0x00100000)?true:false;
+ /*
+ check also if the remote is plugged in
+ GPIO_READ = 0xDXXXXXXX => not plugged in (X don't care)
+ GPIO_READ = 0x9XXXXXXX => plugged in (X don't care)
+ */
+ return ( (GPIO1_READ & 0x00100000) && !(GPIO_READ & 0x40000000) )?true:false;
}
#endif