[牛人杂谈] FatFs - Generic FAT File System Module

[复制链接]
 楼主| wahahaheihei 发表于 2016-9-30 19:26 | 显示全部楼层 |阅读模式
本帖最后由 wahahaheihei 于 2016-10-10 13:04 编辑

说起来文件系统,我今天给大家介绍个。http://elm-chan.org/fsw/ff/00index_e.html
——————————————————————————-——
FatFs - Generic FAT File System Module
layers.png
FatFs is a generic FAT/exFAT file system module for small embedded systems. The FatFs module is written in compliance with ANSI C (C89) and completely separated from the disk I/O layer. Therefore it is independent of the platform. It can be incorporated into small microcontrollers with limited resource, such as 8051, PIC, AVR, ARM, Z80, 78K and etc. Also Petit FatFs module for tiny microcontrollers is available here.
Features
  • Windows compatible FAT/exFAT file system.
  • Platform independent. Easy to port.
  • Very small footprint for program code and work area.
  • Various configuration options to support for:
    • Multiple volumes (physical drives and partitions).
    • Multiple ANSI/OEM code pages including DBCS.
    • Long file name in ANSI/OEM or Unicode.
    • exFAT file system.
    • RTOS envilonment.
    • Fixed or variable sector size.
    • Read-only, optional API, I/O buffer and etc...


Application Interface layers1.png
  • File Access
  • Directory Access
  • File/Directory Management
    • f_stat - Check existance of a file or sub-directory
    • f_unlink - Remove a file or sub-directory
    • f_rename - Rename or move a file or sub-directory
    • f_chmod - Change attribute of a file or sub-directory
    • f_utime - Change timestamp of a file or sub-directory
    • f_mkdir - Create a sub-directory
    • f_chdir - Change current directory
    • f_chdrive - Change current drive
    • f_getcwd - Retrieve the current directory and drive
  • Volume Management
    • f_mount - Register/Unregister a work area of a volume
    • f_mkfs - Create an FAT volume on the logical drive
    • f_fdisk - Create logical drives on the physical drive
    • f_getfree - Get total size and free size on the volume
    • f_getlabel - Get volume label
    • f_setlabel - Set volume label


Device Control Interface layers2.png
Since the FatFs module is a file system layer, it is completely separated from the physical devices, such as memory card, harddisk and any type of storage device. FatFs accesses the storage devices via a simple interface shown below. The low level device control module isnot a part of FatFs module. It is provided by implementer. Also sample implementations for some platforms are available in the downloads.

Resources
The FatFs module is a free software opened for education, research and development. You can use, modify and/or redistribute it for personal projects or commercial products without any restriction under your responsibility. For further information, refer to the application note.


 楼主| wahahaheihei 发表于 2016-9-30 19:27 | 显示全部楼层
问题来了,一个单片机项目里,文件系统和操作硬件的程序是什么关系。
戈卫东 发表于 2016-9-30 21:47 | 显示全部楼层
你的标题居然把FatFs的第一个F漏掉了。。。。。。。
戈卫东 发表于 2016-9-30 23:08 | 显示全部楼层
太有才了你。。。。
coslight 发表于 2016-10-8 08:13 | 显示全部楼层
我以为又出现一个新的
mintspring 发表于 2016-10-8 19:52 | 显示全部楼层
还真是漏了个F啊,有意思。好几个人以为是新货呢。
Thethree 发表于 2016-10-10 21:42 | 显示全部楼层
以前玩U盘和 sd卡的时候用过fat文件系统
 楼主| wahahaheihei 发表于 2016-10-11 14:18 | 显示全部楼层
单片机中用这个最大的作用就是可以兼容其他系统的文件形式。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

231

主题

3197

帖子

12

粉丝
快速回复 在线客服 返回列表 返回顶部