summaryrefslogtreecommitdiff
path: root/firmware/powermgmt.c
diff options
context:
space:
mode:
authorSteve Bavin <pondlife@pondlife.me>2007-02-01 10:47:22 +0000
committerSteve Bavin <pondlife@pondlife.me>2007-02-01 10:47:22 +0000
commit338d94f4661643dcd4c6440aa1c12af6933da4a5 (patch)
tree966f0bf5dcc7f4ccb71c266317adedd5705c5d2f /firmware/powermgmt.c
parent73ee2379c5361126d6fb9754845fc9e249614e40 (diff)
FS#4770 - Add USB charging for the H300 series
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12169 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/powermgmt.c')
-rw-r--r--firmware/powermgmt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c
index 5c7607413c..1b160af232 100644
--- a/firmware/powermgmt.c
+++ b/firmware/powermgmt.c
@@ -759,8 +759,11 @@ static void power_thread_sleep(int ticks)
* transition to the appropriate steady state charger on/off state.
*/
if(charger_inserted()
-#ifdef HAVE_USB_POWER
+#ifdef HAVE_USB_POWER /* USB powered or USB inserted both provide power */
|| usb_powered()
+#ifdef CONFIG_CHARGING
+ || (usb_inserted() && usb_charging_enabled())
+#endif
#endif
) {
switch(charger_input_state) {