diff options
Diffstat (limited to 'firmware')
-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 95ed27bd89..82b7b34942 100644 --- a/firmware/SOURCES +++ b/firmware/SOURCES | |||
@@ -1111,7 +1111,8 @@ target/arm/as3525/sansa-e200v2/lcd-e200v2.c | |||
1111 | target/arm/as3525/sansa-e200v2/button-e200v2.c | 1111 | target/arm/as3525/sansa-e200v2/button-e200v2.c |
1112 | target/arm/as3525/backlight-e200v2-fuze.c | 1112 | target/arm/as3525/backlight-e200v2-fuze.c |
1113 | #ifndef BOOTLOADER | 1113 | #ifndef BOOTLOADER |
1114 | target/arm/as3525/powermgmt-as3525.c | 1114 | target/arm/powermgmt-ascodec.c |
1115 | target/arm/as3525/sansa-e200v2/powermgmt-e200v2.c | ||
1115 | #endif /* !BOOTLOADER */ | 1116 | #endif /* !BOOTLOADER */ |
1116 | #endif /* !SIMULATOR */ | 1117 | #endif /* !SIMULATOR */ |
1117 | #endif /* SANSA_E200V2 */ | 1118 | #endif /* SANSA_E200V2 */ |
diff --git a/firmware/export/config-e200v2.h b/firmware/export/config-e200v2.h index 276fa13903..7f993be512 100644 --- a/firmware/export/config-e200v2.h +++ b/firmware/export/config-e200v2.h | |||
@@ -130,14 +130,14 @@ | |||
130 | /* define this if the flash memory uses the SecureDigital Memory Card protocol */ | 130 | /* define this if the flash memory uses the SecureDigital Memory Card protocol */ |
131 | #define CONFIG_STORAGE STORAGE_SD | 131 | #define CONFIG_STORAGE STORAGE_SD |
132 | 132 | ||
133 | #define BATTERY_CAPACITY_DEFAULT 750 /* default battery capacity */ | 133 | #define BATTERY_CAPACITY_DEFAULT 730 /* default battery capacity */ |
134 | #define BATTERY_CAPACITY_MIN 750 /* min. capacity selectable */ | 134 | #define BATTERY_CAPACITY_MIN 730 /* min. capacity selectable */ |
135 | #define BATTERY_CAPACITY_MAX 750 /* max. capacity selectable */ | 135 | #define BATTERY_CAPACITY_MAX 730 /* max. capacity selectable */ |
136 | #define BATTERY_CAPACITY_INC 0 /* capacity increment */ | 136 | #define BATTERY_CAPACITY_INC 0 /* capacity increment */ |
137 | #define BATTERY_TYPES_COUNT 1 /* only one type */ | 137 | #define BATTERY_TYPES_COUNT 1 /* only one type */ |
138 | 138 | ||
139 | /* Hardware controlled charging? FIXME */ | 139 | /* Charging implemented in a target-specific algorithm */ |
140 | #define CONFIG_CHARGING CHARGING_SIMPLE | 140 | #define CONFIG_CHARGING CHARGING_TARGET |
141 | 141 | ||
142 | /* define this if the unit can be powered or charged via USB */ | 142 | /* define this if the unit can be powered or charged via USB */ |
143 | #define HAVE_USB_POWER | 143 | #define HAVE_USB_POWER |
diff --git a/firmware/target/arm/as3525/powermgmt-target.h b/firmware/target/arm/as3525/powermgmt-target.h index 691d134ffa..3f23d6d3d7 100644 --- a/firmware/target/arm/as3525/powermgmt-target.h +++ b/firmware/target/arm/as3525/powermgmt-target.h | |||
@@ -22,6 +22,8 @@ | |||
22 | #ifndef POWERMGMT_TARGET_H | 22 | #ifndef POWERMGMT_TARGET_H |
23 | #define POWERMGMT_TARGET_H | 23 | #define POWERMGMT_TARGET_H |
24 | 24 | ||
25 | #if defined(SANSA_CLIP) | ||
26 | |||
25 | /* Check if topped-off and monitor voltage while plugged. */ | 27 | /* Check if topped-off and monitor voltage while plugged. */ |
26 | #define BATT_FULL_VOLTAGE 4160 | 28 | #define BATT_FULL_VOLTAGE 4160 |
27 | #define BATT_VAUTO_RECHARGE 4100 | 29 | #define BATT_VAUTO_RECHARGE 4100 |
@@ -30,6 +32,20 @@ | |||
30 | #define CHARGER_TOTAL_TIMER (6*3600*2) /* about 1.5 * capacity / current */ | 32 | #define CHARGER_TOTAL_TIMER (6*3600*2) /* about 1.5 * capacity / current */ |
31 | #define ADC_BATTERY ADC_BVDD | 33 | #define ADC_BATTERY ADC_BVDD |
32 | 34 | ||
35 | #elif defined(SANSA_E200V2) | ||
36 | |||
37 | /* Check if topped-off and monitor voltage while plugged. */ | ||
38 | #define BATT_FULL_VOLTAGE 4160 | ||
39 | #define BATT_VAUTO_RECHARGE 4100 | ||
40 | #define BATT_CHG_V CHG_V_4_20V | ||
41 | #define BATT_CHG_I CHG_I_300MA | ||
42 | #define CHARGER_TOTAL_TIMER (4*3600*2) | ||
43 | #define ADC_BATTERY ADC_BVDD | ||
44 | |||
45 | #else | ||
46 | #error "Charger settings not defined!" | ||
47 | #endif | ||
48 | |||
33 | void powermgmt_init_target(void); | 49 | void powermgmt_init_target(void); |
34 | void charging_algorithm_step(void); | 50 | void charging_algorithm_step(void); |
35 | void charging_algorithm_close(void); | 51 | void charging_algorithm_close(void); |