From 97a804938996d5bbc122128eb78a074491c4ad61 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Thu, 23 Jun 2005 02:18:29 +0000 Subject: 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 --- firmware/export/config-fmrecorder.h | 3 +++ firmware/export/config-ondiofm.h | 3 +++ firmware/export/config-ondiosp.h | 3 +++ firmware/export/config-recorderv2.h | 3 +++ firmware/export/usb.h | 3 +++ 5 files changed, 15 insertions(+) (limited to 'firmware/export') diff --git a/firmware/export/config-fmrecorder.h b/firmware/export/config-fmrecorder.h index 914ef60f79..a3f2597d5d 100644 --- a/firmware/export/config-fmrecorder.h +++ b/firmware/export/config-fmrecorder.h @@ -76,6 +76,9 @@ /* Define this for LCD backlight available */ #define CONFIG_BACKLIGHT BL_RTC /* on I2C controlled RTC port */ +/* define this if the unit can be powered or charged via USB */ +#define HAVE_USB_POWER + #define CONFIG_LCD LCD_SSD1815 #define BOOTFILE_EXT ".ajz" diff --git a/firmware/export/config-ondiofm.h b/firmware/export/config-ondiofm.h index b052832bbc..9436b86f1e 100644 --- a/firmware/export/config-ondiofm.h +++ b/firmware/export/config-ondiofm.h @@ -90,6 +90,9 @@ #define CONFIG_LCD LCD_SSD1815 +/* define this if the unit can be powered or charged via USB */ +#define HAVE_USB_POWER + #define BOOTFILE_EXT ".ajz" #define BOOTFILE "ajbrec" BOOTFILE_EXT diff --git a/firmware/export/config-ondiosp.h b/firmware/export/config-ondiosp.h index 6c800b3a53..fd79d19cb7 100644 --- a/firmware/export/config-ondiosp.h +++ b/firmware/export/config-ondiosp.h @@ -78,6 +78,9 @@ #define CONFIG_LCD LCD_SSD1815 +/* define this if the unit can be powered or charged via USB */ +#define HAVE_USB_POWER + #define BOOTFILE_EXT ".ajz" #define BOOTFILE "ajbrec" BOOTFILE_EXT diff --git a/firmware/export/config-recorderv2.h b/firmware/export/config-recorderv2.h index 450222dd38..c75f0e6f12 100644 --- a/firmware/export/config-recorderv2.h +++ b/firmware/export/config-recorderv2.h @@ -76,6 +76,9 @@ /* Define this for LCD backlight available */ #define CONFIG_BACKLIGHT BL_RTC /* on I2C controlled RTC port */ +/* define this if the unit can be powered or charged via USB */ +#define HAVE_USB_POWER + #define CONFIG_LCD LCD_SSD1815 #define BOOTFILE_EXT ".ajz" diff --git a/firmware/export/usb.h b/firmware/export/usb.h index fc96c67166..e8602e7358 100644 --- a/firmware/export/usb.h +++ b/firmware/export/usb.h @@ -28,5 +28,8 @@ void usb_wait_for_disconnect(struct event_queue *q); int usb_wait_for_disconnect_w_tmo(struct event_queue *q, int ticks); bool usb_inserted(void); /* return the official value, what's been reported to the threads */ bool usb_detect(void); /* return the raw hardware value */ +#ifdef HAVE_USB_POWER +bool usb_powered(void); +#endif #endif -- cgit v1.2.3