summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2007-08-18 08:14:07 +0000
committerJens Arnold <amiconn@rockbox.org>2007-08-18 08:14:07 +0000
commit347b351e8a2627cd43bf52de438fd30d227db6fc (patch)
treeea4246e59997e27a47b808dc26f139220c0ab3b7 /firmware
parent3c35d7adf3e32529716cb12a9afdd83f6adda546 (diff)
downloadrockbox-347b351e8a2627cd43bf52de438fd30d227db6fc.tar.gz
rockbox-347b351e8a2627cd43bf52de438fd30d227db6fc.zip
iPod 1st Gen: Electronically disable the wheel when hold is enabled, saving quite some power.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14383 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/arm/ipod/button-1g-3g.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/firmware/target/arm/ipod/button-1g-3g.c b/firmware/target/arm/ipod/button-1g-3g.c
index 3a9b9ea9b1..54552058cc 100644
--- a/firmware/target/arm/ipod/button-1g-3g.c
+++ b/firmware/target/arm/ipod/button-1g-3g.c
@@ -213,7 +213,18 @@ int button_read_device(void)
hold_button = button_hold();
if (hold_button != hold_button_old)
+ {
backlight_hold_changed(hold_button);
+#ifdef IPOD_1G2G
+ /* Disable the 1st gen's wheel on hold in order to save power.
+ * The wheel draws ~12mA when enabled! Toggling the bit doesn't hurt
+ * on 2nd gen, because the pin is set to input (headphone detect). */
+ if (hold_button)
+ GPIOB_OUTPUT_VAL &= ~0x01; /* disable wheel */
+ else
+ GPIOB_OUTPUT_VAL |= 0x01; /* enable wheel */
+#endif
+ }
return int_btn;
}