forked from len0rd/rockbox
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
This commit is contained in:
parent
e93713ba3c
commit
cd8e8419f7
1 changed files with 5 additions and 1 deletions
|
|
@ -387,7 +387,11 @@ void button_init_device(void)
|
||||||
bool button_hold(void)
|
bool button_hold(void)
|
||||||
{
|
{
|
||||||
#if CONFIG_CPU==S5L8701
|
#if CONFIG_CPU==S5L8701
|
||||||
return ((PDAT14 & (1 << 6)) == 0);
|
bool value = (PDAT14 & (1 << 6)) == 0;
|
||||||
|
if (value)
|
||||||
|
PCONF = (PCONF & ~0xffff0000) | 0x11110000;
|
||||||
|
else PCONF = (PCONF & ~0xffff0000) | 0x22220000;
|
||||||
|
return value;
|
||||||
#elif CONFIG_CPU==S5L8702
|
#elif CONFIG_CPU==S5L8702
|
||||||
if (USEC_TIMER - holdswitch_last_read > 100000)
|
if (USEC_TIMER - holdswitch_last_read > 100000)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue