*** empty log message ***
[yaffs/.git] / wince / ynandif.h
diff --git a/wince/ynandif.h b/wince/ynandif.h
new file mode 100644 (file)
index 0000000..3ae1e8a
--- /dev/null
@@ -0,0 +1,64 @@
+/*\r
+ * YAFFS: Yet another FFS. A NAND-flash specific file system. \r
+ * ynandif.h: Nand interface routines for WinCE version of YAFFS.\r
+ *\r
+ * Copyright (C) 2002 Trimble Navigaion Ltd.\r
+ *\r
+ * Created by Brad Beveridge <brad.beveridge@trimble.co.nz>\r
+ *\r
+ * This program is free software; you can redistribute it and/or modify\r
+ * it under the terms of the GNU Lesser General Public License version 2.1 as\r
+ * published by the Free Software Foundation.\r
+ *\r
+ * This program is distributed in the hope that it will be useful, \r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of \r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU \r
+ * General Public License for more details. You should have received a \r
+ * copy of the GNU General Public License along with this program; \r
+ * if not, write to the Free Software Foundation, Inc., \r
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. \r
+ *\r
+ *\r
+ * Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL.\r
+ *\r
+ * $Id: ynandif.h,v 1.1 2002-11-08 07:30:00 charles Exp $\r
+ */\r
+\r
+#ifndef YNANDIF_H\r
+#define YNANDIF_H\r
+\r
+#include "yaffs_guts.h"\r
+\r
+typedef struct\r
+{\r
+       int chunk;\r
+       unsigned char *data;\r
+       unsigned char *spare;\r
+} ynandif_data;\r
+\r
+typedef enum\r
+{\r
+       YNANDIF_WRITE = 0x59AFF,\r
+       YNANDIF_READ,\r
+       YNANDIF_ERASE,\r
+       YNANDIF_INIT,\r
+       YNANDIF_GETSIZE,\r
+} ynandif_commands;\r
+\r
+\r
+/*\r
+*      Functions that need to be provided for YAFFS\r
+*/\r
+int ynandif_WriteChunkToNAND(yaffs_Device *dev, int chunkInNAND,const __u8 *data, yaffs_Spare *spare);\r
+int ynandif_ReadChunkFromNAND(yaffs_Device *dev,int chunkInNAND, __u8 *data, yaffs_Spare *spare);\r
+int ynandif_EraseBlockInNAND(yaffs_Device *dev, int blockNumber);\r
+int ynandif_InitialiseNAND(yaffs_Device *dev);\r
+\r
+/*\r
+*      Additional optional functions\r
+*/\r
+\r
+int ynandif_EraseAllBlocks(yaffs_Device *dev);\r
+int ynandif_GetChipSize(unsigned char chipNumber);\r
+\r
+#endif // end of file
\ No newline at end of file