summaryrefslogtreecommitdiff
path: root/apps/buffering.c
diff options
context:
space:
mode:
authorFrank Gevaerts <frank@gevaerts.be>2008-11-01 16:14:28 +0000
committerFrank Gevaerts <frank@gevaerts.be>2008-11-01 16:14:28 +0000
commit2f8a0081c64534da23fc0fa9cc685eb7454fd9c9 (patch)
tree84dbdbd5326cb48f43d2ebd5a4c86e992c1d5288 /apps/buffering.c
parent646cac0bde7b11fa7bcb670d1d76eec78e360485 (diff)
downloadrockbox-2f8a0081c64534da23fc0fa9cc685eb7454fd9c9.tar.gz
rockbox-2f8a0081c64534da23fc0fa9cc685eb7454fd9c9.zip
Apply FS#9500. This adds a storage_*() abstraction to replace ata_*(). To do that, it also introduces sd_*, nand_*, and mmc_*.
This should be a good first step to allow multi-driver targets, like the Elio (ATA/SD), or the D2 (NAND/SD). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18960 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/buffering.c')
-rw-r--r--apps/buffering.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/buffering.c b/apps/buffering.c
index d963a983a6..534a82d7b9 100644
--- a/apps/buffering.c
+++ b/apps/buffering.c
@@ -26,7 +26,7 @@
26#include <ctype.h> 26#include <ctype.h>
27#include "buffering.h" 27#include "buffering.h"
28 28
29#include "ata.h" 29#include "storage.h"
30#include "system.h" 30#include "system.h"
31#include "thread.h" 31#include "thread.h"
32#include "file.h" 32#include "file.h"
@@ -832,7 +832,7 @@ static bool fill_buffer(void)
832 { 832 {
833 /* only spin the disk down if the filling wasn't interrupted by an 833 /* only spin the disk down if the filling wasn't interrupted by an
834 event arriving in the queue. */ 834 event arriving in the queue. */
835 ata_sleep(); 835 storage_sleep();
836 return false; 836 return false;
837 } 837 }
838} 838}
@@ -1408,7 +1408,7 @@ void buffering_thread(void)
1408 * for simplicity until its done right */ 1408 * for simplicity until its done right */
1409#if MEM > 8 1409#if MEM > 8
1410 /* If the disk is spinning, take advantage by filling the buffer */ 1410 /* If the disk is spinning, take advantage by filling the buffer */
1411 else if (ata_disk_is_active() && queue_empty(&buffering_queue)) 1411 else if (storage_disk_is_active() && queue_empty(&buffering_queue))
1412 { 1412 {
1413 if (num_handles > 0 && data_counters.useful <= high_watermark) 1413 if (num_handles > 0 && data_counters.useful <= high_watermark)
1414 send_event(BUFFER_EVENT_BUFFER_LOW, 0); 1414 send_event(BUFFER_EVENT_BUFFER_LOW, 0);