From 347b351e8a2627cd43bf52de438fd30d227db6fc Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Sat, 18 Aug 2007 08:14:07 +0000 Subject: [PATCH] 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 --- firmware/target/arm/ipod/button-1g-3g.c | 11 +++++++++++ 1 file changed, 11 insertions(+) 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; }