summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank Gevaerts <frank@gevaerts.be>2008-11-01 17:06:04 +0000
committerFrank Gevaerts <frank@gevaerts.be>2008-11-01 17:06:04 +0000
commit008865b469c4ce67b19e0850a849539e007bb1b3 (patch)
tree66032d703fc37c62df58767ad708f6f9d35fef8d
parent526304e1cec3fd532c9712b330b2ee469586cf13 (diff)
downloadrockbox-008865b469c4ce67b19e0850a849539e007bb1b3.tar.gz
rockbox-008865b469c4ce67b19e0850a849539e007bb1b3.zip
Add more simulator stubs. This should get rid of the last reds
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18963 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/export/storage.h96
1 files changed, 90 insertions, 6 deletions
diff --git a/firmware/export/storage.h b/firmware/export/storage.h
index 8a0219c523..78d3360ba9 100644
--- a/firmware/export/storage.h
+++ b/firmware/export/storage.h
@@ -50,6 +50,7 @@ struct storage_info
50 50
51void storage_spindown(int seconds); 51void storage_spindown(int seconds);
52 52
53#ifndef SIMULATOR
53static inline void storage_enable(bool on) 54static inline void storage_enable(bool on)
54{ 55{
55#if (CONFIG_STORAGE & STORAGE_ATA) 56#if (CONFIG_STORAGE & STORAGE_ATA)
@@ -102,7 +103,6 @@ static inline int storage_soft_reset(void)
102} 103}
103static inline int storage_init(void) 104static inline int storage_init(void)
104{ 105{
105#ifndef SIMULATOR
106#if (CONFIG_STORAGE & STORAGE_ATA) 106#if (CONFIG_STORAGE & STORAGE_ATA)
107 return ata_init(); 107 return ata_init();
108#elif (CONFIG_STORAGE & STORAGE_SD) 108#elif (CONFIG_STORAGE & STORAGE_SD)
@@ -114,9 +114,6 @@ static inline int storage_init(void)
114#else 114#else
115 #error No storage driver! 115 #error No storage driver!
116#endif 116#endif
117#else
118 return 0;
119#endif
120} 117}
121static inline void storage_close(void) 118static inline void storage_close(void)
122{ 119{
@@ -174,7 +171,7 @@ static inline void storage_set_led_enabled(bool enabled)
174 #error No storage driver! 171 #error No storage driver!
175#endif 172#endif
176} 173}
177#endif 174#endif /*LED*/
178 175
179static inline long storage_last_disk_activity(void) 176static inline long storage_last_disk_activity(void)
180{ 177{
@@ -245,5 +242,92 @@ static inline bool storage_present(IF_MV_NONVOID(int drive))
245 #error No storage driver! 242 #error No storage driver!
246#endif 243#endif
247} 244}
248#endif 245#endif /* HOTSWAP */
246#else /* SIMULATOR */
247static inline void storage_enable(bool on)
248{
249 (void)on;
250}
251static inline void storage_sleep(void)
252{
253}
254static inline void storage_sleepnow(void)
255{
256}
257static inline bool storage_disk_is_active(void)
258{
259 return 0;
260}
261static inline int storage_hard_reset(void)
262{
263 return 0;
264}
265static inline int storage_soft_reset(void)
266{
267 return 0;
268}
269static inline int storage_init(void)
270{
271 return 0;
272}
273static inline void storage_close(void)
274{
275}
276static inline int storage_read_sectors(IF_MV2(int drive,) unsigned long start, int count, void* buf)
277{
278 IF_MV((void)drive;)
279 (void)start;
280 (void)count;
281 (void)buf;
282 return 0;
283}
284static inline int storage_write_sectors(IF_MV2(int drive,) unsigned long start, int count, const void* buf)
285{
286 IF_MV((void)drive;)
287 (void)start;
288 (void)count;
289 (void)buf;
290 return 0;
291}
292static inline void storage_spin(void)
293{
294}
295
296#if (CONFIG_LED == LED_REAL)
297static inline void storage_set_led_enabled(bool enabled)
298{
299 (void)enabled;
300}
301#endif /*LED*/
302
303static inline long storage_last_disk_activity(void)
304{
305 return 0;
306}
307
308static inline int storage_spinup_time(void)
309{
310 return 0;
311}
312
313static inline void storage_get_info(IF_MV2(int drive,) struct storage_info *info)
314{
315 IF_MV((void)drive;)
316 (void)info;
317}
318
319#ifdef HAVE_HOTSWAP
320static inline bool storage_removable(IF_MV_NONVOID(int drive))
321{
322 IF_MV((void)drive;)
323 return 0;
324}
325
326static inline bool storage_present(IF_MV_NONVOID(int drive))
327{
328 IF_MV((void)drive;)
329 return 0;
330}
331#endif /* HOTSWAP */
332#endif /* SIMULATOR */
249#endif 333#endif