summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2009-07-17 00:09:14 +0000
committerRafaël Carré <rafael.carre@gmail.com>2009-07-17 00:09:14 +0000
commit8eba69f91ba361b49cec5b546496f6251a638c47 (patch)
tree3dc49543ddb1bb7a44a5b1dd2e2beea2ee3a500d /apps
parent20f8666b89f2ec7290d195732d5dc33d20cf3580 (diff)
downloadrockbox-8eba69f91ba361b49cec5b546496f6251a638c47.tar.gz
rockbox-8eba69f91ba361b49cec5b546496f6251a638c47.zip
Storage API : remove undeeded target-specific functions
storage_sleep, storage_spin, storage_spindown are only defined if #defiend (HAVE_DISK_STORAGE), not for MMC/ATA/SD remove already unneeded nand_disk_is_active, nand_soft_reset git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21912 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/plugin.c2
-rw-r--r--apps/plugin.h6
-rw-r--r--apps/plugins/clock/clock_settings.c2
-rw-r--r--apps/plugins/jpeg/jpeg.c2
-rw-r--r--apps/plugins/mpegplayer/disk_buf.c6
-rw-r--r--apps/plugins/video.c2
-rw-r--r--apps/plugins/wavplay.c2
7 files changed, 20 insertions, 2 deletions
diff --git a/apps/plugin.c b/apps/plugin.c
index 84200bbf05..4b7eb28b3d 100644
--- a/apps/plugin.c
+++ b/apps/plugin.c
@@ -284,9 +284,11 @@ static const struct plugin_api rockbox_api = {
284 fdprintf, 284 fdprintf,
285 read_line, 285 read_line,
286 settings_parseline, 286 settings_parseline,
287#ifdef HAVE_DISK_STORAGE
287 storage_sleep, 288 storage_sleep,
288 storage_spin, 289 storage_spin,
289 storage_spindown, 290 storage_spindown,
291#endif
290#if USING_STORAGE_CALLBACK 292#if USING_STORAGE_CALLBACK
291 register_storage_idle_func, 293 register_storage_idle_func,
292 unregister_storage_idle_func, 294 unregister_storage_idle_func,
diff --git a/apps/plugin.h b/apps/plugin.h
index 74daa2a67b..ebb2518c78 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -129,12 +129,12 @@ void* plugin_get_buffer(size_t *buffer_size);
129#define PLUGIN_MAGIC 0x526F634B /* RocK */ 129#define PLUGIN_MAGIC 0x526F634B /* RocK */
130 130
131/* increase this every time the api struct changes */ 131/* increase this every time the api struct changes */
132#define PLUGIN_API_VERSION 162 132#define PLUGIN_API_VERSION 163
133 133
134/* update this to latest version if a change to the api struct breaks 134/* update this to latest version if a change to the api struct breaks
135 backwards compatibility (and please take the opportunity to sort in any 135 backwards compatibility (and please take the opportunity to sort in any
136 new function which are "waiting" at the end of the function table) */ 136 new function which are "waiting" at the end of the function table) */
137#define PLUGIN_MIN_API_VERSION 162 137#define PLUGIN_MIN_API_VERSION 163
138 138
139/* plugin return codes */ 139/* plugin return codes */
140enum plugin_status { 140enum plugin_status {
@@ -395,9 +395,11 @@ struct plugin_api {
395 int (*fdprintf)(int fd, const char *fmt, ...) ATTRIBUTE_PRINTF(2, 3); 395 int (*fdprintf)(int fd, const char *fmt, ...) ATTRIBUTE_PRINTF(2, 3);
396 int (*read_line)(int fd, char* buffer, int buffer_size); 396 int (*read_line)(int fd, char* buffer, int buffer_size);
397 bool (*settings_parseline)(char* line, char** name, char** value); 397 bool (*settings_parseline)(char* line, char** name, char** value);
398#ifdef HAVE_DISK_STORAGE
398 void (*storage_sleep)(void); 399 void (*storage_sleep)(void);
399 void (*storage_spin)(void); 400 void (*storage_spin)(void);
400 void (*storage_spindown)(int seconds); 401 void (*storage_spindown)(int seconds);
402#endif
401#if USING_STORAGE_CALLBACK 403#if USING_STORAGE_CALLBACK
402 void (*register_storage_idle_func)(storage_idle_notify function); 404 void (*register_storage_idle_func)(storage_idle_notify function);
403 void (*unregister_storage_idle_func)(storage_idle_notify function, bool run); 405 void (*unregister_storage_idle_func)(storage_idle_notify function, bool run);
diff --git a/apps/plugins/clock/clock_settings.c b/apps/plugins/clock/clock_settings.c
index d765cbb0da..ef3114a943 100644
--- a/apps/plugins/clock/clock_settings.c
+++ b/apps/plugins/clock/clock_settings.c
@@ -173,7 +173,9 @@ void load_settings(void){
173 draw_message(display, MESSAGE_ERRLOAD, 1); 173 draw_message(display, MESSAGE_ERRLOAD, 1);
174 display->update(); 174 display->update();
175 } 175 }
176#ifdef HAVE_DISK_STORAGE
176 rb->storage_sleep(); 177 rb->storage_sleep();
178#endif
177 rb->sleep(HZ); 179 rb->sleep(HZ);
178} 180}
179 181
diff --git a/apps/plugins/jpeg/jpeg.c b/apps/plugins/jpeg/jpeg.c
index fc98834a7d..685122bb1a 100644
--- a/apps/plugins/jpeg/jpeg.c
+++ b/apps/plugins/jpeg/jpeg.c
@@ -1038,7 +1038,9 @@ int load_and_show(char* filename)
1038 else if(immediate_ata_off) 1038 else if(immediate_ata_off)
1039 { 1039 {
1040 /* running slideshow and time is long enough: power down disk */ 1040 /* running slideshow and time is long enough: power down disk */
1041#ifdef HAVE_DISK_STORAGE
1041 rb->storage_sleep(); 1042 rb->storage_sleep();
1043#endif
1042 } 1044 }
1043#endif 1045#endif
1044 1046
diff --git a/apps/plugins/mpegplayer/disk_buf.c b/apps/plugins/mpegplayer/disk_buf.c
index defd8ef81d..4328606a1e 100644
--- a/apps/plugins/mpegplayer/disk_buf.c
+++ b/apps/plugins/mpegplayer/disk_buf.c
@@ -172,7 +172,9 @@ static inline void disk_buf_buffer(void)
172 if (!stream_get_window(&sw)) 172 if (!stream_get_window(&sw))
173 { 173 {
174 disk_buf.state = TSTATE_DATA; 174 disk_buf.state = TSTATE_DATA;
175#ifdef HAVE_DISK_STORAGE
175 rb->storage_sleep(); 176 rb->storage_sleep();
177#endif
176 break; 178 break;
177 } 179 }
178 180
@@ -187,7 +189,9 @@ static inline void disk_buf_buffer(void)
187 /* Free space is less than one page */ 189 /* Free space is less than one page */
188 disk_buf.state = TSTATE_DATA; 190 disk_buf.state = TSTATE_DATA;
189 disk_buf.low_wm = DISK_BUF_LOW_WATERMARK; 191 disk_buf.low_wm = DISK_BUF_LOW_WATERMARK;
192#ifdef HAVE_DISK_STORAGE
190 rb->storage_sleep(); 193 rb->storage_sleep();
194#endif
191 break; 195 break;
192 } 196 }
193 197
@@ -209,7 +213,9 @@ static inline void disk_buf_buffer(void)
209 { 213 {
210 /* Error or end of stream */ 214 /* Error or end of stream */
211 disk_buf.state = TSTATE_EOS; 215 disk_buf.state = TSTATE_EOS;
216#ifdef HAVE_DISK_STORAGE
212 rb->storage_sleep(); 217 rb->storage_sleep();
218#endif
213 break; 219 break;
214 } 220 }
215 221
diff --git a/apps/plugins/video.c b/apps/plugins/video.c
index 6b0a47c7c6..8ead0a72f3 100644
--- a/apps/plugins/video.c
+++ b/apps/plugins/video.c
@@ -681,7 +681,9 @@ int PlayTick(int fd)
681#endif 681#endif
682 ) 682 )
683 { 683 {
684#ifdef HAVE_DISK_STORAGE
684 rb->storage_sleep(); /* no point in leaving the disk run til timeout */ 685 rb->storage_sleep(); /* no point in leaving the disk run til timeout */
686#endif
685 gPlay.bDiskSleep = true; 687 gPlay.bDiskSleep = true;
686 } 688 }
687 689
diff --git a/apps/plugins/wavplay.c b/apps/plugins/wavplay.c
index 368d8e3475..9cb784b54d 100644
--- a/apps/plugins/wavplay.c
+++ b/apps/plugins/wavplay.c
@@ -3596,7 +3596,9 @@ int play_file(char* filename)
3596 if (free_space <= 0) 3596 if (free_space <= 0)
3597 { 3597 {
3598 filling = false; 3598 filling = false;
3599#ifdef HAVE_DISK_STORAGE
3599 rb->storage_sleep(); 3600 rb->storage_sleep();
3601#endif
3600 } 3602 }
3601 else 3603 else
3602 { 3604 {