We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi to every body
I use uVision3 for compile a program.My program have some of .h and .c files. In one of them that called "guts.h", I define :
typedef struct yaffs_DeviceStruct yaffs_Device; typedef struct { __u8 tagByte0; __u8 tagByte1; __u8 tagByte2; __u8 tagByte3; __u8 pageStatus; __u8 blockStatus; __u8 tagByte4; __u8 tagByte5; __u8 ecc1[3]; __u8 tagByte6; __u8 tagByte7; __u8 ecc2[3]; } yaffs_Spare;
and in other file that called "mtdif.h", I define like this:
#ifndef __YAFFS_MTDIF_H__ #define __YAFFS_MTDIF_H__ #include "yaffs_guts.h" int nandmtd_WriteChunkToNAND(yaffs_Device * dev, int chunkInNAND,const __u8 * dat, const yaffs_Spare * spare); #endif
But it has error. The error is : "undefined yaffs_Device"
But when transfered this code to mtdif.h the error removed:
what is the problem? The problem when increase that I include guts.h in some of my files. In all of files that use variables that defined in "guts.h" has error. what is problem? what I do for solve it?
Thanks very much
struct yaffs_DeviceStruct { struct list_head devList; const char *name; int nDataBytesPerChunk; int nChunksPerBlock; int nBytesPerSpare; int startBlock; int endBlock; int nReservedBlocks; int checkpointStartBlock; int checkpointEndBlock; };
you not give all code!!!
list_head not definededed!
i make project you see and works??
BUT i put in struct for jist_head
code is good