From 24e2d8671d4c72bf2c8db4b27ad11906fef741c2 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Wed, 24 Dec 2008 17:28:01 +0000 Subject: Fix red and yellow. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19580 a1c6a512-1295-4272-9138-f99709370657 --- firmware/export/config-fmrecorder.h | 2 ++ firmware/powermgmt.c | 16 +++++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/firmware/export/config-fmrecorder.h b/firmware/export/config-fmrecorder.h index 716bc98e09..50cee2be12 100644 --- a/firmware/export/config-fmrecorder.h +++ b/firmware/export/config-fmrecorder.h @@ -54,8 +54,10 @@ /* The number of bytes reserved for loadable plugins */ #define PLUGIN_BUFFER_SIZE 0x8000 +#ifndef BOOTLOADER /* Define this if you have an FM Radio */ #define CONFIG_TUNER S1A0903X01 +#endif #define AB_REPEAT_ENABLE 1 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; -- cgit v1.2.3