diff options
Diffstat (limited to 'firmware/export/ata.h')
-rw-r--r-- | firmware/export/ata.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/firmware/export/ata.h b/firmware/export/ata.h index 06de33a8f2..fb604a120d 100644 --- a/firmware/export/ata.h +++ b/firmware/export/ata.h | |||
@@ -20,6 +20,21 @@ | |||
20 | #define __ATA_H__ | 20 | #define __ATA_H__ |
21 | 21 | ||
22 | #include <stdbool.h> | 22 | #include <stdbool.h> |
23 | #include "config.h" /* for HAVE_MULTIVOLUME or not */ | ||
24 | |||
25 | /* FixMe: These macros are a bit nasty and perhaps misplaced here. | ||
26 | We'll get rid of them once decided on how to proceed with multivolume. */ | ||
27 | #ifdef HAVE_MULTIVOLUME | ||
28 | #define IF_MV(x) x /* optional volume/drive parameter */ | ||
29 | #define IF_MV2(x,y) x,y /* same, for a list of arguments */ | ||
30 | #define IF_MV_NONVOID(x) x /* for prototype with sole volume parameter */ | ||
31 | #define NUM_VOLUMES 2 | ||
32 | #else /* empty definitions if no multi-volume */ | ||
33 | #define IF_MV(x) | ||
34 | #define IF_MV2(x,y) | ||
35 | #define IF_MV_NONVOID(x) void | ||
36 | #define NUM_VOLUMES 1 | ||
37 | #endif | ||
23 | 38 | ||
24 | /* | 39 | /* |
25 | ata_spindown() time values: | 40 | ata_spindown() time values: |
@@ -41,8 +56,8 @@ extern bool ata_disk_is_active(void); | |||
41 | extern int ata_hard_reset(void); | 56 | extern int ata_hard_reset(void); |
42 | extern int ata_soft_reset(void); | 57 | extern int ata_soft_reset(void); |
43 | extern int ata_init(void); | 58 | extern int ata_init(void); |
44 | extern int ata_read_sectors(unsigned long start, int count, void* buf); | 59 | extern int ata_read_sectors(IF_MV2(int drive,) unsigned long start, int count, void* buf); |
45 | extern int ata_write_sectors(unsigned long start, int count, const void* buf); | 60 | extern int ata_write_sectors(IF_MV2(int drive,) unsigned long start, int count, const void* buf); |
46 | extern void ata_delayed_write(unsigned long sector, const void* buf); | 61 | extern void ata_delayed_write(unsigned long sector, const void* buf); |
47 | extern void ata_flush(void); | 62 | extern void ata_flush(void); |
48 | extern void ata_spin(void); | 63 | extern void ata_spin(void); |