diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2008-12-24 17:28:01 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2008-12-24 17:28:01 +0000 |
commit | 24e2d8671d4c72bf2c8db4b27ad11906fef741c2 (patch) | |
tree | 08e74ca61ec2d41387872fba37126ffd6a1e7ce6 /firmware/powermgmt.c | |
parent | 3157e1395674a930c74e2ef4cc4ce78dffea8569 (diff) | |
download | rockbox-24e2d8671d4c72bf2c8db4b27ad11906fef741c2.tar.gz rockbox-24e2d8671d4c72bf2c8db4b27ad11906fef741c2.tar.bz2 rockbox-24e2d8671d4c72bf2c8db4b27ad11906fef741c2.zip |
Fix red and yellow.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19580 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/powermgmt.c')
-rw-r--r-- | firmware/powermgmt.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c index 5aa85c883d..065690fdb3 100644 --- a/firmware/powermgmt.c +++ b/firmware/powermgmt.c @@ -374,6 +374,7 @@ static int runcurrent(void) current = CURRENT_NORMAL; #endif /* MEM == 8 */ +#ifndef BOOTLOADER if (usb_inserted() #ifdef HAVE_USB_POWER #if (CURRENT_USB < CURRENT_NORMAL) @@ -405,6 +406,7 @@ static int runcurrent(void) if (remote_detect()) current += CURRENT_REMOTE; #endif +#endif /* BOOTLOADER */ return current; } @@ -447,7 +449,12 @@ void reset_battery_filter(int millivolts) #endif /* HAVE_BATTERY_SWITCH */ /** Generic charging algorithms for common charging types **/ -#if CONFIG_CHARGING == CHARGING_SIMPLE +#if CONFIG_CHARGING == 0 || CONFIG_CHARGING == CHARGING_SIMPLE +static inline void powermgmt_init_target(void) +{ + /* Nothing to do */ +} + static inline void charging_algorithm_step(void) { /* Nothing to do */ @@ -461,6 +468,11 @@ static inline void charging_algorithm_close(void) /* * Monitor CHARGING/DISCHARGING state. */ +static inline void powermgmt_init_target(void) +{ + /* Nothing to do */ +} + static inline void charging_algorithm_step(void) { switch (charger_input_state) @@ -664,9 +676,7 @@ static void power_thread(void) battery_percent += battery_percent < 100; } -#if CONFIG_CHARGING == CHARGING_TARGET powermgmt_init_target(); -#endif next_power_hist = current_tick + HZ*60; |