diff options
| author | Bertrik Sikken <bertrik@sikken.nl> | 2009-03-22 19:06:54 +0000 |
|---|---|---|
| committer | Bertrik Sikken <bertrik@sikken.nl> | 2009-03-22 19:06:54 +0000 |
| commit | 9ee68cbfd34dfaa5827f3f7dce96952610775106 (patch) | |
| tree | eeef1a4f2793dad8aa944ab0676298ce6291a4a0 | |
| parent | 2611e957d23b4d85f6cc933251e46f79856e1df8 (diff) | |
| download | rockbox-9ee68cbfd34dfaa5827f3f7dce96952610775106.zip rockbox-9ee68cbfd34dfaa5827f3f7dce96952610775106.tar.gz rockbox-9ee68cbfd34dfaa5827f3f7dce96952610775106.tar.bz2 rockbox-9ee68cbfd34dfaa5827f3f7dce96952610775106.tar.xz | |
FS#9968: Charging on e200v2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20465 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | firmware/SOURCES | 3 | ||||
| -rw-r--r-- | firmware/export/config-e200v2.h | 10 | ||||
| -rw-r--r-- | firmware/target/arm/as3525/powermgmt-target.h | 16 |
3 files changed, 23 insertions, 6 deletions
diff --git a/firmware/SOURCES b/firmware/SOURCES index 95ed27b..82b7b34 100644 --- a/firmware/SOURCES +++ b/firmware/SOURCES @@ -1111,7 +1111,8 @@ target/arm/as3525/sansa-e200v2/lcd-e200v2.c target/arm/as3525/sansa-e200v2/button-e200v2.c target/arm/as3525/backlight-e200v2-fuze.c #ifndef BOOTLOADER -target/arm/as3525/powermgmt-as3525.c +target/arm/powermgmt-ascodec.c +target/arm/as3525/sansa-e200v2/powermgmt-e200v2.c #endif /* !BOOTLOADER */ #endif /* !SIMULATOR */ #endif /* SANSA_E200V2 */ diff --git a/firmware/export/config-e200v2.h b/firmware/export/config-e200v2.h index 276fa13..7f993be 100644 --- a/firmware/export/config-e200v2.h +++ b/firmware/export/config-e200v2.h @@ -130,14 +130,14 @@ /* define this if the flash memory uses the SecureDigital Memory Card protocol */ #define CONFIG_STORAGE STORAGE_SD -#define BATTERY_CAPACITY_DEFAULT 750 /* default battery capacity */ -#define BATTERY_CAPACITY_MIN 750 /* min. capacity selectable */ -#define BATTERY_CAPACITY_MAX 750 /* max. capacity selectable */ +#define BATTERY_CAPACITY_DEFAULT 730 /* default battery capacity */ +#define BATTERY_CAPACITY_MIN 730 /* min. capacity selectable */ +#define BATTERY_CAPACITY_MAX 730 /* max. capacity selectable */ #define BATTERY_CAPACITY_INC 0 /* capacity increment */ #define BATTERY_TYPES_COUNT 1 /* only one type */ -/* Hardware controlled charging? FIXME */ -#define CONFIG_CHARGING CHARGING_SIMPLE +/* Charging implemented in a target-specific algorithm */ +#define CONFIG_CHARGING CHARGING_TARGET /* define this if the unit can be powered or charged via USB */ #define HAVE_USB_POWER diff --git a/firmware/target/arm/as3525/powermgmt-target.h b/firmware/target/arm/as3525/powermgmt-target.h index 691d134..3f23d6d 100644 --- a/firmware/target/arm/as3525/powermgmt-target.h +++ b/firmware/target/arm/as3525/powermgmt-target.h @@ -22,6 +22,8 @@ #ifndef POWERMGMT_TARGET_H #define POWERMGMT_TARGET_H +#if defined(SANSA_CLIP) + /* Check if topped-off and monitor voltage while plugged. */ #define BATT_FULL_VOLTAGE 4160 #define BATT_VAUTO_RECHARGE 4100 @@ -30,6 +32,20 @@ #define CHARGER_TOTAL_TIMER (6*3600*2) /* about 1.5 * capacity / current */ #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 charging_algorithm_step(void); void charging_algorithm_close(void); |