forked from len0rd/rockbox
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
This commit is contained in:
parent
efe0dd723f
commit
30d664bbbc
1 changed files with 8 additions and 0 deletions
|
@ -114,6 +114,10 @@
|
||||||
#include "as3514.h"
|
#include "as3514.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef IPOD_NANO2G
|
||||||
|
#include "pmu-target.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_USBSTACK
|
#ifdef HAVE_USBSTACK
|
||||||
#include "usb_core.h"
|
#include "usb_core.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -1793,6 +1797,10 @@ static bool view_battery(void)
|
||||||
snprintf(buf, sizeof(buf), "CHARGER: %02X",
|
snprintf(buf, sizeof(buf), "CHARGER: %02X",
|
||||||
ascodec_read(AS3514_CHARGER));
|
ascodec_read(AS3514_CHARGER));
|
||||||
lcd_puts(0, 5, buf);
|
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
|
#else
|
||||||
snprintf(buf, 30, "Charger: %s",
|
snprintf(buf, 30, "Charger: %s",
|
||||||
charger_inserted() ? "present" : "absent");
|
charger_inserted() ? "present" : "absent");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue