summaryrefslogtreecommitdiff
path: root/firmware/export
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/export')
-rw-r--r--firmware/export/ata.h2
-rw-r--r--firmware/export/config.h10
-rw-r--r--firmware/export/mmc.h2
-rw-r--r--firmware/export/nand.h2
-rw-r--r--firmware/export/ramdisk.h2
-rw-r--r--firmware/export/sd.h2
-rw-r--r--firmware/export/storage.h2
7 files changed, 16 insertions, 6 deletions
diff --git a/firmware/export/ata.h b/firmware/export/ata.h
index 5be32da231..a3537812e5 100644
--- a/firmware/export/ata.h
+++ b/firmware/export/ata.h
@@ -37,7 +37,7 @@ void ata_sleepnow(void);
37 */ 37 */
38bool ata_disk_is_active(void); 38bool ata_disk_is_active(void);
39int ata_soft_reset(void); 39int ata_soft_reset(void);
40int ata_init(void); 40int ata_init(void) STORAGE_INIT_ATTR;
41void ata_close(void); 41void ata_close(void);
42int ata_read_sectors(IF_MD2(int drive,) unsigned long start, int count, void* buf); 42int ata_read_sectors(IF_MD2(int drive,) unsigned long start, int count, void* buf);
43int ata_write_sectors(IF_MD2(int drive,) unsigned long start, int count, const void* buf); 43int ata_write_sectors(IF_MD2(int drive,) unsigned long start, int count, const void* buf);
diff --git a/firmware/export/config.h b/firmware/export/config.h
index a7f0a3578f..979a14d0c9 100644
--- a/firmware/export/config.h
+++ b/firmware/export/config.h
@@ -908,6 +908,16 @@ Lyre prototype 1 */
908#define INITDATA_ATTR 908#define INITDATA_ATTR
909#endif 909#endif
910 910
911/* We need to call storage_init more than once only if USB storage mode is
912 * handled in hardware:
913 * Deinit storage -> let hardware handle USB mode -> storage_init() again
914 */
915#if defined(HAVE_USBSTACK) || defined(USB_NONE)
916#define STORAGE_INIT_ATTR INIT_ATTR
917#else
918#define STORAGE_INIT_ATTR
919#endif
920
911#if (CONFIG_PLATFORM & PLATFORM_HOSTED) && defined(__APPLE__) 921#if (CONFIG_PLATFORM & PLATFORM_HOSTED) && defined(__APPLE__)
912#define DATA_ATTR __attribute__ ((section("__DATA, .data"))) 922#define DATA_ATTR __attribute__ ((section("__DATA, .data")))
913#else 923#else
diff --git a/firmware/export/mmc.h b/firmware/export/mmc.h
index f2b0ad3509..7e72cb0846 100644
--- a/firmware/export/mmc.h
+++ b/firmware/export/mmc.h
@@ -33,7 +33,7 @@ void mmc_sleep(void);
33void mmc_sleepnow(void); 33void mmc_sleepnow(void);
34bool mmc_disk_is_active(void); 34bool mmc_disk_is_active(void);
35int mmc_soft_reset(void); 35int mmc_soft_reset(void);
36int mmc_init(void); 36int mmc_init(void) STORAGE_INIT_ATTR;
37void mmc_close(void); 37void mmc_close(void);
38int mmc_read_sectors(IF_MD2(int drive,) unsigned long start, int count, void* buf); 38int mmc_read_sectors(IF_MD2(int drive,) unsigned long start, int count, void* buf);
39int mmc_write_sectors(IF_MD2(int drive,) unsigned long start, int count, const void* buf); 39int mmc_write_sectors(IF_MD2(int drive,) unsigned long start, int count, const void* buf);
diff --git a/firmware/export/nand.h b/firmware/export/nand.h
index 60b986dc2f..13d559486c 100644
--- a/firmware/export/nand.h
+++ b/firmware/export/nand.h
@@ -33,7 +33,7 @@ void nand_sleep(void);
33void nand_sleepnow(void); 33void nand_sleepnow(void);
34bool nand_disk_is_active(void); 34bool nand_disk_is_active(void);
35int nand_soft_reset(void); 35int nand_soft_reset(void);
36int nand_init(void); 36int nand_init(void) STORAGE_INIT_ATTR;
37void nand_close(void); 37void nand_close(void);
38int nand_read_sectors(IF_MD2(int drive,) unsigned long start, int count, void* buf); 38int nand_read_sectors(IF_MD2(int drive,) unsigned long start, int count, void* buf);
39int nand_write_sectors(IF_MD2(int drive,) unsigned long start, int count, const void* buf); 39int nand_write_sectors(IF_MD2(int drive,) unsigned long start, int count, const void* buf);
diff --git a/firmware/export/ramdisk.h b/firmware/export/ramdisk.h
index 7a56e05989..5135e38301 100644
--- a/firmware/export/ramdisk.h
+++ b/firmware/export/ramdisk.h
@@ -32,7 +32,7 @@ void ramdisk_spindown(int seconds);
32void ramdisk_sleep(void); 32void ramdisk_sleep(void);
33bool ramdisk_disk_is_active(void); 33bool ramdisk_disk_is_active(void);
34int ramdisk_soft_reset(void); 34int ramdisk_soft_reset(void);
35int ramdisk_init(void); 35int ramdisk_init(void) STORAGE_INIT_ATTR;
36void ramdisk_close(void); 36void ramdisk_close(void);
37int ramdisk_read_sectors(IF_MD2(int drive,) unsigned long start, int count, void* buf); 37int ramdisk_read_sectors(IF_MD2(int drive,) unsigned long start, int count, void* buf);
38int ramdisk_write_sectors(IF_MD2(int drive,) unsigned long start, int count, const void* buf); 38int ramdisk_write_sectors(IF_MD2(int drive,) unsigned long start, int count, const void* buf);
diff --git a/firmware/export/sd.h b/firmware/export/sd.h
index 8e400bf88a..43c961efb3 100644
--- a/firmware/export/sd.h
+++ b/firmware/export/sd.h
@@ -39,7 +39,7 @@ void sd_sleep(void);
39void sd_sleepnow(void); 39void sd_sleepnow(void);
40bool sd_disk_is_active(void); 40bool sd_disk_is_active(void);
41int sd_soft_reset(void); 41int sd_soft_reset(void);
42int sd_init(void); 42int sd_init(void) STORAGE_INIT_ATTR;
43void sd_close(void); 43void sd_close(void);
44int sd_read_sectors(IF_MD2(int drive,) unsigned long start, int count, void* buf); 44int sd_read_sectors(IF_MD2(int drive,) unsigned long start, int count, void* buf);
45int sd_write_sectors(IF_MD2(int drive,) unsigned long start, int count, const void* buf); 45int sd_write_sectors(IF_MD2(int drive,) unsigned long start, int count, const void* buf);
diff --git a/firmware/export/storage.h b/firmware/export/storage.h
index e9ac8b4cb9..58d8d32b6d 100644
--- a/firmware/export/storage.h
+++ b/firmware/export/storage.h
@@ -214,7 +214,7 @@ void storage_sleep(void);
214void storage_sleepnow(void); 214void storage_sleepnow(void);
215bool storage_disk_is_active(void); 215bool storage_disk_is_active(void);
216int storage_soft_reset(void); 216int storage_soft_reset(void);
217int storage_init(void); 217int storage_init(void) STORAGE_INIT_ATTR;
218int storage_flush(void); 218int storage_flush(void);
219void storage_spin(void); 219void storage_spin(void);
220void storage_spindown(int seconds); 220void storage_spindown(int seconds);