H10 can distinguish USB and MAIN charger input so return proper flags. H100s were misconfigured and should use CHARGING_SIMPLE. Comment more on what charging types mean in config.h.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19582 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
9b8f56f35c
commit
377b42b63b
|
@ -110,8 +110,7 @@
|
|||
#define BATTERY_TYPES_COUNT 1 /* only one type */
|
||||
|
||||
/* Hardware controlled charging */
|
||||
|
||||
#define CONFIG_CHARGING CHARGING_MONITOR /* FIXME: remove that once monitoring is fixed properly */
|
||||
#define CONFIG_CHARGING CHARGING_SIMPLE
|
||||
|
||||
/* define current usage levels */
|
||||
#define CURRENT_NORMAL 80 /* 16h playback on 1300mAh battery */
|
||||
|
|
|
@ -110,7 +110,7 @@
|
|||
#define BATTERY_TYPES_COUNT 1 /* only one type */
|
||||
|
||||
/* Hardware controlled charging */
|
||||
#define CONFIG_CHARGING CHARGING_MONITOR /* FIXME: remove that once monitoring is fixed properly */
|
||||
#define CONFIG_CHARGING CHARGING_SIMPLE
|
||||
|
||||
/* define current usage levels */
|
||||
#define CURRENT_NORMAL 80 /* 16h playback on 1300mAh battery */
|
||||
|
|
|
@ -116,12 +116,18 @@
|
|||
/* CONFIG_CHARGING */
|
||||
|
||||
/* Generic types */
|
||||
#define CHARGING_SIMPLE 1 /* Simple, hardware controlled charging */
|
||||
#define CHARGING_MONITOR 2 /* Hardware controlled charging with monitoring */
|
||||
#define CHARGING_SIMPLE 1 /* Simple, hardware controlled charging
|
||||
* (CPU cannot read charger state but may read
|
||||
* when power is plugged-in). */
|
||||
#define CHARGING_MONITOR 2 /* Hardware controlled charging with monitoring
|
||||
* (CPU is able to read HW charging state and
|
||||
* when power is plugged-in). */
|
||||
|
||||
/* Mostly target-specific code in the /target tree */
|
||||
#define CHARGING_TARGET 3
|
||||
|
||||
#define CHARGING_TARGET 3 /* Any algorithm - usually software controlled
|
||||
* charging or specific programming is required to
|
||||
* use the charging hardware. */
|
||||
|
||||
/* CONFIG_LCD */
|
||||
#define LCD_SSD1815 1 /* as used by Archos Recorders and Ondios */
|
||||
#define LCD_SSD1801 2 /* as used by Archos Player/Studio */
|
||||
|
|
|
@ -50,9 +50,15 @@ void power_init(void)
|
|||
|
||||
unsigned int power_input_status(void)
|
||||
{
|
||||
/* No separate source for USB and charges from USB on its own */
|
||||
return (GPIOF_INPUT_VAL & 0x08) ?
|
||||
POWER_INPUT_MAIN_CHARGER : POWER_INPUT_NONE;
|
||||
unsigned int status = POWER_INPUT_NONE;
|
||||
|
||||
if (GPIOF_INPUT_VAL & 0x08)
|
||||
status = POWER_INPUT_MAIN_CHARGER;
|
||||
|
||||
if (GPIOL_INPUT_VAL & 0x04)
|
||||
status |= POWER_INPUT_USB_CHARGER;
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
void ide_power_enable(bool on)
|
||||
|
|
|
@ -57,12 +57,6 @@ unsigned int power_input_status(void)
|
|||
POWER_INPUT_MAIN_CHARGER : POWER_INPUT_NONE;
|
||||
}
|
||||
|
||||
/* Returns true if the unit is charging the batteries. */
|
||||
bool charging_state(void)
|
||||
{
|
||||
return (power_input_status() & POWER_INPUT_CHARGER) != 0;
|
||||
}
|
||||
|
||||
#ifdef HAVE_SPDIF_POWER
|
||||
void spdif_power_enable(bool on)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user