pspsdk-1.0+beta2
pspnand_driver.h
Go to the documentation of this file.
1 /*
2  * PSP Software Development Kit - http://www.pspdev.org
3  * -----------------------------------------------------------------------
4  * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
5  *
6  * pspnand_driver.h - Definitions and interfaces to the NAND (flash) driver.
7  *
8  * Copyright (c) 2005 Marcus R. Brown <mrbrown@0xd6.org>
9  *
10  * $Id: pspnand_driver.h 1211 2005-10-24 06:36:00Z mrbrown $
11  */
12 
13 #ifndef PSPNAND_DRIVER_H
14 #define PSPNAND_DRIVER_H
15 
16 #include <pspkerneltypes.h>
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
22 int sceNandSetWriteProtect(int protectFlag);
23 
24 int sceNandLock(int writeFlag);
25 
26 void sceNandUnlock(void);
27 
28 int sceNandReadStatus(void);
29 
30 int sceNandReset(int flag);
31 
32 int sceNandReadId(void *buf, SceSize size);
33 
34 int sceNandReadPages(u32 ppn, void *buf, void *buf2, u32 count);
35 
36 /*
37 // sceNandWritePages
38 // sceNandReadAccess
39 // sceNandWriteAccess
40 // sceNandEraseBlock
41 // sceNandReadExtraOnly
42 // sceNandCalcEcc
43 // sceNandVerifyEcc
44 // sceNandCollectEcc
45 */
46 
47 int sceNandGetPageSize(void);
48 
49 int sceNandGetPagesPerBlock(void);
50 
51 int sceNandGetTotalBlocks(void);
52 
53 /*
54 // sceNandWriteBlock
55 // sceNandWriteBlockWithVerify
56 */
57 
58 int sceNandReadBlockWithRetry(u32 ppn, void *buf, void *buf2);
59 
60 /*
61 // sceNandVerifyBlockWithRetry
62 // sceNandEraseBlockWithRetry
63 */
64 
65 int sceNandIsBadBlock(u32 ppn);
66 
67 /*
68 // sceNandEraseAllBlock
69 // sceNandTestBlock
70 */
71 
72 #ifdef __cplusplus
73 }
74 #endif
75 
76 #endif /* PSPNAND_DRIVER_H */