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:
parent
3c35d7adf3
commit
347b351e8a
1 changed files with 11 additions and 0 deletions
|
@ -213,7 +213,18 @@ int button_read_device(void)
|
||||||
hold_button = button_hold();
|
hold_button = button_hold();
|
||||||
|
|
||||||
if (hold_button != hold_button_old)
|
if (hold_button != hold_button_old)
|
||||||
|
{
|
||||||
backlight_hold_changed(hold_button);
|
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;
|
return int_btn;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue