<p>FatFs is a generic FAT file system module for small embedded systems. The FatFs is written in compliance with ANSI C and completely separated from the disk I/O layer. Therefore it is independent of hardware architecture. It can be incorporated into small microcontrollers with limited resource, such as AVR, 8051, PIC, ARM, Z80, 68k and etc. Also Petit FatFs module for tiny microcontrollers is available <ahref="http://elm-chan.org/fsw/ff/00index_p.html">here</a>.</p>
<h4>Features</h4>
<ul>
<li>Windows compatible FAT file system.</li>
<li>Platform independent. Easy to port.</li>
<li>Very small footprint for code and work area.</li>
<li>Various configuration options:
<ul>
<li>Multiple volumes (physical drives and partitions).</li>
<li>Multiple ANSI/OEM code pages including DBCS.</li>
<li>Long file name support in ANSI/OEM or Unicode.</li>
<li>RTOS support.</li>
<li>Multiple sector size support.</li>
<li>Read-only, minimized API, I/O buffer and etc...</li>
</ul>
</li>
</ul>
</div>
<divclass="para">
<h3>Application Interface</h3>
<p>FatFs module provides following functions to the applications. In other words, this list describes what FatFs can do to access the FAT volumes.</p>
<ul>
<li><ahref="en/mount.html">f_mount</a> - Register/Unregister a work area</li>
<li><ahref="en/open.html">f_open</a> - Open/Create a file</li>
<li><ahref="en/close.html">f_close</a> - Close an open file</li>
<li><ahref="en/rename.html">f_rename</a> - Rename/Move a file or sub-directory</li>
<li><ahref="en/chdir.html">f_chdir</a> - Change current directory</li>
<li><ahref="en/chdrive.html">f_chdrive</a> - Change current drive</li>
<li><ahref="en/getcwd.html">f_getcwd</a> - Retrieve the current directory</li>
<li><ahref="en/getfree.html">f_getfree</a> - Get free space on the volume</li>
<li><ahref="en/getlabel.html">f_getlabel</a> - Get volume label</li>
<li><ahref="en/setlabel.html">f_setlabel</a> - Set volume label</li>
<li><ahref="en/mkfs.html">f_mkfs</a> - Create a file system on the drive</li>
<li><ahref="en/fdisk.html">f_fdisk</a> - Divide a physical drive</li>
<li><ahref="en/gets.html">f_gets</a> - Read a string</li>
<li><ahref="en/putc.html">f_putc</a> - Write a character</li>
<li><ahref="en/puts.html">f_puts</a> - Write a string</li>
<li><ahref="en/printf.html">f_printf</a> - Write a formatted string</li>
<li><ahref="en/tell.html">f_tell</a> - Get current read/write pointer</li>
<li><ahref="en/eof.html">f_eof</a> - Test for end-of-file on a file</li>
<li><ahref="en/size.html">f_size</a> - Get size of a file</li>
<li><ahref="en/error.html">f_error</a> - Test for an error on a file</li>
</ul>
</div>
<divclass="para">
<h3>Device Control Interface</h3>
<p>Since the FatFs module is a file system driver, it is completely separated from physical devices, such as memory card, harddisk and any type of storage devices. The low level device control module is not a part of FatFs module. FatFs accesses the storage device via a simple interface described below. These functions are provided by implementer. Sample implementations for some platforms are also available in the downloads.</p>
<ul>
<li><ahref="en/dstat.html">disk_status</a> - Get device status</li>
<li><ahref="en/dioctl.html">disk_ioctl</a> - Control device dependent features</li>
<li><ahref="en/fattime.html">get_fattime</a> - Get current time</li>
</ul>
</div>
<divclass="para">
<h3>Resources</h3>
<p>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.</p>
<ul>
<li><ahref="http://elm-chan.org/fsw/ff/bd/"><em>FatFs User Forum</em></a>↗</li>
<li><ahref="http://nemuisan.blog.bai.ne.jp/">Nemuisan's Blog</a>↗ (Well written implementations for STM32F/SDIO and LPC2300/MCI)</li>
<li><ahref="http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects/arm_memcards/index.html">ARM-Projects by Martin THOMAS</a>↗ (Examples for LPC2000, AT91SAM and STM32)</li>
<li><ahref="http://www.microsoft.com/whdc/system/platform/firmware/fatgen.mspx">FAT32 Specification by Microsoft</a>↗ (The reference document on FAT file system)</li>
<li><ahref="http://elm-chan.org/docs/fat.html">The basics of FAT file system [ja]</a>↗</li>
<li><ahref="http://elm-chan.org/docs/mmc/mmc_e.html">How to Use MMC/SDC</a>↗</li>
<li><ahref="img/rwtest.png">Benchmark 1</a> (ATmega64/9.2MHz with MMC via SPI, HDD/CFC via GPIO)</li>
<li><ahref="img/rwtest2.png">Benchmark 2</a> (LPC2368/72MHz with MMC via MCI)</li>
<li><ahref="http://members.jcom.home.ne.jp/felm/fd.mp4">Demo movie of an application</a> (this project is in ffsample.zip/lpc23xx)</li>