FatFs/Tiny-FatFs Module Source Files R0.04b (C)ChaN, 2007
FILES
ff.h Common include file for FatFs and application module.
ff.c FatFs module.
tff.h Common include file for Tiny-FatFs and application module.
tff.c Tiny-FatFs module.
diskio.h Common include file for (Tiny-)FatFs and disk I/O module.
integer.h Alternative type definitions for integer variables.
Low level disk I/O module is not included in this archive because the
FatFs/Tiny-FatFs module is only a generic file system layer and not depend
on any specific storage device. You have to provide a low level disk I/O
module that written to control your storage device.
CONFIGURATION OPTIONS
There are several configuration options for various envilonment and
requirement. The configuration options are defined in header files, ff.h
and tff.h.
_MCU_ENDIAN
This is the most impotant option that depends on the processor architecture.
When the target device corresponds to either or both of following terms, the
_MCU_ENDIAN must be set to 2 to force FatFs to access FAT structure in
byte-by-byte.
- Muti-byte integers (short, long) are stored in Big-Endian.
- Address miss-aligned memory access results in an incorrect behavior.
If not the case, this can be set to 1 for good code efficiency. The initial
value is 0. (must be set to 1 or 2 properly)
_FS_READONLY
When application program does not require any write function, _FS_READONLY
can be set to 1 to eliminate writing code to reduce the module size. This
setting should be reflected to configurations of low level disk I/O module
if available. The initial value is 0. (Read and Write)
_FS_MINIMIZE
When application program requires only file read/write function, _FS_MINIMIZE
can be changed to eliminate some functions to reduce the module size. The
initial value is 0. (full function)
_DRIVES
Number of drives to be used. This option is not available on Tiny-FatFs.
The initial value is 2.
_FAT32
When _FAT32 is set to 1, the FAT32 support is added with an additional
code size. This option is for only Tiny-FatFs. FatFs always supports all
FAT sub-types. The initial value is 0. (no FAT32 support)
_USE_FSINFO
When _USE_FSINFO is set to 1, FSInfo is used for FAT32 volume.
_USE_SJIS
When _USE_SJIS is set to 1, Shift_JIS code set can be used as a file name,
otherwire second byte of double-byte characters will be collapted.
The initial value is 1.
_USE_NTFLAG
When _USE_NTFLAG is set to 1, upper/lower case of the file/dir name is
preserved. Note that the files are always accessed in case insensitive.
_USE_MKFS
When _USE_MKFS is set to 1 and _FS_READONLY is set to 0, f_mkfs function
is enabled. This is for only FatFs module and not supported on Tiny-FatFs.
The initial value is 0. (f_mkfs is not available)
Following table shows which function is removed by configuratin options.
_FS_MINIMIZE _FS_READONLY _USE_MKFS
(1) (2) (3) (1) (0)
f_mount
f_open
f_close
f_read
f_write x
f_sync x
f_lseek x
f_opendir x x
f_readdir x x
f_stat x x x
f_getfree x x x x
f_unlink x x x x
f_mkdir x x x x
f_chmod x x x x
f_rename x x x x
f_mkfs x x x x x
AGREEMENTS
The FatFs/Tiny-FatFs module is a free software and there is no warranty.
The FatFs/Tiny-FatFs module is opened for education, reserch and development.
You can use and/or modify it for personal, non-profit or profit use without
any restriction under your responsibility.
REVISION HISTORY
Feb 26, 2006 R0.00 Prototype
Apr 29, 2006 R0.01 First release.
Jun 01, 2006 R0.02 Added FAT12.
Removed unbuffered mode.
Fixed a problem on small (<32M) patition.
Jun 10, 2006 R0.02a Added a configuration option _FS_MINIMUM.
Sep 22, 2006 R0.03 Added f_rename().
Changed option _FS_MINIMUM to _FS_MINIMIZE.
Dec 11, 2006 R0.03a Improved cluster scan algolithm to write files fast.
Fixed f_mkdir() creates incorrect directory on FAT32.
Feb 04, 2007 R0.04 Supported multiple drive system. (FatFs)
Changed some APIs for multiple drive system.
Added f_mkfs(). (FatFs)
Added _USE_FAT32 option. (Tiny-FatFs)
Apr 01, 2007 R0.04a Supported multiple partitions on a plysical drive. (FatFs)
Fixed an endian sensitive code in f_mkfs(). (FatFs)
Added a capability of extending the file size to f_lseek().
Added minimization level 3.
Fixed a problem that can collapse a sector when recreate an
existing file in any sub-directory at non FAT32 cfg. (Tiny-FatFs)
May 05, 2007 R0.04b Added _USE_NTFLAG option.
Added FSInfo support.
Fixed some problems corresponds to FAT32. (Tiny-FatFs)
Fixed DBCS name can result FR_INVALID_NAME.
Fixed short seek (<= csize) collapses the file object.
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
FatFs的作者写了两个,一个是正宗的FatFs,比较适合大的RAM的设备,另一个是FatFs/Tiny,比较适合小RAM的系统,比如单片机,FatFs/Tiny占用较小的RAM,代价是更慢的读写速度和更少的API函数。不过两个都支持FAT12,FAT16,FAT32文件系统。 下载下来的FatFs的FatFs有两个文件夹,一个是 doc ,FatFs的说明,包括特性,系统函数,以及可能的一些问题,另一个就是源代码文件夹src了,总共8个文件,diskio.c和diskio.h是硬件层,ff.c和ff.h是FatFs的文件系统层和文件系统的API层,integer.h是文件系统所用到的数据类型的定义,tff.c和tff.h是Tiny的文件系统层和文件系统的API层,还有一个00readme.txt简要的介绍了FatFSHE FatFs/Tiny,包括他们所支持的API,怎么配置等等。 移植的问题,第一个是数据类型,在integer.h里面去定义好数据的类型。第二个,就是配置,打开ff.h(我用的FatFs,不是Tiny),_MCU_ENDIAN,选择你的CPU是大端存储(big endding)还是小端存储(little endding),一般的都用的小端存储,1是小端,2是大端。这个相当重要,一会儿还要谈到这里。其他的,按照自己的需要来配置了,说明文档够清楚了。
资源详情
资源评论
资源推荐
收起资源包目录
fatfs.rar (89个子文件)
fatfs
port
mmc-rdk-idm-sbc.c 22KB
mmc-rdk-idm.c 21KB
fat_usbmsc.c 5KB
mmc-ek-lm3s3748.c 21KB
mmc-ek-lm3s6965.c 21KB
dual-disk-driver.c 11KB
mmc-ek-lm3s8962.c 21KB
sample-mmc.c 18KB
mmc-dk-lm3s9b96.c 21KB
src
ff.c 67KB
tff.c 48KB
00readme.txt 6KB
diskio.h 2KB
integer.h 582B
tff.h 9KB
ff.h 12KB
doc
css_e.css 2KB
00index_e.html 5KB
ja
sdir.html 1KB
dinit.html 1KB
rename.html 3KB
dread.html 2KB
close.html 2KB
read.html 2KB
dioctl.html 2KB
open.html 5KB
fattime.html 1KB
dwrite.html 2KB
stat.html 2KB
appnote.html 10KB
opendir.html 2KB
filename.html 3KB
dstat.html 2KB
mountdrv.html 2KB
sync.html 2KB
getfree.html 3KB
sfile.html 2KB
lseek.html 3KB
write.html 2KB
unlink.html 2KB
mkdir.html 2KB
readdir.html 3KB
mount.html 2KB
sfileinfo.html 2KB
chmod.html 3KB
sfatfs.html 3KB
mkfs.html 3KB
img
rw_ata.jpeg 65KB
layers.png 2KB
rw_mmc.jpeg 29KB
rw_cfc.jpeg 31KB
f3.png 1KB
f2.png 1KB
f4.png 2KB
f1.png 1KB
f5.png 2KB
rwtest.png 19KB
updates.txt 1KB
en
sdir.html 1KB
dinit.html 1KB
rename.html 3KB
dread.html 2KB
close.html 2KB
read.html 2KB
dioctl.html 2KB
open.html 5KB
fattime.html 1KB
dwrite.html 2KB
stat.html 2KB
appnote.html 10KB
opendir.html 2KB
filename.html 3KB
dstat.html 1KB
mountdrv.html 2KB
sync.html 2KB
getfree.html 3KB
sfile.html 2KB
lseek.html 3KB
write.html 2KB
unlink.html 2KB
mkdir.html 2KB
readdir.html 3KB
mount.html 2KB
sfileinfo.html 2KB
chmod.html 3KB
sfatfs.html 3KB
mkfs.html 3KB
00index_j.html 5KB
css_j.css 3KB
共 89 条
- 1
lvmxh
- 粉丝: 1
- 资源: 15
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论16