forked from len0rd/rockbox
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
This commit is contained in:
parent
646cac0bde
commit
2f8a0081c6
64 changed files with 541 additions and 554 deletions
|
|
@ -26,7 +26,7 @@
|
|||
#include <ctype.h>
|
||||
#include "buffering.h"
|
||||
|
||||
#include "ata.h"
|
||||
#include "storage.h"
|
||||
#include "system.h"
|
||||
#include "thread.h"
|
||||
#include "file.h"
|
||||
|
|
@ -832,7 +832,7 @@ static bool fill_buffer(void)
|
|||
{
|
||||
/* only spin the disk down if the filling wasn't interrupted by an
|
||||
event arriving in the queue. */
|
||||
ata_sleep();
|
||||
storage_sleep();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -1408,7 +1408,7 @@ void buffering_thread(void)
|
|||
* for simplicity until its done right */
|
||||
#if MEM > 8
|
||||
/* If the disk is spinning, take advantage by filling the buffer */
|
||||
else if (ata_disk_is_active() && queue_empty(&buffering_queue))
|
||||
else if (storage_disk_is_active() && queue_empty(&buffering_queue))
|
||||
{
|
||||
if (num_handles > 0 && data_counters.useful <= high_watermark)
|
||||
send_event(BUFFER_EVENT_BUFFER_LOW, 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue