Index: firmware/target/arm/sandisk/adc-target.h =================================================================== --- firmware/target/arm/sandisk/adc-target.h (revision 16657) +++ firmware/target/arm/sandisk/adc-target.h (working copy) @@ -38,6 +38,6 @@ #define ADC_I_MICSUP2 11 /* Current of MicSup2 for remote control detection */ #define ADC_VBAT 12 /* Single cell battery voltage */ -#define ADC_UNREG_POWER ADC_BVDD /* For compatibility */ +#define ADC_UNREG_POWER ADC_RTCSUP /* For compatibility */ #endif Index: firmware/target/arm/sandisk/power-c200_e200.c =================================================================== --- firmware/target/arm/sandisk/power-c200_e200.c (revision 16657) +++ firmware/target/arm/sandisk/power-c200_e200.c (working copy) @@ -24,8 +24,13 @@ #include "tuner.h" #include "as3514.h" +#define CHARGE_CURRENT 250 /* mA, 50 - 400 in steps of 50 */ +#define CHARGE_VOLTAGE 4100 /* mV, 3900 - 4250 in steps of 50 */ + void power_init(void) { + pp_i2c_send(AS3514_I2C_ADDR, CHRGR, (((CHARGE_CURRENT - 50) / 50) << 4) | + (((CHARGE_VOLTAGE - 3900) / 50) << 1)); } void power_off(void)