summaryrefslogtreecommitdiff
path: root/apps/debug_menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/debug_menu.c')
-rw-r--r--apps/debug_menu.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index beee39a09b..abb6018a10 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -1603,10 +1603,10 @@ static bool view_battery(void)
1603 lcd_puts(0, 2, buf); 1603 lcd_puts(0, 2, buf);
1604#endif 1604#endif
1605#if CONFIG_CHARGING 1605#if CONFIG_CHARGING
1606#if CONFIG_CHARGING == CHARGING_CONTROL 1606#if defined ARCHOS_RECORDER
1607 snprintf(buf, 30, "Chgr: %s %s", 1607 snprintf(buf, 30, "Chgr: %s %s",
1608 charger_inserted() ? "present" : "absent", 1608 charger_inserted() ? "present" : "absent",
1609 charger_enabled ? "on" : "off"); 1609 charger_enabled() ? "on" : "off");
1610 lcd_puts(0, 3, buf); 1610 lcd_puts(0, 3, buf);
1611 snprintf(buf, 30, "short delta: %d", short_delta); 1611 snprintf(buf, 30, "short delta: %d", short_delta);
1612 lcd_puts(0, 5, buf); 1612 lcd_puts(0, 5, buf);
@@ -1616,13 +1616,11 @@ static bool view_battery(void)
1616 snprintf(buf, 30, "USB Inserted: %s", 1616 snprintf(buf, 30, "USB Inserted: %s",
1617 usb_inserted() ? "yes" : "no"); 1617 usb_inserted() ? "yes" : "no");
1618 lcd_puts(0, 8, buf); 1618 lcd_puts(0, 8, buf);
1619#if defined IRIVER_H300_SERIES 1619#elif defined IRIVER_H300_SERIES
1620 snprintf(buf, 30, "USB Charging Enabled: %s", 1620 snprintf(buf, 30, "USB Charging Enabled: %s",
1621 usb_charging_enabled() ? "yes" : "no"); 1621 usb_charging_enabled() ? "yes" : "no");
1622 lcd_puts(0, 9, buf); 1622 lcd_puts(0, 9, buf);
1623#endif 1623#elif defined IPOD_NANO || defined IPOD_VIDEO
1624#else /* CONFIG_CHARGING != CHARGING_CONTROL */
1625#if defined IPOD_NANO || defined IPOD_VIDEO
1626 int usb_pwr = (GPIOL_INPUT_VAL & 0x10)?true:false; 1624 int usb_pwr = (GPIOL_INPUT_VAL & 0x10)?true:false;
1627 int ext_pwr = (GPIOL_INPUT_VAL & 0x08)?false:true; 1625 int ext_pwr = (GPIOL_INPUT_VAL & 0x08)?false:true;
1628 int dock = (GPIOA_INPUT_VAL & 0x10)?true:false; 1626 int dock = (GPIOA_INPUT_VAL & 0x10)?true:false;
@@ -1644,12 +1642,8 @@ static bool view_battery(void)
1644 snprintf(buf, 30, "Headphone: %s", 1642 snprintf(buf, 30, "Headphone: %s",
1645 headphone ? "connected" : "disconnected"); 1643 headphone ? "connected" : "disconnected");
1646 lcd_puts(0, 7, buf); 1644 lcd_puts(0, 7, buf);
1647#else 1645#elif defined TOSHIBA_GIGABEAT_S
1648 snprintf(buf, 30, "Charger: %s", 1646 int line = 3;
1649 charger_inserted() ? "present" : "absent");
1650 lcd_puts(0, 3, buf);
1651#if defined TOSHIBA_GIGABEAT_S
1652 int line = 4;
1653 unsigned int st; 1647 unsigned int st;
1654 1648
1655 static const unsigned char * const chrgstate_strings[] = 1649 static const unsigned char * const chrgstate_strings[] =
@@ -1663,6 +1657,10 @@ static bool view_battery(void)
1663 "<unknown>", 1657 "<unknown>",
1664 }; 1658 };
1665 1659
1660 snprintf(buf, 30, "Charger: %s",
1661 charger_inserted() ? "present" : "absent");
1662 lcd_puts(0, line++, buf);
1663
1666 st = power_input_status() & 1664 st = power_input_status() &
1667 (POWER_INPUT_CHARGER | POWER_INPUT_BATTERY); 1665 (POWER_INPUT_CHARGER | POWER_INPUT_BATTERY);
1668 snprintf(buf, 30, "%s%s", 1666 snprintf(buf, 30, "%s%s",
@@ -1730,9 +1728,11 @@ static bool view_battery(void)
1730 } 1728 }
1731 1729
1732 lcd_puts(0, line++, buf); 1730 lcd_puts(0, line++, buf);
1733#endif /* defined TOSHIBA_GIGABEAT_S */ 1731#else
1734#endif /* defined IPOD_NANO || defined IPOD_VIDEO */ 1732 snprintf(buf, 30, "Charger: %s",
1735#endif /* CONFIG_CHARGING != CHARGING_CONTROL */ 1733 charger_inserted() ? "present" : "absent");
1734 lcd_puts(0, 3, buf);
1735#endif /* target type */
1736#endif /* CONFIG_CHARGING */ 1736#endif /* CONFIG_CHARGING */
1737 break; 1737 break;
1738 1738
@@ -1750,7 +1750,7 @@ static bool view_battery(void)
1750 1750
1751 case 3: /* remaining time estimation: */ 1751 case 3: /* remaining time estimation: */
1752 1752
1753#if CONFIG_CHARGING == CHARGING_CONTROL 1753#ifdef ARCHOS_RECORDER
1754 snprintf(buf, 30, "charge_state: %d", charge_state); 1754 snprintf(buf, 30, "charge_state: %d", charge_state);
1755 lcd_puts(0, 0, buf); 1755 lcd_puts(0, 0, buf);
1756 1756
@@ -1765,7 +1765,7 @@ static bool view_battery(void)
1765 1765
1766 snprintf(buf, 30, "Trickle sec: %d/60", trickle_sec); 1766 snprintf(buf, 30, "Trickle sec: %d/60", trickle_sec);
1767 lcd_puts(0, 4, buf); 1767 lcd_puts(0, 4, buf);
1768#endif /* CONFIG_CHARGING == CHARGING_CONTROL */ 1768#endif /* ARCHOS_RECORDER */
1769 1769
1770 snprintf(buf, 30, "Last PwrHist: %d.%03dV", 1770 snprintf(buf, 30, "Last PwrHist: %d.%03dV",
1771 power_history[0] / 1000, 1771 power_history[0] / 1000,