diff options
| author | Rafaël Carré <rafael.carre@gmail.com> | 2009-07-01 23:39:57 +0000 |
|---|---|---|
| committer | Rafaël Carré <rafael.carre@gmail.com> | 2009-07-01 23:39:57 +0000 |
| commit | 293b499093baef544f7148a0fcfa18d28ed3d1ea (patch) | |
| tree | d1b7dc73085f2d443a683cd40569ef3d9b558c6e /firmware/drivers | |
| parent | ccbd8f4f31ec7f2c2ca03d3ac57ccdb28afc132c (diff) | |
| download | rockbox-293b499093baef544f7148a0fcfa18d28ed3d1ea.zip rockbox-293b499093baef544f7148a0fcfa18d28ed3d1ea.tar.gz rockbox-293b499093baef544f7148a0fcfa18d28ed3d1ea.tar.bz2 rockbox-293b499093baef544f7148a0fcfa18d28ed3d1ea.tar.xz | |
Move sd_get_info() into common sd code
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21610 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers')
| -rw-r--r-- | firmware/drivers/sd.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/firmware/drivers/sd.c b/firmware/drivers/sd.c index 3e05b05..d566e61 100644 --- a/firmware/drivers/sd.c +++ b/firmware/drivers/sd.c @@ -21,6 +21,7 @@ #include "config.h" #include "hotswap.h" +#include "storage.h" static const unsigned char sd_mantissa[] = { /* *10 */ 0, 10, 12, 13, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 70, 80 }; @@ -75,3 +76,25 @@ void sd_spindown(int seconds) { (void)seconds; } + +#ifdef STORAGE_GET_INFO +void sd_get_info(IF_MV2(int drive,) struct storage_info *info) +{ +#ifndef HAVE_MULTIVOLUME + const int drive=0; +#endif + + tCardInfo *card = card_get_info_target(drive); + + info->sector_size=card->blocksize; + info->num_sectors=card->numblocks; + info->vendor="Rockbox"; +#if CONFIG_STORAGE == STORAGE_SD + info->product = (drive==0) ? "Internal Storage" : "SD Card Slot"; +#else /* Internal storage is not SD */ + info->product = "SD Card Slot"; +#endif + info->revision="0.00"; +} +#endif + |