summaryrefslogtreecommitdiff
path: root/firmware/target/arm/ipod/button-clickwheel.c
diff options
context:
space:
mode:
authorMichael Sparmann <theseven@rockbox.org>2011-02-10 10:10:27 +0000
committerMichael Sparmann <theseven@rockbox.org>2011-02-10 10:10:27 +0000
commitcd8e8419f7a334a8ad89e21825b99745402a387e (patch)
tree5c850357e0db4e3fd85373e95e1b5fdb43e1bbce /firmware/target/arm/ipod/button-clickwheel.c
parente93713ba3c33770ee74a98f714da079779adbb1b (diff)
downloadrockbox-cd8e8419f7a334a8ad89e21825b99745402a387e.tar.gz
rockbox-cd8e8419f7a334a8ad89e21825b99745402a387e.zip
iPod Nano 2G: Fix current leak through clickwheel GPIOs when clickwheel is powered down
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29272 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/ipod/button-clickwheel.c')
-rw-r--r--firmware/target/arm/ipod/button-clickwheel.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/firmware/target/arm/ipod/button-clickwheel.c b/firmware/target/arm/ipod/button-clickwheel.c
index 2cddbd5950..5d16381434 100644
--- a/firmware/target/arm/ipod/button-clickwheel.c
+++ b/firmware/target/arm/ipod/button-clickwheel.c
@@ -387,7 +387,11 @@ void button_init_device(void)
387bool button_hold(void) 387bool button_hold(void)
388{ 388{
389#if CONFIG_CPU==S5L8701 389#if CONFIG_CPU==S5L8701
390 return ((PDAT14 & (1 << 6)) == 0); 390 bool value = (PDAT14 & (1 << 6)) == 0;
391 if (value)
392 PCONF = (PCONF & ~0xffff0000) | 0x11110000;
393 else PCONF = (PCONF & ~0xffff0000) | 0x22220000;
394 return value;
391#elif CONFIG_CPU==S5L8702 395#elif CONFIG_CPU==S5L8702
392 if (USEC_TIMER - holdswitch_last_read > 100000) 396 if (USEC_TIMER - holdswitch_last_read > 100000)
393 { 397 {