Widen page count field in blockinfo to allow lots of pages per block
[yaffs/.git] / mtdemul / nandemul.h
1 #ifndef __NANDEMUL_H__
2 #define __NANDEMUL_H__
3
4 typedef unsigned char __u8;
5 typedef unsigned short __u16;
6 typedef unsigned __u32;
7
8 int nandemul_Initialise(void);
9 int nandemul_DeInitialise(void);
10
11 int nandemul_GetNumberOfBlocks(__u32 *nBlocks);
12 int nandemul_Reset(void);
13 int nandemul_Read(__u8 *buffer, __u32 pageAddress, __u32 pageOffset, __u32 nBytes);
14 int nandemul_Program(__u8 *buffer, __u32 pageAddress, __u32 pageOffset, __u32 nBytes);
15
16
17
18 int nandemul_BlockErase(__u32 address);
19
20 int nandemul_ReadId(__u8 *vendorId, __u8 *deviceId);
21
22 int nandemul_CopyPage(__u32 fromAddress, __u32 toAddress);
23
24 int nandemul_ReadStatus(__u8 *status);
25
26 int nandemul_FailBlock(__u32 pageAddress);
27 int nandemul_CauseBitErrors( __u32 pageAddress, __u32 pageOffset, __u8 xorPattern);
28
29 #endif
30
31
32