summaryrefslogtreecommitdiff
path: root/firmware/target/arm/iriver/h10
diff options
context:
space:
mode:
authorBarry Wardell <rockbox@barrywardell.net>2006-08-26 15:48:17 +0000
committerBarry Wardell <rockbox@barrywardell.net>2006-08-26 15:48:17 +0000
commit8269541370fe448f020d55ffa420bef114be3118 (patch)
tree41a3ed56dc70e79eeecddad50050fee2d7426f1c /firmware/target/arm/iriver/h10
parent59d19526931e1b81d002bc29135f9d3c2ca9f6bf (diff)
Fixed silly bugs in H10 button driver.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10759 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/iriver/h10')
-rw-r--r--firmware/target/arm/iriver/h10/button-h10.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/firmware/target/arm/iriver/h10/button-h10.c b/firmware/target/arm/iriver/h10/button-h10.c
index 08fb808fcf..340f51c34c 100644
--- a/firmware/target/arm/iriver/h10/button-h10.c
+++ b/firmware/target/arm/iriver/h10/button-h10.c
@@ -38,7 +38,7 @@ void button_init_device(void)
bool button_hold(void)
{
- return (GPIOA_INPUT_VAL & 0x40)?false:true;
+ return (GPIOA_INPUT_VAL & 0x4)?false:true;
}
/*
@@ -70,12 +70,13 @@ int button_read_device(void)
if ((state & 0x80) == 0) btn |= BUTTON_LEFT;
/* Read power button */
- if ((GPIOB_INPUT_VAL & 0x1) == 1) btn |= BUTTON_POWER;
+ if (GPIOB_INPUT_VAL & 0x1) btn |= BUTTON_POWER;
/* Read scroller */
- if ( ((GPIOC_INPUT_VAL & 0x4)==1) && ((GPIOD_INPUT_VAL & 0x10)==1) )
+ if ( (GPIOC_INPUT_VAL & 0x8) && (GPIOD_INPUT_VAL & 0x20) )
{
/* Scroller is pressed */
+ btn |= BUTTON_SCROLL_DOWN;
}
}