summaryrefslogtreecommitdiff
path: root/apps/debug_menu.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 /apps/debug_menu.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 'apps/debug_menu.c')
-rw-r--r--apps/debug_menu.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index c5240d0de8..99c00fa1eb 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -78,6 +78,9 @@
#include "spdif.h"
#endif
#endif
+#ifdef IRIVER_H300_SERIES
+#include "pcf50606.h" /* for pcf50606_read */
+#endif
#ifdef IAUDIO_X5
#include "lcd-remote-target.h"
@@ -1059,6 +1062,16 @@ bool dbg_ports(void)
lcd_puts(0, line++, buf);
snprintf(buf, sizeof(buf), "GPIO1_ENABLE: %08x", gpio1_enable);
lcd_puts(0, line++, buf);
+#if defined(IRIVER_H300_SERIES)
+ snprintf(buf, sizeof(buf), "GPOOD0: %08x", (unsigned int)pcf50606_read(0x37));
+ lcd_puts(0, line++, buf);
+ snprintf(buf, sizeof(buf), "GPOOD1: %08x", (unsigned int)pcf50606_read(0x38));
+ lcd_puts(0, line++, buf);
+ snprintf(buf, sizeof(buf), "GPOOD2: %08x", (unsigned int)pcf50606_read(0x39));
+ lcd_puts(0, line++, buf);
+ snprintf(buf, sizeof(buf), "GPOOD3: %08x", (unsigned int)pcf50606_read(0x3A));
+ lcd_puts(0, line++, buf);
+#endif
adc_buttons = adc_read(ADC_BUTTONS);
adc_remote = adc_read(ADC_REMOTE);
@@ -1422,6 +1435,14 @@ static bool view_battery(void)
snprintf(buf, 30, "long delta: %d", long_delta);
lcd_puts(0, 6, buf);
lcd_puts(0, 7, power_message);
+ snprintf(buf, 30, "USB Inserted: %s",
+ usb_inserted() ? "yes" : "no");
+ lcd_puts(0, 8, buf);
+#if defined IRIVER_H300_SERIES
+ snprintf(buf, 30, "USB Charging Enabled: %s",
+ usb_charging_enabled() ? "yes" : "no");
+ lcd_puts(0, 9, buf);
+#endif
#else /* CONFIG_CHARGING != CHARGING_CONTROL */
#if defined IPOD_NANO || defined IPOD_VIDEO
int usb_pwr = (GPIOL_INPUT_VAL & 0x10)?true:false;