diff options
Diffstat (limited to 'firmware/drivers/power.c')
-rw-r--r-- | firmware/drivers/power.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/firmware/drivers/power.c b/firmware/drivers/power.c index 9f3a10cc84..3df8460222 100644 --- a/firmware/drivers/power.c +++ b/firmware/drivers/power.c | |||
@@ -150,8 +150,13 @@ void charger_enable(bool on) | |||
150 | #endif | 150 | #endif |
151 | 151 | ||
152 | #ifdef HAVE_CHARGE_STATE | 152 | #ifdef HAVE_CHARGE_STATE |
153 | /* Returns true if the unit is charging the batteries. */ | ||
153 | bool charging_state(void) { | 154 | bool charging_state(void) { |
155 | #if defined(IRIVER_H100_SERIES) | ||
156 | return charger_inserted(); | ||
157 | #else /* Iriver H300 */ | ||
154 | return (GPIO_READ & 0x00800000)?true:false; | 158 | return (GPIO_READ & 0x00800000)?true:false; |
159 | #endif | ||
155 | } | 160 | } |
156 | #endif | 161 | #endif |
157 | 162 | ||