|
/*
* myfile.h
*
* Created on: 29/07/2011
* Author: lyl
*/
#ifndef MYFILE_H_
#define MYFILE_H_
#define FATFS_MAX_OPEN_FILES 1
#define FAT_SFN_SIZE_FULL 11
struct _FILE;
struct cluster_lookup
{
DWORD ClusterIdx;
DWORD CurrentCluster;
};
typedef struct _FILE
{
DWORD parentcluster;
DWORD startcluster;
DWORD bytenum;
DWORD filelength;
int filelength_changed;
char path[FATFS_MAX_LONG_FILENAME];
char filename[FATFS_MAX_LONG_FILENAME];
BYTE shortfilename[11];
// Cluster Lookup
struct cluster_lookup last_fat_lookup;
// Read/Write sector buffer
SECTOR_BUFFER file_data;
// File fopen flags
BYTE flags;
#define FILE_READ (1 << 0)
#define FILE_WRITE (1 << 1)
#define FILE_APPEND (1 << 2)
#define FILE_BINARY (1 << 3)
#define FILE_ERASE (1 << 4)
#define FILE_CREATE (1 << 5)
struct _FILE *next;
} FILE;
#endif /* MYFILE_H_ */
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.