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.tar.gz
rockbox-88c55d7290b7c360075557c40fdf65ceeeaf0c4b.zip
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 e8104f74dc..f805dae339 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -108,7 +108,8 @@
108#endif 108#endif
109 109
110#if defined(SANSA_E200) || defined(SANSA_C200) || defined(PHILIPS_SA9200) \ 110#if defined(SANSA_E200) || defined(SANSA_C200) || defined(PHILIPS_SA9200) \
111 || defined(SANSA_CLIP) || defined(SANSA_FUZE) || defined(SANSA_C200V2) 111 || (CONFIG_CPU == AS3525 && defined(CONFIG_CHARGING)) \
112 || CONFIG_CPU == AS3525v2
112#include "ascodec.h" 113#include "ascodec.h"
113#include "as3514.h" 114#include "as3514.h"
114#endif 115#endif
@@ -1656,8 +1657,8 @@ static bool view_battery(void)
1656 lcd_puts(0, line++, "T Battery: ?"); 1657 lcd_puts(0, line++, "T Battery: ?");
1657 } 1658 }
1658 1659
1659#elif defined(SANSA_E200) || defined(SANSA_C200) || defined(SANSA_CLIP) || \ 1660#elif defined(SANSA_E200) || defined(SANSA_C200) || CONFIG_CPU == AS3525 || \
1660 defined(SANSA_FUZE) || defined (SANSA_C200V2) 1661 CONFIG_CPU == AS3525v2
1661 const int first = CHARGE_STATE_DISABLED; 1662 const int first = CHARGE_STATE_DISABLED;
1662 static const char * const chrgstate_strings[] = 1663 static const char * const chrgstate_strings[] =
1663 { 1664 {
@@ -1678,8 +1679,7 @@ static bool view_battery(void)
1678 lcd_putsf(0, 4, "State: %s", 1679 lcd_putsf(0, 4, "State: %s",
1679 str ? str : "<unknown>"); 1680 str ? str : "<unknown>");
1680 1681
1681 lcd_putsf(0, 5, "CHARGER: %02X", 1682 lcd_putsf(0, 5, "CHARGER: %02X", ascodec_read_charger());
1682 ascodec_read(AS3514_CHARGER));
1683#elif defined(IPOD_NANO2G) 1683#elif defined(IPOD_NANO2G)
1684 y = pmu_read_battery_voltage(); 1684 y = pmu_read_battery_voltage();
1685 lcd_putsf(17, 1, "RAW: %d.%03d V", y / 1000, y % 1000); 1685 lcd_putsf(17, 1, "RAW: %d.%03d V", y / 1000, y % 1000);