新手上路
- 积分
- 41
- 金钱
- 41
- 注册时间
- 2013-10-20
- 在线时间
- 0 小时
|
发表于 2013-10-25 20:53:05
|
显示全部楼层
回复【55楼】正点原子:
---------------------------------
解决了,当时我无论怎么编译都没有用,当时调不出代码,还一直以为是不是这个原因,后来发现把工程关一次再打开就自然有了。
对了原子哥,再问一个新问题:
你的显示汉字的代码中有个ff.h的头文件,头文件中有这样一句:
FRESULT f_mount (BYTE, FATFS*);
FRESULT是枚举类型的代替符号,f_mount 是一个枚举类型的变量,但是括号中的这两个类似于入口参数的是什么呢??
枚举类型的这种用法是什么用法??
原文:
typedef enum {
FR_OK = 0, /* (0) Succeeded */
FR_DISK_ERR, /* (1) A hard error occured in the low level disk I/O layer */
FR_INT_ERR, /* (2) Assertion failed */
FR_NOT_READY, /* (3) The physical drive cannot work */
FR_NO_FILE, /* (4) Could not find the file */
FR_NO_PATH, /* (5) Could not find the path */
FR_INVALID_NAME, /* (6) The path name format is invalid */
FR_DENIED, /* (7) Acces denied due to prohibited access or directory full */
FR_EXIST, /* (8) Acces denied due to prohibited access */
FR_INVALID_OBJECT, /* (9) The file/directory object is invalid */
FR_WRITE_PROTECTED, /* (10) The physical drive is write protected */
FR_INVALID_DRIVE, /* (11) The logical drive number is invalid */
FR_NOT_ENABLED, /* (12) The volume has no work area */
FR_NO_FILESYSTEM, /* (13) There is no valid FAT volume on the physical drive */
FR_MKFS_ABORTED, /* (14) The f_mkfs() aborted due to any parameter error */
FR_TIMEOUT, /* (15) Could not get a grant to access the volume within defined period */
FR_LOCKED, /* (16) The operation is rejected according to the file shareing policy */
FR_NOT_ENOUGH_CORE, /* (17) LFN working buffer could not be allocated */
FR_TOO_MANY_OPEN_FILES /* (18) Number of open files > _FS_SHARE */
} FRESULT;
/*--------------------------------------------------------------*/
/* FatFs module application interface */
FRESULT f_mount (BYTE, FATFS*); /* Mount/Unmount a logical drive */
FRESULT f_open (FIL*, const TCHAR*, BYTE); /* Open or create a file */
。。。。。。。后面还有。
主函数中又是这样的: f_mount(0, &fs); //初始化必须mount 不懂啊!才学,呵呵!!! |
|