forked from len0rd/rockbox
Commit FS#9545, storage cleanup and multi-driver support
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21933 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
bb3b57f645
commit
c0a5a67387
37 changed files with 1157 additions and 315 deletions
|
|
@ -23,7 +23,7 @@
|
|||
#define __SD_H__
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "mv.h" /* for HAVE_MULTIVOLUME or not */
|
||||
#include "mv.h" /* for HAVE_MULTIDRIVE or not */
|
||||
|
||||
#define SD_BLOCK_SIZE 512 /* XXX : support other sizes ? */
|
||||
|
||||
|
|
@ -32,27 +32,34 @@ struct storage_info;
|
|||
void sd_enable(bool on);
|
||||
void sd_spindown(int seconds);
|
||||
void sd_sleep(void);
|
||||
void sd_sleepnow(void);
|
||||
bool sd_disk_is_active(void);
|
||||
int sd_soft_reset(void);
|
||||
int sd_init(void);
|
||||
int sd_soft_reset(void);
|
||||
int sd_init(void);
|
||||
void sd_close(void);
|
||||
int sd_read_sectors(IF_MV2(int drive,) unsigned long start, int count, void* buf);
|
||||
int sd_write_sectors(IF_MV2(int drive,) unsigned long start, int count, const void* buf);
|
||||
int sd_read_sectors(IF_MD2(int drive,) unsigned long start, int count, void* buf);
|
||||
int sd_write_sectors(IF_MD2(int drive,) unsigned long start, int count, const void* buf);
|
||||
void sd_spin(void);
|
||||
int sd_spinup_time(void); /* ticks */
|
||||
|
||||
#ifdef STORAGE_GET_INFO
|
||||
void sd_get_info(IF_MV2(int drive,) struct storage_info *info);
|
||||
void sd_get_info(IF_MD2(int drive,) struct storage_info *info);
|
||||
#endif
|
||||
#ifdef HAVE_HOTSWAP
|
||||
bool sd_removable(IF_MV_NONVOID(int drive));
|
||||
bool sd_present(IF_MV_NONVOID(int drive));
|
||||
void card_enable_monitoring_target(bool on);
|
||||
void card_enable_monitoring_target(bool on);
|
||||
#endif
|
||||
|
||||
bool card_detect_target(void);
|
||||
bool card_detect_target(void);
|
||||
|
||||
long sd_last_disk_activity(void);
|
||||
|
||||
#ifdef CONFIG_STORAGE_MULTI
|
||||
int sd_num_drives(int first_drive);
|
||||
#endif
|
||||
|
||||
|
||||
/* SD States */
|
||||
#define SD_IDLE 0
|
||||
#define SD_READY 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue