AMSv2: add proper definitions for charge current

Change-Id: I6a14570e94df1be62ae46816d2ff4e3f2b7bc21a
This commit is contained in:
Bertrik Sikken 2012-03-04 11:41:25 +01:00
parent f8de21f460
commit f6e17e86fe
3 changed files with 24 additions and 13 deletions

View file

@ -39,7 +39,7 @@
#define BATT_FULL_VOLTAGE 4160
#define BATT_VAUTO_RECHARGE 4100
#define BATT_CHG_V CHG_V_4_20V
#define BATT_CHG_I CHG_I_150MA
#define BATT_CHG_I CHG_I_140MA
#define CHARGER_TOTAL_TIMER (4*3600*2) /* about 1.5 * capacity / current */
#elif defined(SANSA_CLIPV2)
@ -48,7 +48,7 @@
#define BATT_FULL_VOLTAGE 4200
#define BATT_VAUTO_RECHARGE 4100
#define BATT_CHG_V CHG_V_4_20V
#define BATT_CHG_I CHG_I_150MA
#define BATT_CHG_I CHG_I_140MA
#define CHARGER_TOTAL_TIMER (4*3600*2) /* about 1.5 * capacity / current */
#elif defined(SANSA_E200V2)
@ -75,7 +75,7 @@
#define BATT_FULL_VOLTAGE 4200
#define BATT_VAUTO_RECHARGE 4100
#define BATT_CHG_V CHG_V_4_20V
#define BATT_CHG_I CHG_I_200MA
#define BATT_CHG_I CHG_I_210MA
#define CHARGER_TOTAL_TIMER (4*3600*2)
#elif defined(SANSA_CLIPZIP)
@ -84,7 +84,7 @@
#define BATT_FULL_VOLTAGE 4160
#define BATT_VAUTO_RECHARGE 4100
#define BATT_CHG_V CHG_V_4_20V
#define BATT_CHG_I CHG_I_150MA
#define BATT_CHG_I CHG_I_140MA
#define CHARGER_TOTAL_TIMER (4*3600*2) /* about 1.5 * capacity / current */
#elif defined(SANSA_C200V2)

View file

@ -93,7 +93,7 @@ static void battery_voltage_sync(void)
/* Disable charger and minimize all settings. Reset timers, etc. */
static void disable_charger(void)
{
ascodec_write_charger(TMPSUP_OFF | CHG_I_50MA | CHG_V_3_90V | CHG_OFF);
ascodec_write_charger(TMPSUP_OFF | CHG_OFF);
if (charge_state > DISCHARGING)
charge_state = DISCHARGING; /* Not an error state already */
@ -126,7 +126,7 @@ void powermgmt_init_target(void)
{
/* Everything CHARGER, OFF! */
ascodec_monitor_endofch();
ascodec_write_charger(TMPSUP_OFF | CHG_I_50MA | CHG_V_3_90V | CHG_OFF);
ascodec_write_charger(TMPSUP_OFF | CHG_OFF);
}
static inline void charger_plugged(void)