diff options
author | Michael Sparmann <theseven@rockbox.org> | 2009-10-10 22:02:23 +0000 |
---|---|---|
committer | Michael Sparmann <theseven@rockbox.org> | 2009-10-10 22:02:23 +0000 |
commit | 30d664bbbc1a6a160f9fed03e619c0a6e8440970 (patch) | |
tree | 7c41a548fbc96c3a81a3808d1c8cb22ed597d9f7 /apps | |
parent | efe0dd723f507da859fc86fbbbeaceb75713e1a2 (diff) | |
download | rockbox-30d664bbbc1a6a160f9fed03e619c0a6e8440970.tar.gz rockbox-30d664bbbc1a6a160f9fed03e619c0a6e8440970.zip |
Add current measurements to the iPod Nano 2G's battery debug screen
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23082 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/debug_menu.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c index 5d79bd1288..1ea27b4f75 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c @@ -114,6 +114,10 @@ #include "as3514.h" #endif +#ifdef IPOD_NANO2G +#include "pmu-target.h" +#endif + #ifdef HAVE_USBSTACK #include "usb_core.h" #endif @@ -1793,6 +1797,10 @@ static bool view_battery(void) snprintf(buf, sizeof(buf), "CHARGER: %02X", ascodec_read(AS3514_CHARGER)); lcd_puts(0, 5, buf); +#elif defined(IPOD_NANO2G) + y = pmu_read_battery_current(); + snprintf(buf, 30, "Battery current: %d mA", y); + lcd_puts(0, 2, buf); #else snprintf(buf, 30, "Charger: %s", charger_inserted() ? "present" : "absent"); |