summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-06-16 23:45:09 +0000
committerJens Arnold <amiconn@rockbox.org>2005-06-16 23:45:09 +0000
commitde1b915f790112165dbbd64d1945c94132932b04 (patch)
tree4be01ea43047c0658112c6d2880bc9b33c8b62ed
parenta4a1a5523b61175f1f7d04e192391ccceb51e4f9 (diff)
downloadrockbox-de1b915f790112165dbbd64d1945c94132932b04.tar.gz
rockbox-de1b915f790112165dbbd64d1945c94132932b04.zip
Iriver: Sleep timer now powers off the box even when the charger is connected.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6733 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/export/config-h100.h3
-rw-r--r--firmware/export/config-h300.h3
-rw-r--r--firmware/powermgmt.c2
3 files changed, 7 insertions, 1 deletions
diff --git a/firmware/export/config-h100.h b/firmware/export/config-h100.h
index 2dea66beca..b97ad90548 100644
--- a/firmware/export/config-h100.h
+++ b/firmware/export/config-h100.h
@@ -39,6 +39,9 @@
39/* Define this if the platform can charge batteries */ 39/* Define this if the platform can charge batteries */
40#define HAVE_CHARGING 1 40#define HAVE_CHARGING 1
41 41
42/* define this if the hardware can be powered off while charging */
43#define HAVE_POWEROFF_WHILE_CHARGING
44
42/* The start address index for ROM builds */ 45/* The start address index for ROM builds */
43#define ROM_START 0x11010 46#define ROM_START 0x11010
44 47
diff --git a/firmware/export/config-h300.h b/firmware/export/config-h300.h
index de54e7740f..92f2cc03eb 100644
--- a/firmware/export/config-h300.h
+++ b/firmware/export/config-h300.h
@@ -39,6 +39,9 @@
39/* Define this if the platform can charge batteries */ 39/* Define this if the platform can charge batteries */
40#define HAVE_CHARGING 1 40#define HAVE_CHARGING 1
41 41
42/* define this if the hardware can be powered off while charging */
43#define HAVE_POWEROFF_WHILE_CHARGING
44
42/* The start address index for ROM builds */ 45/* The start address index for ROM builds */
43#define ROM_START 0x11010 46#define ROM_START 0x11010
44 47
diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c
index 2d7e5dfe6e..37bbbe2e2c 100644
--- a/firmware/powermgmt.c
+++ b/firmware/powermgmt.c
@@ -399,7 +399,7 @@ static void handle_auto_poweroff(void)
399 if(TIME_AFTER(current_tick, sleeptimer_endtick)) 399 if(TIME_AFTER(current_tick, sleeptimer_endtick))
400 { 400 {
401 audio_stop(); 401 audio_stop();
402#ifdef HAVE_CHARGING 402#if defined(HAVE_CHARGING) && !defined(HAVE_POWEROFF_WHILE_CHARGING)
403 if((charger_input_state == CHARGER) || 403 if((charger_input_state == CHARGER) ||
404 (charger_input_state == CHARGER_PLUGGED)) 404 (charger_input_state == CHARGER_PLUGGED))
405 { 405 {