ddwrite.h 1.44 KB
/**************************************************************************
 *
 *  $Revision: 1.1.1.2 $
 *  $Date: 2002/10/29 08:06:41 $
 *  $Source: /root/leakn64/depot/rf/sw/n64os20l/libleo/libddwrite/ddwrite.h,v $
 *
 **************************************************************************/

#ifndef _DDWRITE_H_
#define _DDWRITE_H_

#include <PR/os.h>

/**************************************************************************
 *
 * Type definitions
 *
 */
typedef struct{
        s32     diskType;
        void    *loadAddr;
        u32     iplSize;

} DDInfo;

typedef struct{
        u32     startLBA;
        s32     diskType;
        void    *loadAddr;
        void    *idAddr;
        u32     iplSize;
	void	*writeBuf;
	u32     writeSize;
	s32	(*getdata)(void *, u32);
	u32	totalSize;
	u32     flags;
	void	(*formatHook)(void);
	void	(*infoHook)(DDInfo *);

} DDCmd;


/**************************************************************************
 *
 * Global definitions
 *
 */
/* for "flags" member of DDCmd structure */

#define	DDWRITE_FLG_FORMAT	1	/* force format the disk */
#define	DDWRITE_FLG_IDSERIAL	2	/* write serial # only for ID */

#define DDWRITE_ERROR_INSUFFICIENT_BUFFERSIZE   0x8001 

/**************************************************************************
 *
 * Function prototypes
 *
 */
extern	s32	ddWrite(DDCmd *command);
extern	s32	ddGetInfo(DDInfo *info);
extern	s32	ddUnformat(void *buffer, u32 bufSize);

#endif /* !_DDWRITE_H_ */