forked from len0rd/rockbox
Disable clickwheel power supply when hold button is active for iPod nano 2G.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28161 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
3c11c56dc4
commit
274c84fae9
1 changed files with 5 additions and 0 deletions
|
@ -39,6 +39,9 @@
|
||||||
#include "serial.h"
|
#include "serial.h"
|
||||||
#include "power.h"
|
#include "power.h"
|
||||||
#include "powermgmt.h"
|
#include "powermgmt.h"
|
||||||
|
#if defined(IPOD_NANO2G)
|
||||||
|
#include "pmu-target.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#define WHEEL_FAST_OFF_TIMEOUT 250000 /* timeout for acceleration = 250ms */
|
#define WHEEL_FAST_OFF_TIMEOUT 250000 /* timeout for acceleration = 250ms */
|
||||||
#define WHEEL_REPEAT_TIMEOUT 250000 /* timeout for button repeat = 250ms */
|
#define WHEEL_REPEAT_TIMEOUT 250000 /* timeout for button repeat = 250ms */
|
||||||
|
@ -368,6 +371,7 @@ int button_read_device(void)
|
||||||
/* lock -> disable wheel sensor */
|
/* lock -> disable wheel sensor */
|
||||||
DEV_EN &= ~DEV_OPTO;
|
DEV_EN &= ~DEV_OPTO;
|
||||||
#elif CONFIG_CPU==S5L8701
|
#elif CONFIG_CPU==S5L8701
|
||||||
|
pmu_ldo_power_off(1); /* disable clickwheel power supply */
|
||||||
CLICKWHEEL00 = 0;
|
CLICKWHEEL00 = 0;
|
||||||
CLICKWHEEL10 = 0;
|
CLICKWHEEL10 = 0;
|
||||||
#endif
|
#endif
|
||||||
|
@ -379,6 +383,7 @@ int button_read_device(void)
|
||||||
DEV_EN |= DEV_OPTO;
|
DEV_EN |= DEV_OPTO;
|
||||||
opto_i2c_init();
|
opto_i2c_init();
|
||||||
#elif CONFIG_CPU==S5L8701
|
#elif CONFIG_CPU==S5L8701
|
||||||
|
pmu_ldo_power_on(1); /* enable clickwheel power supply */
|
||||||
CLICKWHEEL00 = 0x280000;
|
CLICKWHEEL00 = 0x280000;
|
||||||
CLICKWHEEL10 = 3;
|
CLICKWHEEL10 = 3;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue