summaryrefslogtreecommitdiffstats
path: root/firmware/powermgmt.c
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-06-23 02:18:29 +0000
committerJens Arnold <amiconn@rockbox.org>2005-06-23 02:18:29 +0000
commit97a804938996d5bbc122128eb78a074491c4ad61 (patch)
tree8e5b58c663edc49bcbffd40c8237f259ca36309c /firmware/powermgmt.c
parent6e0436f65cd461bb2b21c9a0178dfa6978213d27 (diff)
downloadrockbox-97a804938996d5bbc122128eb78a074491c4ad61.tar.gz
rockbox-97a804938996d5bbc122128eb78a074491c4ad61.zip
New feature for units that can be powered or charged from USB (Recorder fm/v2, Ondios): USB power mode, based on patch #1110332 by Pieter Bos. This way you can save battery power or even charge the battery (fm/v2) while using your unit near a PC. Hold MODE (Ondio) or F1 (fm/v2) while plugging USB to enter that mode. A tiny USB plug icon will be displayed is the status bar (overridden by the regular power plug icon in case of fm/v2 when the charger is connected).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6836 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/powermgmt.c')
-rw-r--r--firmware/powermgmt.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c
index bb2e6755cb..3eab4131d1 100644
--- a/firmware/powermgmt.c
+++ b/firmware/powermgmt.c
@@ -437,7 +437,12 @@ static int runcurrent(void)
current = CURRENT_NORMAL;
#endif /* MEM == 8 */
- if(usb_inserted()) {
+ if(usb_inserted()
+#ifdef HAVE_USB_POWER
+ || usb_powered()
+#endif
+ )
+ {
current = CURRENT_USB;
}