FS#9968: Charging on e200v2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20465 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
2611e957d2
commit
9ee68cbfd3
3 changed files with 23 additions and 6 deletions
|
@ -1111,7 +1111,8 @@ target/arm/as3525/sansa-e200v2/lcd-e200v2.c
|
||||||
target/arm/as3525/sansa-e200v2/button-e200v2.c
|
target/arm/as3525/sansa-e200v2/button-e200v2.c
|
||||||
target/arm/as3525/backlight-e200v2-fuze.c
|
target/arm/as3525/backlight-e200v2-fuze.c
|
||||||
#ifndef BOOTLOADER
|
#ifndef BOOTLOADER
|
||||||
target/arm/as3525/powermgmt-as3525.c
|
target/arm/powermgmt-ascodec.c
|
||||||
|
target/arm/as3525/sansa-e200v2/powermgmt-e200v2.c
|
||||||
#endif /* !BOOTLOADER */
|
#endif /* !BOOTLOADER */
|
||||||
#endif /* !SIMULATOR */
|
#endif /* !SIMULATOR */
|
||||||
#endif /* SANSA_E200V2 */
|
#endif /* SANSA_E200V2 */
|
||||||
|
|
|
@ -130,14 +130,14 @@
|
||||||
/* define this if the flash memory uses the SecureDigital Memory Card protocol */
|
/* define this if the flash memory uses the SecureDigital Memory Card protocol */
|
||||||
#define CONFIG_STORAGE STORAGE_SD
|
#define CONFIG_STORAGE STORAGE_SD
|
||||||
|
|
||||||
#define BATTERY_CAPACITY_DEFAULT 750 /* default battery capacity */
|
#define BATTERY_CAPACITY_DEFAULT 730 /* default battery capacity */
|
||||||
#define BATTERY_CAPACITY_MIN 750 /* min. capacity selectable */
|
#define BATTERY_CAPACITY_MIN 730 /* min. capacity selectable */
|
||||||
#define BATTERY_CAPACITY_MAX 750 /* max. capacity selectable */
|
#define BATTERY_CAPACITY_MAX 730 /* max. capacity selectable */
|
||||||
#define BATTERY_CAPACITY_INC 0 /* capacity increment */
|
#define BATTERY_CAPACITY_INC 0 /* capacity increment */
|
||||||
#define BATTERY_TYPES_COUNT 1 /* only one type */
|
#define BATTERY_TYPES_COUNT 1 /* only one type */
|
||||||
|
|
||||||
/* Hardware controlled charging? FIXME */
|
/* Charging implemented in a target-specific algorithm */
|
||||||
#define CONFIG_CHARGING CHARGING_SIMPLE
|
#define CONFIG_CHARGING CHARGING_TARGET
|
||||||
|
|
||||||
/* define this if the unit can be powered or charged via USB */
|
/* define this if the unit can be powered or charged via USB */
|
||||||
#define HAVE_USB_POWER
|
#define HAVE_USB_POWER
|
||||||
|
|
|
@ -22,6 +22,8 @@
|
||||||
#ifndef POWERMGMT_TARGET_H
|
#ifndef POWERMGMT_TARGET_H
|
||||||
#define POWERMGMT_TARGET_H
|
#define POWERMGMT_TARGET_H
|
||||||
|
|
||||||
|
#if defined(SANSA_CLIP)
|
||||||
|
|
||||||
/* Check if topped-off and monitor voltage while plugged. */
|
/* Check if topped-off and monitor voltage while plugged. */
|
||||||
#define BATT_FULL_VOLTAGE 4160
|
#define BATT_FULL_VOLTAGE 4160
|
||||||
#define BATT_VAUTO_RECHARGE 4100
|
#define BATT_VAUTO_RECHARGE 4100
|
||||||
|
@ -30,6 +32,20 @@
|
||||||
#define CHARGER_TOTAL_TIMER (6*3600*2) /* about 1.5 * capacity / current */
|
#define CHARGER_TOTAL_TIMER (6*3600*2) /* about 1.5 * capacity / current */
|
||||||
#define ADC_BATTERY ADC_BVDD
|
#define ADC_BATTERY ADC_BVDD
|
||||||
|
|
||||||
|
#elif defined(SANSA_E200V2)
|
||||||
|
|
||||||
|
/* Check if topped-off and monitor voltage while plugged. */
|
||||||
|
#define BATT_FULL_VOLTAGE 4160
|
||||||
|
#define BATT_VAUTO_RECHARGE 4100
|
||||||
|
#define BATT_CHG_V CHG_V_4_20V
|
||||||
|
#define BATT_CHG_I CHG_I_300MA
|
||||||
|
#define CHARGER_TOTAL_TIMER (4*3600*2)
|
||||||
|
#define ADC_BATTERY ADC_BVDD
|
||||||
|
|
||||||
|
#else
|
||||||
|
#error "Charger settings not defined!"
|
||||||
|
#endif
|
||||||
|
|
||||||
void powermgmt_init_target(void);
|
void powermgmt_init_target(void);
|
||||||
void charging_algorithm_step(void);
|
void charging_algorithm_step(void);
|
||||||
void charging_algorithm_close(void);
|
void charging_algorithm_close(void);
|
||||||
|
|
Loading…
Reference in a new issue