mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-10 13:45:10 -05:00
Gigabeat S: Extend the upper temperature range for battery charging to 50C: OK and 45C: Resume. Currently extended disk activity can cause it to detect overtemp which doesn't quite seem correct. Add macros for the range so that they may be target-specific.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25508 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
f25f17c5b6
commit
4e8704c387
2 changed files with 17 additions and 2 deletions
|
|
@ -467,8 +467,13 @@ static bool charging_ok(void)
|
|||
* come back into safe range. */
|
||||
static const signed char temp_ranges[2][2] =
|
||||
{
|
||||
{ 0, 45 }, /* Temperature range before beginning charging */
|
||||
{ 5, 40 }, /* Temperature range after out-of-range detected */
|
||||
/* Temperature range before beginning charging */
|
||||
{ BATTERY_CHARGE_MIN,
|
||||
BATTERY_CHARGE_MAX },
|
||||
/* Temperature range after out-of-range detected -
|
||||
charging will self-resume */
|
||||
{ BATTERY_CHARGE_RESTART_MIN,
|
||||
BATTERY_CHARGE_RESTART_MAX },
|
||||
};
|
||||
|
||||
int temp = battery_adc_temp();
|
||||
|
|
|
|||
|
|
@ -61,6 +61,16 @@
|
|||
read below 2400mV. */
|
||||
#define CHARGER_TOTAL_TIMER 300 /* minutes */
|
||||
|
||||
/* Temperature readings - w/hysteresis */
|
||||
|
||||
/* Temperature range before beginning charging */
|
||||
#define BATTERY_CHARGE_MIN 0
|
||||
#define BATTERY_CHARGE_MAX 50
|
||||
/* Temperature range after out-of-range detected - charging will
|
||||
* self-resume */
|
||||
#define BATTERY_CHARGE_RESTART_MIN 5
|
||||
#define BATTERY_CHARGE_RESTART_MAX 45
|
||||
|
||||
/* .316 ohms is closest standard value as measured in 1% tolerance - adjust
|
||||
* relative to .100 ohm which is what the PMIC is "tuned" for. */
|
||||
#define ILEVEL_ADJUST_IN(I) (100*(I) / 316)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue