summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2008-12-24 17:28:01 +0000
committerMichael Sevakis <jethead71@rockbox.org>2008-12-24 17:28:01 +0000
commit24e2d8671d4c72bf2c8db4b27ad11906fef741c2 (patch)
tree08e74ca61ec2d41387872fba37126ffd6a1e7ce6 /firmware
parent3157e1395674a930c74e2ef4cc4ce78dffea8569 (diff)
downloadrockbox-24e2d8671d4c72bf2c8db4b27ad11906fef741c2.zip
rockbox-24e2d8671d4c72bf2c8db4b27ad11906fef741c2.tar.gz
rockbox-24e2d8671d4c72bf2c8db4b27ad11906fef741c2.tar.bz2
rockbox-24e2d8671d4c72bf2c8db4b27ad11906fef741c2.tar.xz
Fix red and yellow.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19580 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/export/config-fmrecorder.h2
-rw-r--r--firmware/powermgmt.c16
2 files changed, 15 insertions, 3 deletions
diff --git a/firmware/export/config-fmrecorder.h b/firmware/export/config-fmrecorder.h
index 716bc98..50cee2b 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 5aa85c8..065690f 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;