From 8269541370fe448f020d55ffa420bef114be3118 Mon Sep 17 00:00:00 2001 From: Barry Wardell Date: Sat, 26 Aug 2006 15:48:17 +0000 Subject: Fixed silly bugs in H10 button driver. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10759 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/arm/iriver/h10/button-h10.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'firmware/target/arm/iriver/h10') 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; } } -- cgit v1.2.3