forked from len0rd/rockbox
Iriver iFP7xx battery support (1xAA).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10659 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
12f1a834f2
commit
2b415eff3f
2 changed files with 15 additions and 9 deletions
|
@ -43,6 +43,8 @@
|
|||
|
||||
#define HAVE_FLASH_DISK
|
||||
|
||||
#define BATTERY_CAPACITY_DEFAULT 1000 /* default battery capacity */
|
||||
|
||||
#ifndef SIMULATOR
|
||||
|
||||
/* Define this if you have a Philips PNX0101 */
|
||||
|
@ -52,15 +54,12 @@
|
|||
#define CONFIG_I2C I2C_PNX0101
|
||||
|
||||
/* Type of mobile power */
|
||||
//#define CONFIG_BATTERY BATT_LIPOL1300
|
||||
|
||||
#define BATTERY_SCALE_FACTOR 16665 /* FIX: this value is picked at random */
|
||||
|
||||
/* Hardware controlled charging? FIXME */
|
||||
//#define CONFIG_CHARGING CHARGING_SIMPLE
|
||||
|
||||
/* define this if the hardware can be powered off while charging */
|
||||
//#define HAVE_POWEROFF_WHILE_CHARGING
|
||||
#define CONFIG_BATTERY BATT_1AA
|
||||
#define BATTERY_CAPACITY_MIN 500 /* min. capacity selectable */
|
||||
#define BATTERY_CAPACITY_MAX 2800 /* max. capacity selectable */
|
||||
#define BATTERY_CAPACITY_INC 50 /* capacity increment */
|
||||
#define BATTERY_TYPES_COUNT 2 /* Alkalines or NiMH */
|
||||
#define BATTERY_SCALE_FACTOR 3000 /* TODO: only roughly correct */
|
||||
|
||||
/* The start address index for ROM builds */
|
||||
#define ROM_START 0x00000000
|
||||
|
|
|
@ -159,6 +159,8 @@ static const unsigned int battery_level_dangerous[BATTERY_TYPES_COUNT] =
|
|||
280
|
||||
#elif CONFIG_BATTERY == BATT_3AAA /* Ondio */
|
||||
310, 345 /* alkaline, NiHM */
|
||||
#elif CONFIG_BATTERY == BATT_1AA /* iRiver iFP */
|
||||
105, 115 /* alkaline, NiHM */
|
||||
#elif CONFIG_BATTERY == BATT_LIPOL1300 /* iRiver H1x0 */
|
||||
339
|
||||
#else /* Player/recorder, NiMH */
|
||||
|
@ -182,6 +184,11 @@ static const short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] =
|
|||
* for the 1300 mAh stock battery. */
|
||||
// { 337, 358, 365, 369, 372, 377, 383, 389, 397, 406, 413 }
|
||||
{ 337, 366, 372, 374, 378, 381, 385, 392, 399, 408, 417 }
|
||||
#elif CONFIG_BATTERY == BATT_1AA
|
||||
/* These values are the same as for 3AAA divided by 3. */
|
||||
/* May need recalibration. */
|
||||
{ 93, 108, 114, 118, 121, 125, 128, 132, 136, 142, 158 }, /* alkaline */
|
||||
{ 103, 118, 121, 123, 124, 125, 126, 127, 128, 129, 135 } /* NiMH */
|
||||
#else /* NiMH */
|
||||
/* original values were taken directly after charging, but it should show
|
||||
100% after turning off the device for some hours, too */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue