Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* You want to define this in the config files */
- #define CONFIG_STORAGE (STORAGE_SD | STORAGE_NAND)
- #define HAVE_HOTSWAP /* for card slot */
- /* For the NAND part */
- int nand_first_drive;
- int nand_num_drives(int first_drive)
- {
- nand_first_drive = first_drive;
- return 1; /* I have one NAND drive */
- }
- void nand_enable(bool on)
- {
- }
- void nand_spindown(int seconds)
- {
- }
- void nand_sleep(void)
- {
- }
- void nand_sleepnow(void)
- {
- }
- bool nand_disk_is_active(void)
- {
- }
- int nand_soft_reset(void)
- {
- }
- int nand_init(void)
- {
- }
- void nand_close(void)
- {
- }
- int nand_read_sectors(IF_MD2(int drive,) unsigned long start, int count, void* buf)
- {
- /* If you have one drive, drive will equals nand_first_drive.
- * If you have two drives, drive will equals nand_first_drive or nand_first_drive + 1
- * Etc */
- return -1;
- }
- int nand_write_sectors(IF_MD2(int drive,) unsigned long start, int count, const void* buf)
- {
- return -1;
- }
- /* Depends on your other defines then */
- #ifdef HAVE_STORAGE_FLUSH
- int nand_flush(void)
- {
- }
- #endif
- void nand_spin(void)
- {
- }
- int nand_spinup_time(void) /* ticks */
- {
- }
- #ifdef STORAGE_GET_INFO
- void nand_get_info(IF_MD2(int drive,) struct storage_info *info)
- {
- }
- #endif
- /* For the SD part */
- int sd_first_drive;
- int sd_num_drives(int first_drive)
- {
- sd_first_drive = first_drive;
- return 1; /* I have one SD drive */
- }
- 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_read_sectors(IF_MD2(int drive,) unsigned long start, int count, void* buf)
- {
- /* same thing as nand_read_sectors */
- return -1;
- }
- int sd_write_sectors(IF_MD2(int drive,) unsigned long start, int count, const void* buf)
- {
- return -1;
- }
- void sd_spin(void)
- {
- }
- int sd_spinup_time(void) /* ticks */
- {
- }
- #ifdef STORAGE_GET_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))
- {
- /* drive should equal sd_first_drive if you only have one SD drive */
- return true;
- }
- bool sd_present(IF_MV_NONVOID(int drive))
- {
- /* you need to implement this since it's a card slot */
- return false;
- }
- #endif
- long sd_last_disk_activity(void);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement