summaryrefslogtreecommitdiff
path: root/firmware/export
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/export')
-rw-r--r--firmware/export/config.h6
-rw-r--r--firmware/export/hostfs.h2
-rw-r--r--firmware/export/mv.h3
-rw-r--r--firmware/export/storage.h8
4 files changed, 17 insertions, 2 deletions
diff --git a/firmware/export/config.h b/firmware/export/config.h
index 7e8d751090..547c359d8d 100644
--- a/firmware/export/config.h
+++ b/firmware/export/config.h
@@ -32,14 +32,16 @@
32#define STORAGE_SD_NUM 2 32#define STORAGE_SD_NUM 2
33#define STORAGE_NAND_NUM 3 33#define STORAGE_NAND_NUM 3
34#define STORAGE_RAMDISK_NUM 4 34#define STORAGE_RAMDISK_NUM 4
35#define STORAGE_HOSTFS_NUM 5 35#define STORAGE_USB_NUM 5
36#define STORAGE_NUM_TYPES 6 36#define STORAGE_HOSTFS_NUM 6
37#define STORAGE_NUM_TYPES 7
37 38
38#define STORAGE_ATA (1 << STORAGE_ATA_NUM) 39#define STORAGE_ATA (1 << STORAGE_ATA_NUM)
39#define STORAGE_MMC (1 << STORAGE_MMC_NUM) 40#define STORAGE_MMC (1 << STORAGE_MMC_NUM)
40#define STORAGE_SD (1 << STORAGE_SD_NUM) 41#define STORAGE_SD (1 << STORAGE_SD_NUM)
41#define STORAGE_NAND (1 << STORAGE_NAND_NUM) 42#define STORAGE_NAND (1 << STORAGE_NAND_NUM)
42#define STORAGE_RAMDISK (1 << STORAGE_RAMDISK_NUM) 43#define STORAGE_RAMDISK (1 << STORAGE_RAMDISK_NUM)
44#define STORAGE_USB (1 << STORAGE_USB_NUM)
43 /* meant for APPLICATION targets (implicit for SIMULATOR) */ 45 /* meant for APPLICATION targets (implicit for SIMULATOR) */
44#define STORAGE_HOSTFS (1 << STORAGE_HOSTFS_NUM) 46#define STORAGE_HOSTFS (1 << STORAGE_HOSTFS_NUM)
45 47
diff --git a/firmware/export/hostfs.h b/firmware/export/hostfs.h
index fa916870f3..c0fe85236e 100644
--- a/firmware/export/hostfs.h
+++ b/firmware/export/hostfs.h
@@ -54,6 +54,8 @@ extern int hostfs_driver_type(int drive);
54# define hostfs_driver_type(drive) (STORAGE_ATA_NUM) 54# define hostfs_driver_type(drive) (STORAGE_ATA_NUM)
55# elif (CONFIG_STORAGE & STORAGE_SD) 55# elif (CONFIG_STORAGE & STORAGE_SD)
56# define hostfs_driver_type(drive) (STORAGE_SD_NUM) 56# define hostfs_driver_type(drive) (STORAGE_SD_NUM)
57# elif (CONFIG_STORAGE & STORAGE_USB)
58# define hostfs_driver_type(drive) (STORAGE_USB_NUM)
57# elif (CONFIG_STORAGE & STORAGE_MMC) 59# elif (CONFIG_STORAGE & STORAGE_MMC)
58# define hostfs_driver_type(drive) (STORAGE_MMC_NUM) 60# define hostfs_driver_type(drive) (STORAGE_MMC_NUM)
59# elif (CONFIG_STORAGE & STORAGE_NAND) 61# elif (CONFIG_STORAGE & STORAGE_NAND)
diff --git a/firmware/export/mv.h b/firmware/export/mv.h
index ec7b2efdbd..3657ef6c98 100644
--- a/firmware/export/mv.h
+++ b/firmware/export/mv.h
@@ -70,6 +70,9 @@
70#if (CONFIG_STORAGE & STORAGE_RAMDISK) 70#if (CONFIG_STORAGE & STORAGE_RAMDISK)
71#define RAMDISK_VOL_DEC "RAMDisk" 71#define RAMDISK_VOL_DEC "RAMDisk"
72#endif 72#endif
73#if (CONFIG_STORAGE & STORAGE_USB)
74#define USB_VOL_DEC "USB"
75#endif
73#if (CONFIG_STORAGE & STORAGE_HOSTFS) 76#if (CONFIG_STORAGE & STORAGE_HOSTFS)
74#ifndef HOSTFS_VOL_DEC /* overridable */ 77#ifndef HOSTFS_VOL_DEC /* overridable */
75#define HOSTFS_VOL_DEC DEFAULT_VOL_DEC 78#define HOSTFS_VOL_DEC DEFAULT_VOL_DEC
diff --git a/firmware/export/storage.h b/firmware/export/storage.h
index e6424f7b03..ee1423c93a 100644
--- a/firmware/export/storage.h
+++ b/firmware/export/storage.h
@@ -34,6 +34,9 @@
34#if (CONFIG_STORAGE & STORAGE_SD) 34#if (CONFIG_STORAGE & STORAGE_SD)
35#include "sd.h" 35#include "sd.h"
36#endif 36#endif
37#if (CONFIG_STORAGE & STORAGE_USB)
38// TODO: Doesn't matter until we're native
39#endif
37#if (CONFIG_STORAGE & STORAGE_MMC) 40#if (CONFIG_STORAGE & STORAGE_MMC)
38#include "mmc.h" 41#include "mmc.h"
39#endif 42#endif
@@ -97,6 +100,9 @@ int nand_event(long id, intptr_t data);
97#if (CONFIG_STORAGE & STORAGE_RAMDISK) 100#if (CONFIG_STORAGE & STORAGE_RAMDISK)
98int ramdisk_event(long id, intptr_t data); 101int ramdisk_event(long id, intptr_t data);
99#endif 102#endif
103#if (CONFIG_STORAGE & STORAGE_USB)
104// int usb_event(long id, intptr_t data); // TODO: Implement
105#endif
100 106
101struct storage_info 107struct storage_info
102{ 108{
@@ -278,6 +284,8 @@ static inline void storage_sleep(void) {};
278 #define storage_present(drive) ramdisk_present(IF_MD(drive)) 284 #define storage_present(drive) ramdisk_present(IF_MD(drive))
279 #endif 285 #endif
280 #define storage_driver_type(drive) (STORAGE_RAMDISK_NUM) 286 #define storage_driver_type(drive) (STORAGE_RAMDISK_NUM)
287 #elif (CONFIG_STORAGE & STORAGE_USB)
288 // TODO: Eventually fix me
281 #else 289 #else
282 //#error No storage driver! 290 //#error No storage driver!
283 #endif 291 #endif