From e63e62b2a1d849b9a965e989b3ce18576c0ac521 Mon Sep 17 00:00:00 2001 From: Barry Wardell Date: Wed, 20 Sep 2006 23:21:59 +0000 Subject: Detect charger connected on H10. No need to sleep(HZ) when powering off. More sensible USB support for H10: plugging in puts it into USB charging mode and leaves Rockbox usable, holding 'O' while pluggin in the USB cable will reboot the H10 (continuing to hold 'O' starts it up in UMS mode), holding any other button brings up the USB screen as previously. Implement system_reboot() for all PP5020 devices. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11015 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/arm/iriver/h10/power-h10.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'firmware/target/arm/iriver/h10/power-h10.c') diff --git a/firmware/target/arm/iriver/h10/power-h10.c b/firmware/target/arm/iriver/h10/power-h10.c index 6e7b65a803..143248efcd 100644 --- a/firmware/target/arm/iriver/h10/power-h10.c +++ b/firmware/target/arm/iriver/h10/power-h10.c @@ -71,7 +71,7 @@ void power_init(void) bool charger_inserted(void) { - return (GPIOL_INPUT_VAL & 0x04)?true:false; /* FIXME: This only checks if USB is connected */ + return (GPIOF_INPUT_VAL & 0x08)?true:false; } void ide_power_enable(bool on) @@ -89,8 +89,5 @@ bool ide_powered(void) void power_off(void) { - /* Give things a second to settle before cutting power */ - sleep(HZ); - GPIOF_OUTPUT_VAL &=~ 0x20; } -- cgit v1.2.3