summaryrefslogtreecommitdiff
path: root/firmware/drivers/sd.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers/sd.c')
-rw-r--r--firmware/drivers/sd.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/firmware/drivers/sd.c b/firmware/drivers/sd.c
index 3e05b05742..d566e614d2 100644
--- a/firmware/drivers/sd.c
+++ b/firmware/drivers/sd.c
@@ -21,6 +21,7 @@
21 21
22#include "config.h" 22#include "config.h"
23#include "hotswap.h" 23#include "hotswap.h"
24#include "storage.h"
24 25
25static const unsigned char sd_mantissa[] = { /* *10 */ 26static const unsigned char sd_mantissa[] = { /* *10 */
26 0, 10, 12, 13, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 70, 80 }; 27 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)
75{ 76{
76 (void)seconds; 77 (void)seconds;
77} 78}
79
80#ifdef STORAGE_GET_INFO
81void sd_get_info(IF_MV2(int drive,) struct storage_info *info)
82{
83#ifndef HAVE_MULTIVOLUME
84 const int drive=0;
85#endif
86
87 tCardInfo *card = card_get_info_target(drive);
88
89 info->sector_size=card->blocksize;
90 info->num_sectors=card->numblocks;
91 info->vendor="Rockbox";
92#if CONFIG_STORAGE == STORAGE_SD
93 info->product = (drive==0) ? "Internal Storage" : "SD Card Slot";
94#else /* Internal storage is not SD */
95 info->product = "SD Card Slot";
96#endif
97 info->revision="0.00";
98}
99#endif
100