1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Jens Arnold 2007-08-18 08:14:07 +00:00
parent 3c35d7adf3
commit 347b351e8a

View file

@ -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;
}