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