summaryrefslogtreecommitdiff
path: root/firmware/export
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/export')
-rw-r--r--firmware/export/ata.h3
-rw-r--r--firmware/export/config.h4
-rw-r--r--firmware/export/mmc.h2
-rw-r--r--firmware/export/nand.h2
-rw-r--r--firmware/export/sd.h2
-rw-r--r--firmware/export/storage.h4
6 files changed, 17 insertions, 0 deletions
diff --git a/firmware/export/ata.h b/firmware/export/ata.h
index f09a4630d3..a5c2f6292a 100644
--- a/firmware/export/ata.h
+++ b/firmware/export/ata.h
@@ -47,7 +47,10 @@ void ata_spin(void);
47void ata_set_led_enabled(bool enabled); 47void ata_set_led_enabled(bool enabled);
48#endif 48#endif
49unsigned short* ata_get_identify(void); 49unsigned short* ata_get_identify(void);
50
51#ifdef STORAGE_GET_INFO
50void ata_get_info(IF_MV2(int drive,) struct storage_info *info); 52void ata_get_info(IF_MV2(int drive,) struct storage_info *info);
53#endif
51#ifdef HAVE_HOTSWAP 54#ifdef HAVE_HOTSWAP
52bool ata_removable(IF_MV_NONVOID(int drive)); 55bool ata_removable(IF_MV_NONVOID(int drive));
53bool ata_present(IF_MV_NONVOID(int drive)); 56bool ata_present(IF_MV_NONVOID(int drive));
diff --git a/firmware/export/config.h b/firmware/export/config.h
index e04397b5bb..22a0bd2244 100644
--- a/firmware/export/config.h
+++ b/firmware/export/config.h
@@ -624,4 +624,8 @@
624#endif 624#endif
625#endif /* HAVE_HEADPHONE_DETECTION */ 625#endif /* HAVE_HEADPHONE_DETECTION */
626 626
627#if defined(HAVE_USBSTACK) || (CONFIG_STORAGE & STORAGE_NAND)
628#define STORAGE_GET_INFO
629#endif
630
627#endif /* __CONFIG_H__ */ 631#endif /* __CONFIG_H__ */
diff --git a/firmware/export/mmc.h b/firmware/export/mmc.h
index 2e7fb2441d..271d910763 100644
--- a/firmware/export/mmc.h
+++ b/firmware/export/mmc.h
@@ -44,7 +44,9 @@ void mmc_spin(void);
44void mmc_set_led_enabled(bool enabled); 44void mmc_set_led_enabled(bool enabled);
45#endif 45#endif
46 46
47#ifdef STORAGE_GET_INFO
47void mmc_get_info(IF_MV2(int drive,) struct storage_info *info); 48void mmc_get_info(IF_MV2(int drive,) struct storage_info *info);
49#endif
48#ifdef HAVE_HOTSWAP 50#ifdef HAVE_HOTSWAP
49bool mmc_removable(IF_MV_NONVOID(int drive)); 51bool mmc_removable(IF_MV_NONVOID(int drive));
50bool mmc_present(IF_MV_NONVOID(int drive)); 52bool mmc_present(IF_MV_NONVOID(int drive));
diff --git a/firmware/export/nand.h b/firmware/export/nand.h
index 3d4d1ce166..25aed46629 100644
--- a/firmware/export/nand.h
+++ b/firmware/export/nand.h
@@ -43,7 +43,9 @@ void nand_spin(void);
43void nand_set_led_enabled(bool enabled); 43void nand_set_led_enabled(bool enabled);
44#endif 44#endif
45 45
46#ifdef STORAGE_GET_INFO
46void nand_get_info(IF_MV2(int drive,) struct storage_info *info); 47void nand_get_info(IF_MV2(int drive,) struct storage_info *info);
48#endif
47 49
48long nand_last_disk_activity(void); 50long nand_last_disk_activity(void);
49 51
diff --git a/firmware/export/sd.h b/firmware/export/sd.h
index 8e1fa88ceb..fbb66cc9a9 100644
--- a/firmware/export/sd.h
+++ b/firmware/export/sd.h
@@ -43,7 +43,9 @@ void sd_spin(void);
43void sd_set_led_enabled(bool enabled); 43void sd_set_led_enabled(bool enabled);
44#endif 44#endif
45 45
46#ifdef STORAGE_GET_INFO
46void sd_get_info(IF_MV2(int drive,) struct storage_info *info); 47void sd_get_info(IF_MV2(int drive,) struct storage_info *info);
48#endif
47#ifdef HAVE_HOTSWAP 49#ifdef HAVE_HOTSWAP
48bool sd_removable(IF_MV_NONVOID(int drive)); 50bool sd_removable(IF_MV_NONVOID(int drive));
49bool sd_present(IF_MV_NONVOID(int drive)); 51bool sd_present(IF_MV_NONVOID(int drive));
diff --git a/firmware/export/storage.h b/firmware/export/storage.h
index 78d3360ba9..52c6f2bed1 100644
--- a/firmware/export/storage.h
+++ b/firmware/export/storage.h
@@ -197,6 +197,7 @@ static inline int storage_spinup_time(void)
197#endif 197#endif
198} 198}
199 199
200#ifdef STORAGE_GET_INFO
200static inline void storage_get_info(IF_MV2(int drive,) struct storage_info *info) 201static inline void storage_get_info(IF_MV2(int drive,) struct storage_info *info)
201{ 202{
202#if (CONFIG_STORAGE & STORAGE_ATA) 203#if (CONFIG_STORAGE & STORAGE_ATA)
@@ -211,6 +212,7 @@ static inline void storage_get_info(IF_MV2(int drive,) struct storage_info *info
211 #error No storage driver! 212 #error No storage driver!
212#endif 213#endif
213} 214}
215#endif
214 216
215#ifdef HAVE_HOTSWAP 217#ifdef HAVE_HOTSWAP
216static inline bool storage_removable(IF_MV_NONVOID(int drive)) 218static inline bool storage_removable(IF_MV_NONVOID(int drive))
@@ -310,11 +312,13 @@ static inline int storage_spinup_time(void)
310 return 0; 312 return 0;
311} 313}
312 314
315#ifdef STORAGE_GET_INFO
313static inline void storage_get_info(IF_MV2(int drive,) struct storage_info *info) 316static inline void storage_get_info(IF_MV2(int drive,) struct storage_info *info)
314{ 317{
315 IF_MV((void)drive;) 318 IF_MV((void)drive;)
316 (void)info; 319 (void)info;
317} 320}
321#endif
318 322
319#ifdef HAVE_HOTSWAP 323#ifdef HAVE_HOTSWAP
320static inline bool storage_removable(IF_MV_NONVOID(int drive)) 324static inline bool storage_removable(IF_MV_NONVOID(int drive))