summaryrefslogtreecommitdiff
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.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
122#if (CONFIG_STORAGE & STORAGE_MMC) || (CONFIG_STORAGE & STORAGE_SD) 122#if (CONFIG_STORAGE & STORAGE_MMC) || (CONFIG_STORAGE & STORAGE_SD)
123hotswap.c 123hotswap.c
124#endif 124#endif
125#else /* SIMULATOR */
126storage-sim.c
127#endif /* SIMULATOR */ 125#endif /* SIMULATOR */
128 126
129/* EEPROM */ 127/* 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 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id: $
9 *
10 * Copyright (C) 2008 by Frank Gevaerts
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
16 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21#include "config.h" /* for HAVE_MULTIVOLUME or not */
22#include "storage.h"
23
24#ifdef SIMULATOR
25void storage_enable(bool on)
26{
27 (void)on;
28}
29void storage_sleep(void)
30{
31}
32void storage_sleepnow(void)
33{
34}
35bool storage_disk_is_active(void)
36{
37 return 0;
38}
39int storage_hard_reset(void)
40{
41 return 0;
42}
43int storage_soft_reset(void)
44{
45 return 0;
46}
47int storage_init(void)
48{
49 return 0;
50}
51void storage_close(void)
52{
53}
54int storage_read_sectors(int drive, unsigned long start, int count, void* buf)
55{
56 (void)drive;
57 (void)start;
58 (void)count;
59 (void)buf;
60 return 0;
61}
62int storage_write_sectors(int drive, unsigned long start, int count, const void* buf)
63{
64 (void)drive;
65 (void)start;
66 (void)count;
67 (void)buf;
68 return 0;
69}
70
71void storage_spin(void)
72{
73}
74void storage_spindown(int seconds)
75{
76 (void)seconds;
77}
78
79#if (CONFIG_LED == LED_REAL)
80void storage_set_led_enabled(bool enabled)
81{
82 (void)enabled;
83}
84#endif /*LED*/
85
86long storage_last_disk_activity(void)
87{
88 return 0;
89}
90
91int storage_spinup_time(void)
92{
93 return 0;
94}
95
96#ifdef STORAGE_GET_INFO
97void storage_get_info(int drive, struct storage_info *info)
98{
99 (void)drive;
100 (void)info;
101}
102#endif
103
104#ifdef HAVE_HOTSWAP
105bool storage_removable(int drive)
106{
107 (void)drive;
108 return 0;
109}
110
111bool storage_present(int drive)
112{
113 (void)drive;
114 return 0;
115}
116#endif /* HOTSWAP */
117
118#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 @@
33#include "ata.h" /* for volume definitions */ 33#include "ata.h" /* for volume definitions */
34 34
35extern char having_new_lcd; 35extern char having_new_lcd;
36static bool ata_spinning = false; 36static bool storage_spinning = false;
37 37
38#if CONFIG_CODEC != SWCODEC 38#if CONFIG_CODEC != SWCODEC
39void audio_set_buffer_margin(int seconds) 39void audio_set_buffer_margin(int seconds)
@@ -53,7 +53,12 @@ bool fat_ismounted(int volume)
53 return true; 53 return true;
54} 54}
55 55
56int ata_write_sectors(IF_MV2(int drive,) 56int storage_init(void)
57{
58 return 1;
59}
60
61int storage_write_sectors(IF_MV2(int drive,)
57 unsigned long start, 62 unsigned long start,
58 int count, 63 int count,
59 const void* buf) 64 const void* buf)
@@ -75,7 +80,7 @@ int ata_write_sectors(IF_MV2(int drive,)
75 return 1; 80 return 1;
76} 81}
77 82
78int ata_read_sectors(IF_MV2(int drive,) 83int storage_read_sectors(IF_MV2(int drive,)
79 unsigned long start, 84 unsigned long start,
80 int count, 85 int count,
81 void* buf) 86 void* buf)
@@ -98,34 +103,25 @@ int ata_read_sectors(IF_MV2(int drive,)
98 return 1; 103 return 1;
99} 104}
100 105
101void ata_delayed_write(unsigned long sector, const void* buf) 106void storage_spin(void)
102{
103 ata_write_sectors(IF_MV2(0,) sector, 1, buf);
104}
105
106void ata_flush(void)
107{
108}
109
110void ata_spin(void)
111{ 107{
112 ata_spinning = true; 108 storage_spinning = true;
113} 109}
114 110
115void ata_sleep(void) 111void storage_sleep(void)
116{ 112{
117 DEBUGF("ata_sleep()\n"); 113 DEBUGF("storage_sleep()\n");
118} 114}
119 115
120bool ata_disk_is_active(void) 116bool storage_disk_is_active(void)
121{ 117{
122 return ata_spinning; 118 return storage_spinning;
123} 119}
124 120
125void ata_spindown(int s) 121void storage_spindown(int s)
126{ 122{
127 (void)s; 123 (void)s;
128 ata_spinning = false; 124 storage_spinning = false;
129} 125}
130 126
131void rtc_init(void) 127void rtc_init(void)