From da848576312800dc229624e928d132d0702c1854 Mon Sep 17 00:00:00 2001 From: Jörg Hohensohn Date: Tue, 28 Dec 2004 22:16:07 +0000 Subject: prepared to mount multiple partitions into one logical file system (most useful for Ondio, internal memory + external MMC) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5514 a1c6a512-1295-4272-9138-f99709370657 --- firmware/export/ata.h | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'firmware/export/ata.h') 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 @@ #define __ATA_H__ #include +#include "config.h" /* for HAVE_MULTIVOLUME or not */ + +/* FixMe: These macros are a bit nasty and perhaps misplaced here. + We'll get rid of them once decided on how to proceed with multivolume. */ +#ifdef HAVE_MULTIVOLUME +#define IF_MV(x) x /* optional volume/drive parameter */ +#define IF_MV2(x,y) x,y /* same, for a list of arguments */ +#define IF_MV_NONVOID(x) x /* for prototype with sole volume parameter */ +#define NUM_VOLUMES 2 +#else /* empty definitions if no multi-volume */ +#define IF_MV(x) +#define IF_MV2(x,y) +#define IF_MV_NONVOID(x) void +#define NUM_VOLUMES 1 +#endif /* ata_spindown() time values: @@ -41,8 +56,8 @@ extern bool ata_disk_is_active(void); extern int ata_hard_reset(void); extern int ata_soft_reset(void); extern int ata_init(void); -extern int ata_read_sectors(unsigned long start, int count, void* buf); -extern int ata_write_sectors(unsigned long start, int count, const void* buf); +extern int ata_read_sectors(IF_MV2(int drive,) unsigned long start, int count, void* buf); +extern int ata_write_sectors(IF_MV2(int drive,) unsigned long start, int count, const void* buf); extern void ata_delayed_write(unsigned long sector, const void* buf); extern void ata_flush(void); extern void ata_spin(void); -- cgit v1.2.3