summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Gevaerts <frank@gevaerts.be>2008-11-02 02:19:39 +0000
committerFrank Gevaerts <frank@gevaerts.be>2008-11-02 02:19:39 +0000
commit99d39f5c3a4ffb89d849e2f425b903ccc5751d31 (patch)
tree0ced358dc1a87790136df59d9f1758113cd99523
parent8d68a567e448975f56a24dad60191d2e3788cb1a (diff)
downloadrockbox-99d39f5c3a4ffb89d849e2f425b903ccc5751d31.tar.gz
rockbox-99d39f5c3a4ffb89d849e2f425b903ccc5751d31.tar.bz2
rockbox-99d39f5c3a4ffb89d849e2f425b903ccc5751d31.zip
put stubs in the proper place
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18978 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/SOURCES2
-rw-r--r--firmware/storage-sim.c118
-rw-r--r--uisimulator/common/stubs.c36
3 files changed, 16 insertions, 140 deletions
diff --git a/firmware/SOURCES b/firmware/SOURCES
index 7bd809ca60..567fa1c579 100644
--- a/firmware/SOURCES
+++ b/firmware/SOURCES
@@ -122,8 +122,6 @@ drivers/fat.c
#if (CONFIG_STORAGE & STORAGE_MMC) || (CONFIG_STORAGE & STORAGE_SD)
hotswap.c
#endif
-#else /* SIMULATOR */
-storage-sim.c
#endif /* SIMULATOR */
/* EEPROM */
diff --git a/firmware/storage-sim.c b/firmware/storage-sim.c
deleted file mode 100644
index 24b3f18b4e..0000000000
--- a/firmware/storage-sim.c
+++ /dev/null
@@ -1,118 +0,0 @@
-/***************************************************************************
- * __________ __ ___.
- * Open \______ \ ____ ____ | | _\_ |__ _______ ___
- * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
- * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
- * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
- * \/ \/ \/ \/ \/
- * $Id: $
- *
- * Copyright (C) 2008 by Frank Gevaerts
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-#include "config.h" /* for HAVE_MULTIVOLUME or not */
-#include "storage.h"
-
-#ifdef SIMULATOR
-void storage_enable(bool on)
-{
- (void)on;
-}
-void storage_sleep(void)
-{
-}
-void storage_sleepnow(void)
-{
-}
-bool storage_disk_is_active(void)
-{
- return 0;
-}
-int storage_hard_reset(void)
-{
- return 0;
-}
-int storage_soft_reset(void)
-{
- return 0;
-}
-int storage_init(void)
-{
- return 0;
-}
-void storage_close(void)
-{
-}
-int storage_read_sectors(int drive, unsigned long start, int count, void* buf)
-{
- (void)drive;
- (void)start;
- (void)count;
- (void)buf;
- return 0;
-}
-int storage_write_sectors(int drive, unsigned long start, int count, const void* buf)
-{
- (void)drive;
- (void)start;
- (void)count;
- (void)buf;
- return 0;
-}
-
-void storage_spin(void)
-{
-}
-void storage_spindown(int seconds)
-{
- (void)seconds;
-}
-
-#if (CONFIG_LED == LED_REAL)
-void storage_set_led_enabled(bool enabled)
-{
- (void)enabled;
-}
-#endif /*LED*/
-
-long storage_last_disk_activity(void)
-{
- return 0;
-}
-
-int storage_spinup_time(void)
-{
- return 0;
-}
-
-#ifdef STORAGE_GET_INFO
-void storage_get_info(int drive, struct storage_info *info)
-{
- (void)drive;
- (void)info;
-}
-#endif
-
-#ifdef HAVE_HOTSWAP
-bool storage_removable(int drive)
-{
- (void)drive;
- return 0;
-}
-
-bool storage_present(int drive)
-{
- (void)drive;
- return 0;
-}
-#endif /* HOTSWAP */
-
-#endif
diff --git a/uisimulator/common/stubs.c b/uisimulator/common/stubs.c
index 7b630eb25b..169ce06067 100644
--- a/uisimulator/common/stubs.c
+++ b/uisimulator/common/stubs.c
@@ -33,7 +33,7 @@
#include "ata.h" /* for volume definitions */
extern char having_new_lcd;
-static bool ata_spinning = false;
+static bool storage_spinning = false;
#if CONFIG_CODEC != SWCODEC
void audio_set_buffer_margin(int seconds)
@@ -53,7 +53,12 @@ bool fat_ismounted(int volume)
return true;
}
-int ata_write_sectors(IF_MV2(int drive,)
+int storage_init(void)
+{
+ return 1;
+}
+
+int storage_write_sectors(IF_MV2(int drive,)
unsigned long start,
int count,
const void* buf)
@@ -75,7 +80,7 @@ int ata_write_sectors(IF_MV2(int drive,)
return 1;
}
-int ata_read_sectors(IF_MV2(int drive,)
+int storage_read_sectors(IF_MV2(int drive,)
unsigned long start,
int count,
void* buf)
@@ -98,34 +103,25 @@ int ata_read_sectors(IF_MV2(int drive,)
return 1;
}
-void ata_delayed_write(unsigned long sector, const void* buf)
-{
- ata_write_sectors(IF_MV2(0,) sector, 1, buf);
-}
-
-void ata_flush(void)
-{
-}
-
-void ata_spin(void)
+void storage_spin(void)
{
- ata_spinning = true;
+ storage_spinning = true;
}
-void ata_sleep(void)
+void storage_sleep(void)
{
- DEBUGF("ata_sleep()\n");
+ DEBUGF("storage_sleep()\n");
}
-bool ata_disk_is_active(void)
+bool storage_disk_is_active(void)
{
- return ata_spinning;
+ return storage_spinning;
}
-void ata_spindown(int s)
+void storage_spindown(int s)
{
(void)s;
- ata_spinning = false;
+ storage_spinning = false;
}
void rtc_init(void)