diff options
Diffstat (limited to 'uisimulator/common')
-rw-r--r-- | uisimulator/common/sim_tasks.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/uisimulator/common/sim_tasks.c b/uisimulator/common/sim_tasks.c index 03e68c111f..839ad828b8 100644 --- a/uisimulator/common/sim_tasks.c +++ b/uisimulator/common/sim_tasks.c | |||
@@ -60,7 +60,7 @@ void sim_thread(void) | |||
60 | struct queue_event ev; | 60 | struct queue_event ev; |
61 | long last_broadcast_tick = current_tick; | 61 | long last_broadcast_tick = current_tick; |
62 | int num_acks_to_expect = 0; | 62 | int num_acks_to_expect = 0; |
63 | 63 | ||
64 | while (1) | 64 | while (1) |
65 | { | 65 | { |
66 | queue_wait_w_tmo(&sim_queue, &ev, 5*HZ); | 66 | queue_wait_w_tmo(&sim_queue, &ev, 5*HZ); |
@@ -69,7 +69,7 @@ void sim_thread(void) | |||
69 | case SYS_TIMEOUT: | 69 | case SYS_TIMEOUT: |
70 | call_storage_idle_notifys(false); | 70 | call_storage_idle_notifys(false); |
71 | break; | 71 | break; |
72 | 72 | ||
73 | case SIM_SCREENDUMP: | 73 | case SIM_SCREENDUMP: |
74 | screen_dump(); | 74 | screen_dump(); |
75 | #ifdef HAVE_REMOTE_LCD | 75 | #ifdef HAVE_REMOTE_LCD |
@@ -134,7 +134,7 @@ void sim_thread(void) | |||
134 | void sim_tasks_init(void) | 134 | void sim_tasks_init(void) |
135 | { | 135 | { |
136 | queue_init(&sim_queue, false); | 136 | queue_init(&sim_queue, false); |
137 | 137 | ||
138 | create_thread(sim_thread, sim_thread_stack, sizeof(sim_thread_stack), 0, | 138 | create_thread(sim_thread, sim_thread_stack, sizeof(sim_thread_stack), 0, |
139 | sim_thread_name IF_PRIO(,PRIORITY_BACKGROUND) IF_COP(,CPU)); | 139 | sim_thread_name IF_PRIO(,PRIORITY_BACKGROUND) IF_COP(,CPU)); |
140 | } | 140 | } |
@@ -220,9 +220,9 @@ void usb_wait_for_disconnect(struct event_queue *q) | |||
220 | } | 220 | } |
221 | } | 221 | } |
222 | 222 | ||
223 | #ifdef HAVE_MULTIDRIVE | ||
224 | static bool is_ext_inserted; | 223 | static bool is_ext_inserted; |
225 | 224 | ||
225 | #ifdef HAVE_MULTIDRIVE | ||
226 | void sim_trigger_external(bool inserted) | 226 | void sim_trigger_external(bool inserted) |
227 | { | 227 | { |
228 | is_ext_inserted = inserted; | 228 | is_ext_inserted = inserted; |
@@ -235,6 +235,7 @@ void sim_trigger_external(bool inserted) | |||
235 | 235 | ||
236 | DEBUGF("Ext %s\n", inserted ? "inserted":"removed"); | 236 | DEBUGF("Ext %s\n", inserted ? "inserted":"removed"); |
237 | } | 237 | } |
238 | #endif | ||
238 | 239 | ||
239 | bool hostfs_present(int drive) | 240 | bool hostfs_present(int drive) |
240 | { | 241 | { |
@@ -246,7 +247,7 @@ bool hostfs_removable(int drive) | |||
246 | return drive > 0; | 247 | return drive > 0; |
247 | } | 248 | } |
248 | 249 | ||
249 | #ifdef HAVE_MULTIVOLUME | 250 | #ifdef HAVE_HOTSWAP |
250 | bool volume_removable(int volume) | 251 | bool volume_removable(int volume) |
251 | { | 252 | { |
252 | /* volume == drive for now */ | 253 | /* volume == drive for now */ |
@@ -258,13 +259,15 @@ bool volume_present(int volume) | |||
258 | /* volume == drive for now */ | 259 | /* volume == drive for now */ |
259 | return hostfs_present(volume); | 260 | return hostfs_present(volume); |
260 | } | 261 | } |
262 | #endif /* HAVE_HOTSWAP */ | ||
261 | 263 | ||
264 | #ifdef HAVE_MULTIDRIVE | ||
262 | int volume_drive(int volume) | 265 | int volume_drive(int volume) |
263 | { | 266 | { |
264 | /* volume == drive for now */ | 267 | /* volume == drive for now */ |
265 | return volume; | 268 | return volume; |
266 | } | 269 | } |
267 | #endif /* HAVE_MULTIVOLUME */ | 270 | #endif |
268 | 271 | ||
269 | #if (CONFIG_STORAGE & STORAGE_MMC) | 272 | #if (CONFIG_STORAGE & STORAGE_MMC) |
270 | bool mmc_touched(void) | 273 | bool mmc_touched(void) |
@@ -296,5 +299,3 @@ int hostfs_driver_type(int drive) | |||
296 | return drive > 0 ? SIMEXT1_TYPE_NUM : STORAGE_HOSTFS_NUM; | 299 | return drive > 0 ? SIMEXT1_TYPE_NUM : STORAGE_HOSTFS_NUM; |
297 | } | 300 | } |
298 | #endif /* CONFIG_STORAGE_MULTI */ | 301 | #endif /* CONFIG_STORAGE_MULTI */ |
299 | |||
300 | #endif /* CONFIG_STORAGE & STORAGE_MMC */ | ||