summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-rw-r--r--firmware/export/config-h300.h3
-rw-r--r--firmware/usb.c5
2 files changed, 7 insertions, 1 deletions
diff --git a/firmware/export/config-h300.h b/firmware/export/config-h300.h
index d57975d..88feb9d 100644
--- a/firmware/export/config-h300.h
+++ b/firmware/export/config-h300.h
@@ -110,4 +110,7 @@
#define HAVE_BACKLIGHT_BRIGHTNESS
+/* define this if the unit can be powered or charged via USB */
+#define HAVE_USB_POWER
+
#endif
diff --git a/firmware/usb.c b/firmware/usb.c
index 13006ab..94175a4 100644
--- a/firmware/usb.c
+++ b/firmware/usb.c
@@ -55,7 +55,7 @@ void screen_dump(void); /* Nasty again. Defined in apps/ too */
/* Messages from usb_tick and thread states */
#define USB_INSERTED 1
-#define USB_EXTRACTED 2
+#define USB_EXTRACTED 2
#ifdef HAVE_MMC
#define USB_REENABLE 3
#endif
@@ -71,6 +71,9 @@ void screen_dump(void); /* Nasty again. Defined in apps/ too */
#elif CONFIG_KEYPAD == IPOD_4G_PAD
#define USBPOWER_BUTTON BUTTON_MENU
#define USBPOWER_BTN_IGNORE BUTTON_PLAY
+#elif CONFIG_KEYPAD == IRIVER_H300_PAD
+#define USBPOWER_BUTTON BUTTON_REC
+#define USBPOWER_BTN_IGNORE BUTTON_ON
#endif
#endif /* HAVE_USB_POWER */