summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorBarry Wardell <rockbox@barrywardell.net>2008-03-04 14:31:14 +0000
committerBarry Wardell <rockbox@barrywardell.net>2008-03-04 14:31:14 +0000
commit0449c0ef5d3397ac6944bcb73678e087b7ef0f3e (patch)
tree9bd189ca28c7630ac84e8d48565b8965d7bdde55 /apps
parentfdb5a4b0c242b394fc79c9240be0863ca5b6194c (diff)
Second part of FS#8272 - include charger status in Sansa debug menu.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16513 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/debug_menu.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index f448d30b3c..21ed3e119c 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -97,6 +97,9 @@
#include "debug-target.h"
#endif
+#include "i2c-pp.h"
+#include "as3514.h"
+
/*---------------------------------------------------*/
/* SPECIAL DEBUG STUFF */
/*---------------------------------------------------*/
@@ -1179,8 +1182,7 @@ bool dbg_ports(void)
snprintf(buf, sizeof(buf), "REM: %03x PAD: %03x",
adc_read(ADC_REMOTE), adc_read(ADC_SCROLLPAD));
lcd_puts(0, line++, buf);
-#elif defined(SANSA_E200)
- line++;
+#elif defined(SANSA_E200)
snprintf(buf, sizeof(buf), "ADC_BVDD: %4d", adc_read(ADC_BVDD));
lcd_puts(0, line++, buf);
snprintf(buf, sizeof(buf), "ADC_RTCSUP: %4d", adc_read(ADC_RTCSUP));
@@ -1207,6 +1209,8 @@ bool dbg_ports(void)
lcd_puts(0, line++, buf);
snprintf(buf, sizeof(buf), "ADC_VBAT: %4d", adc_read(ADC_VBAT));
lcd_puts(0, line++, buf);
+ snprintf(buf, sizeof(buf), "CHARGER: %02X/%02X", i2c_readbyte(AS3514_I2C_ADDR, CHRGR), i2c_readbyte(AS3514_I2C_ADDR, IRQ_ENRD0));
+ lcd_puts(0, line++, buf);
#endif
lcd_update();
if (button_get_w_tmo(HZ/10) == (DEBUG_CANCEL|BUTTON_REL))