summaryrefslogtreecommitdiffstats
path: root/firmware/export/storage.h
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 /firmware/export/storage.h
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
Diffstat (limited to 'firmware/export/storage.h')
-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
void storage_spindown(int seconds);
+#ifndef SIMULATOR
static inline void storage_enable(bool on)
{
#if (CONFIG_STORAGE & STORAGE_ATA)
@@ -102,7 +103,6 @@ static inline int storage_soft_reset(void)
}
static inline int storage_init(void)
{
-#ifndef SIMULATOR
#if (CONFIG_STORAGE & STORAGE_ATA)
return ata_init();
#elif (CONFIG_STORAGE & STORAGE_SD)
@@ -114,9 +114,6 @@ static inline int storage_init(void)
#else
#error No storage driver!
#endif
-#else
- return 0;
-#endif
}
static inline void storage_close(void)
{
@@ -174,7 +171,7 @@ static inline void storage_set_led_enabled(bool enabled)
#error No storage driver!
#endif
}
-#endif
+#endif /*LED*/
static inline long storage_last_disk_activity(void)
{
@@ -245,5 +242,92 @@ static inline bool storage_present(IF_MV_NONVOID(int drive))
#error No storage driver!
#endif
}
-#endif
+#endif /* HOTSWAP */
+#else /* SIMULATOR */
+static inline void storage_enable(bool on)
+{
+ (void)on;
+}
+static inline void storage_sleep(void)
+{
+}
+static inline void storage_sleepnow(void)
+{
+}
+static inline bool storage_disk_is_active(void)
+{
+ return 0;
+}
+static inline int storage_hard_reset(void)
+{
+ return 0;
+}
+static inline int storage_soft_reset(void)
+{
+ return 0;
+}
+static inline int storage_init(void)
+{
+ return 0;
+}
+static inline void storage_close(void)
+{
+}
+static inline int storage_read_sectors(IF_MV2(int drive,) unsigned long start, int count, void* buf)
+{
+ IF_MV((void)drive;)
+ (void)start;
+ (void)count;
+ (void)buf;
+ return 0;
+}
+static inline int storage_write_sectors(IF_MV2(int drive,) unsigned long start, int count, const void* buf)
+{
+ IF_MV((void)drive;)
+ (void)start;
+ (void)count;
+ (void)buf;
+ return 0;
+}
+static inline void storage_spin(void)
+{
+}
+
+#if (CONFIG_LED == LED_REAL)
+static inline void storage_set_led_enabled(bool enabled)
+{
+ (void)enabled;
+}
+#endif /*LED*/
+
+static inline long storage_last_disk_activity(void)
+{
+ return 0;
+}
+
+static inline int storage_spinup_time(void)
+{
+ return 0;
+}
+
+static inline void storage_get_info(IF_MV2(int drive,) struct storage_info *info)
+{
+ IF_MV((void)drive;)
+ (void)info;
+}
+
+#ifdef HAVE_HOTSWAP
+static inline bool storage_removable(IF_MV_NONVOID(int drive))
+{
+ IF_MV((void)drive;)
+ return 0;
+}
+
+static inline bool storage_present(IF_MV_NONVOID(int drive))
+{
+ IF_MV((void)drive;)
+ return 0;
+}
+#endif /* HOTSWAP */
+#endif /* SIMULATOR */
#endif