diff options
author | Thomas Martitz <kugel@rockbox.org> | 2012-01-04 00:07:27 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2012-01-04 00:07:27 +0000 |
commit | 5d9759a76e7e6fc73c89751a1644fc57e1111ec4 (patch) | |
tree | 2ab66229734ff477db033dde3162bc7aa2e8d616 | |
parent | 3fdb48b3fe0986b267a82692d067dc4c563ba9b1 (diff) | |
download | rockbox-5d9759a76e7e6fc73c89751a1644fc57e1111ec4.tar.gz rockbox-5d9759a76e7e6fc73c89751a1644fc57e1111ec4.zip |
Fix reds by implementing a few more stubs, and undefining HAVE_STORAGE_FLUSH in the sim.
Also slight change on how to measure seconds.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31550 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | firmware/export/config/sim.h | 1 | ||||
-rw-r--r-- | uisimulator/common/powermgmt-sim.c | 27 | ||||
-rw-r--r-- | uisimulator/common/stubs.c | 4 |
3 files changed, 26 insertions, 6 deletions
diff --git a/firmware/export/config/sim.h b/firmware/export/config/sim.h index f565e6192e..1f545c5f36 100644 --- a/firmware/export/config/sim.h +++ b/firmware/export/config/sim.h | |||
@@ -33,6 +33,7 @@ | |||
33 | #undef NUM_DRIVES | 33 | #undef NUM_DRIVES |
34 | #undef HAVE_HOTSWAP | 34 | #undef HAVE_HOTSWAP |
35 | #undef HAVE_HOTSWAP_STORAGE_AS_MAIN | 35 | #undef HAVE_HOTSWAP_STORAGE_AS_MAIN |
36 | #undef HAVE_STORAGE_FLUSH | ||
36 | 37 | ||
37 | #undef CONFIG_STORAGE | 38 | #undef CONFIG_STORAGE |
38 | 39 | ||
diff --git a/uisimulator/common/powermgmt-sim.c b/uisimulator/common/powermgmt-sim.c index 2d9acab51d..7500b3dd7b 100644 --- a/uisimulator/common/powermgmt-sim.c +++ b/uisimulator/common/powermgmt-sim.c | |||
@@ -42,13 +42,10 @@ void powermgmt_init_target(void) {} | |||
42 | 42 | ||
43 | static void battery_status_update(void) | 43 | static void battery_status_update(void) |
44 | { | 44 | { |
45 | static time_t last_change = 0; | 45 | static long last_tick = 0; |
46 | time_t now; | ||
47 | 46 | ||
48 | time(&now); | 47 | if (TIME_AFTER(current_tick, (last_tick+HZ))) { |
49 | 48 | last_tick = current_tick; | |
50 | if (last_change < now) { | ||
51 | last_change = now; | ||
52 | 49 | ||
53 | /* change the values: */ | 50 | /* change the values: */ |
54 | if (charging) { | 51 | if (charging) { |
@@ -121,3 +118,21 @@ void lineout_set(bool enable) | |||
121 | (void)enable; | 118 | (void)enable; |
122 | } | 119 | } |
123 | #endif | 120 | #endif |
121 | |||
122 | #ifdef HAVE_REMOTE_LCD | ||
123 | bool remote_detect(void) | ||
124 | { | ||
125 | return true; | ||
126 | } | ||
127 | #endif | ||
128 | |||
129 | #ifdef HAVE_BATTERY_SWITCH | ||
130 | unsigned int input_millivolts(void) | ||
131 | { | ||
132 | if ((power_input_status() & POWER_INPUT_BATTERY) == 0) { | ||
133 | /* Just return a safe value if battery isn't connected */ | ||
134 | return 4050; | ||
135 | } | ||
136 | return battery_voltage();; | ||
137 | } | ||
138 | #endif | ||
diff --git a/uisimulator/common/stubs.c b/uisimulator/common/stubs.c index ba4faff6e2..de53b6bb64 100644 --- a/uisimulator/common/stubs.c +++ b/uisimulator/common/stubs.c | |||
@@ -99,6 +99,10 @@ void mp3_play_data(const unsigned char* start, int size, | |||
99 | (void)start; (void)size; (void)get_more; | 99 | (void)start; (void)size; (void)get_more; |
100 | } | 100 | } |
101 | 101 | ||
102 | void mp3_shutdown(void) | ||
103 | { | ||
104 | } | ||
105 | |||
102 | /* firmware/drivers/audio/mas35xx.c */ | 106 | /* firmware/drivers/audio/mas35xx.c */ |
103 | #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) | 107 | #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) |
104 | void audiohw_set_loudness(int value) | 108 | void audiohw_set_loudness(int value) |