summaryrefslogtreecommitdiff
path: root/apps/debug_menu.c
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-05-17 20:53:25 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-05-17 20:53:25 +0000
commit88c55d7290b7c360075557c40fdf65ceeeaf0c4b (patch)
tree29cf685626bf8c01bb64ed9456850f62e4a57d7d /apps/debug_menu.c
parent2ed7745ddefc084ca7030d48b251882e94fa2f9c (diff)
downloadrockbox-88c55d7290b7c360075557c40fdf65ceeeaf0c4b.zip
rockbox-88c55d7290b7c360075557c40fdf65ceeeaf0c4b.tar.gz
rockbox-88c55d7290b7c360075557c40fdf65ceeeaf0c4b.tar.bz2
rockbox-88c55d7290b7c360075557c40fdf65ceeeaf0c4b.tar.xz
as3514/as3543 fixes
- Enable end of charge monitoring once, it doesn't need to be disabled - Acknowledge the first (wrong) end of charge interrupt on charger enable (this had been broken in r25299) - Centralize reads to ENRD* registers and cache the results when needed - on PP it is not needed because reads are atomic, we only check for end of charge when the charging, and for charger presence when discharging as3525v2 (using as3543) specifics - I got the datasheet today from AMS, thanks to them for being so fast and not require me to sign tons of papers! - USB detection now works on as3525v2 using the as3543. Clip+ won't reboot to OF yet, it needs mkamsboot support first (usbstack disabled) - Charging should work, the CHARGER register is at a different place, it is an extended PMU register -> use ascodec_read/write_charger() to access it - real interrupts are not used yet for ENRD, we get thousands of interrupts per second, apparently only limited by the i2c clock. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26116 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/debug_menu.c')
-rw-r--r--apps/debug_menu.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index e8104f7..f805dae 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -108,7 +108,8 @@
#endif
#if defined(SANSA_E200) || defined(SANSA_C200) || defined(PHILIPS_SA9200) \
- || defined(SANSA_CLIP) || defined(SANSA_FUZE) || defined(SANSA_C200V2)
+ || (CONFIG_CPU == AS3525 && defined(CONFIG_CHARGING)) \
+ || CONFIG_CPU == AS3525v2
#include "ascodec.h"
#include "as3514.h"
#endif
@@ -1656,8 +1657,8 @@ static bool view_battery(void)
lcd_puts(0, line++, "T Battery: ?");
}
-#elif defined(SANSA_E200) || defined(SANSA_C200) || defined(SANSA_CLIP) || \
- defined(SANSA_FUZE) || defined (SANSA_C200V2)
+#elif defined(SANSA_E200) || defined(SANSA_C200) || CONFIG_CPU == AS3525 || \
+ CONFIG_CPU == AS3525v2
const int first = CHARGE_STATE_DISABLED;
static const char * const chrgstate_strings[] =
{
@@ -1678,8 +1679,7 @@ static bool view_battery(void)
lcd_putsf(0, 4, "State: %s",
str ? str : "<unknown>");
- lcd_putsf(0, 5, "CHARGER: %02X",
- ascodec_read(AS3514_CHARGER));
+ lcd_putsf(0, 5, "CHARGER: %02X", ascodec_read_charger());
#elif defined(IPOD_NANO2G)
y = pmu_read_battery_voltage();
lcd_putsf(17, 1, "RAW: %d.%03d V", y / 1000, y % 1000);