summaryrefslogtreecommitdiff
path: root/firmware/powermgmt.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2010-05-15 15:03:16 +0000
committerMichael Sevakis <jethead71@rockbox.org>2010-05-15 15:03:16 +0000
commit414dad42c59f43919489f45236d57e1b345b8a65 (patch)
tree1b29c055a2a8a646fca4412b2167ae39347dfc19 /firmware/powermgmt.c
parente34c0593e7d859270695af08b2efc8b1e42e4473 (diff)
downloadrockbox-414dad42c59f43919489f45236d57e1b345b8a65.tar.gz
rockbox-414dad42c59f43919489f45236d57e1b345b8a65.zip
If HAVE_POWEROFF_WHILE_CHARGING is not defined and the charging configuration specifies CHARGING_MONITOR or greater, allow poweroff while plugged but not actually charging the battery.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26055 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/powermgmt.c')
-rw-r--r--firmware/powermgmt.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c
index f1dd83ef52..bf5734c264 100644
--- a/firmware/powermgmt.c
+++ b/firmware/powermgmt.c
@@ -358,8 +358,12 @@ static void handle_auto_poweroff(void)
358 358
359 if (usb_inserted() 359 if (usb_inserted()
360#if CONFIG_CHARGING && !defined(HAVE_POWEROFF_WHILE_CHARGING) 360#if CONFIG_CHARGING && !defined(HAVE_POWEROFF_WHILE_CHARGING)
361#if CONFIG_CHARGING >= CHARGING_MONITOR
362 || charging_state()
363#else
361 || charger_input_state != NO_CHARGER 364 || charger_input_state != NO_CHARGER
362#endif 365#endif
366#endif
363 ) { 367 ) {
364 DEBUGF("Sleep timer timeout. Stopping...\n"); 368 DEBUGF("Sleep timer timeout. Stopping...\n");
365 set_sleep_timer(0); 369 set_sleep_timer(0);