ddwrite.h
1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/**************************************************************************
*
* $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_ */