亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? appnote.html

?? FAT File System Module fat 文件系統(tǒng)模塊
?? HTML
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="up" title="FatFs" href="../00index_e.html">
<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
<title>FatFs Module Application Note</title>
</head>

<body>
<h1>FatFs Module Application Note</h1>
<hr>

<div class="para">
<h3>Considerations on porting to various platform</h3>
<p>The FatFs module is assuming following terms on portability.</p>
<ul>
<li>ANSI C<br>
The FatFs module is a middleware that written in ANSI C. There is no platform dependence, so long as the compiler is in compliance with ANSI C.</li>
<li>Size of integer types<br>
The FatFs module assumes that size of char/short/long are 8/16/32-bit and int is 16 or 32 bit. These correspondence are defined in integer.h. This will not be a problem on most compilers. When any conflict with existing definitions is occured, you must resolve it with care.</li>
</ul>
</div>

<div class="para">
<h3>Memory Usage (R0.07)</h3>
<table class="lst2">
<tr><th></th><th>AVR</th><th>H8/300H</th><th>PIC</th><th>TLCS-870/C</th><th>V850ES</th><th>SH2</th><th>ARM7TDMI</th><th>IA-32</th></tr>
<tr><td>Compiler</td><td>gcc(WinAVR)</td><td>CH38</td><td>gcc(C30)</td><td>CC870C</td><td>CA850</td><td>SHC</td><td>gcc(WinARM)</td><td>MSC</td></tr>
<tr><td>_WORD_ACCESS</td><td>1</td><td>0</td><td>0</td><td>1</td><td>1</td><td>0</td><td>0</td><td>1</td></tr>
<tr class="lst3"><td>ROM (Full, R/W)</td><td>11136</td><td>10356</td><td>10838</td><td>15167</td><td>7682</td><td>8654</td><td>10628</td><td>7232</td></tr>
<tr><td>ROM (Min, R/W)</td><td>7072</td><td>6696</td><td>7007</td><td>9800</td><td>4634</td><td>5570</td><td>6564</td><td>4647</td></tr>
<tr><td>ROM (Full, R/O)</td><td>5218</td><td>4626</td><td>4949</td><td>6786</td><td>3528</td><td>3826</td><td>4676</td><td>3267</td></tr>
<tr><td>ROM (Min, R/O)</td><td>3626</td><td>3418</td><td>3536</td><td>4941</td><td>2558</td><td>2874</td><td>3272</td><td>2397</td></tr>
<tr><td>RAM (Static)</td><td>D*2 + 2</td><td>D*4 + 2</td><td>D*2 + 2</td><td>D*2 + 2</td><td>D*4 + 2</td><td>D*4 + 2</td><td>D*4 + 2</td><td>D*4 + 2</td></tr>
<tr><td>RAM (Dynamic)<br>(_FS_TINY == 0)</td><td>D*560 +<br>F*544</td><td>D*560 +<br>F*550</td><td>D*560 +<br>F*544</td><td></td><td>D*560 +<br>F*550</td><td>D*560 +<br>F*550</td><td>D*560 +<br>F*550</td><td>D*560 +<br>F*550</td></tr>
<tr><td>RAM (Dynamic)<br>(_FS_TINY == 1)</td><td>D*560 +<br>F*32</td><td>D*560 +<br>F*36</td><td>D*560 +<br>F*32</td><td>D*560 +<br>F*32</td><td>D*560 +<br>F*36</td><td>D*560 +<br>F*36</td><td>D*560 +<br>F*36</td><td>D*560 +<br>F*36</td></tr>
</table>
<p>These are the memory usage on some target systems with following condition. The memory sizes are in unit of byte, D means number of volumes and F means number of open files. All samples are optimezed in code size.</p>
<pre>
_FS_READONLY     0 (R/W), 1 (R/O)
_FS_MINIMIZE     0 (Full function), 3 (Minimized function)
_USE_STRFUNC     0 (Disable string functions)
_USE_MKFS        0 (Disable f_mkfs function)
_USE_FORWARD     0 (Disable f_forward function)
_CODE_PAGE       932 (Japanese Shift-JIS)
_USE_LFN         0 (Disable LFN)
_MULTI_PARTITION 0 (Single partition per drive)
_FS_REENTRANT    0 (Disable reentrancy)
</pre>
</div>

<div class="para">
<h3>Module Size Reduction</h3>
<p>Follwing table shows which function is removed by configuration options for the module size reduction.</p>
<table class="lst2">
<tr><td rowspan="2">Function</td><td colspan="3">_FS_MINIMIZE</td><td>_FS_READONLY</td><td>_USE_STRFUNC</td><td>_USE_MKFS</td><td>_USE_FORWARD</td></tr>
<tr><td>1</td><td>2</td><td>3</td><td>1</td><td>0</td><td>0</td><td>0</td></tr>
<tr class="lst3"><td>f_mount</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
<tr><td>f_open</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
<tr><td>f_close</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
<tr><td>f_read</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
<tr><td>f_write</td><td></td><td></td><td></td><td>x</td><td></td><td></td><td></td></tr>
<tr><td>f_sync</td><td></td><td></td><td></td><td>x</td><td></td><td></td><td></td></tr>
<tr><td>f_lseek</td><td></td><td></td><td>x</td><td></td><td></td><td></td><td></td></tr>
<tr><td>f_opendir</td><td></td><td>x</td><td>x</td><td></td><td></td><td></td><td></td></tr>
<tr><td>f_readdir</td><td></td><td>x</td><td>x</td><td></td><td></td><td></td><td></td></tr>
<tr><td>f_stat</td><td>x</td><td>x</td><td>x</td><td></td><td></td><td></td><td></td></tr>
<tr><td>f_getfree</td><td>x</td><td>x</td><td>x</td><td>x</td><td></td><td></td><td></td></tr>
<tr><td>f_truncate</td><td>x</td><td>x</td><td>x</td><td>x</td><td></td><td></td><td></td></tr>
<tr><td>f_unlink</td><td>x</td><td>x</td><td>x</td><td>x</td><td></td><td></td><td></td></tr>
<tr><td>f_mkdir</td><td>x</td><td>x</td><td>x</td><td>x</td><td></td><td></td><td></td></tr>
<tr><td>f_chmod</td><td>x</td><td>x</td><td>x</td><td>x</td><td></td><td></td><td></td></tr>
<tr><td>f_utime</td><td>x</td><td>x</td><td>x</td><td>x</td><td></td><td></td><td></td></tr>
<tr><td>f_rename</td><td>x</td><td>x</td><td>x</td><td>x</td><td></td><td></td><td></td></tr>
<tr><td>f_mkfs</td><td></td><td></td><td></td><td>x</td><td></td><td>x</td><td></td></tr>
<tr><td>f_forward</td><td></td><td></td><td></td><td></td><td></td><td></td><td>x</td></tr>
<tr><td>f_putc</td><td></td><td></td><td></td><td>x</td><td>x</td><td></td><td></td></tr>
<tr><td>f_puts</td><td></td><td></td><td></td><td>x</td><td>x</td><td></td><td></td></tr>
<tr><td>f_printf</td><td></td><td></td><td></td><td>x</td><td>x</td><td></td><td></td></tr>
<tr><td>f_gets</td><td></td><td></td><td></td><td></td><td>x</td><td></td><td></td></tr>
</table>
</div>

<div class="para">
<h3>Long File Name</h3>
<p>The FatFs module supports long file name (LFN) from revision 0.07. The two different file names, SFN and LFN, of a file is transparent in the file functions except for f_readdir function. To enable LFN feature, set <tt>_USE_LFN</tt> to 1 or 2, and add an OEM-Unicode bidirectional code conversion function ff_convert to the project. This function is available in <tt>cc*.c</tt>. The LFN feature requiers a certain working buffer in addition. The buffer size can be configured by <tt>_MAX_LFN</tt> corresponding to the available memory size. The size of long file name will reach up to 255 characters so that the <tt>_MAX_LFN</tt> should be set to 255 for full featured LFN operation. When the size of working buffer is insufficient for the given file name, the file function will fail with <tt>FR_INVALID_NAME</tt>. When enable the LFN feature with re-entrant feature, <tt>_USE_LFN</tt> must be set to 2. In this case, the file funciton allocates the working buffer on the stack. The working buffer occupies <tt>_MAX_LFN * 2 + 1</tt> bytes so that the caller's stack must be a sufficient size considering the working buffer.</p>
<table class="lst2 rset">
<caption>LFN cfg on ARM7DMI</caption>
<tr><th>Code page</th><th>ROM size [bytes]</th></tr>
<tr><td>SBCS</td><td>+4719</td></tr>
<tr><td>932(Shift-JIS)</td><td>+63755</td></tr>
<tr><td>936(GBK)</td><td>+178943</td></tr>
<tr><td>949(Korean)</td><td>+141003</td></tr>
<tr><td>950(Big5)</td><td>+112631</td></tr>
</table>
<p>When the LFN feature is enabled, the module size will be increased depends on the selected code page. Right table shows the difference in module size when LFN is enabled with some code pages. We are the Japanese, Chinese and Korean have tens of thousands of characters. Unfortunately, it requires a huge OEM-Unicode bidirectional conversion table and the module size will be drastically increased that shown in the table. As the result, the FatFs with LFN will not able to be implemented to most 8-bit microcontrollers including AVR. <small>This is the reason why I had not been interested in implementing the LFN feature for a long time :-)</small></p>
<p>Note that the LFN feature on the FAT file system is a patent of Microsoft Corporation. When enable it on the commercial products, a license from Microsoft may be required depends on the final destination.</p>
</div>

<div class="para">
<h3>Re-entrancy</h3>
<p>The file operations to the different volume can always work simultaneously regardless of re-entrancy setting. The re-entrancy to the same volume can be enabled with <tt>_FS_REENTRANT</tt> option. In this case, also the OS dependent synchronization object control functions, ff_cre_syncobj, ff_del_syncobj, ff_req_grant and ff_rel_grant must be added to the project. The sample code with documentation is available in <tt>syncobj.c</tt>.</p>
<p>When a file function is called while the volume is in use by any other task, the access is blocked until the task leaves file function. If wait time exceeded a period defined by <tt>_TIMEOUT</tt>, the file function will abort with <tt>FR_TIMEOUT</tt>. The timeout feature might not be supported on some RTOS.</p>
<p>There is an exception on f_mount and f_mkfs function. These functions are not re-entrant to the same volume. When use these functions, all other task must close the corresponding file on the volume and avoid to access the volume.</p>
<p>Note that this section describes on the re-entrancy of the FatFs module itself. There is no assumtion on the re-entrancy of low level disk I/O module.</p>
</div>

<div class="para">
<h3>Duplicated file access</h3>
<p>FatFs module does not support the shareing controls of duplicated file access. It is permitted when open method to the file is only read mode. The duplicated open in write mode to a file is always prohibited and open file must not be renamed, deleted, otherwise the FAT structure on the volume can be collapted.</p>
</div>

<div class="para">
<h3>Performance effective file access</h3>
<p>For good performance on reading/writing files on the small embedded system, application programmer should consider what process is done in the FatFs module. The file data on the disk is transferred in following sequence by f_read function.</p>
<p>Figure 1. Sector miss-aligned read (short)<br>
<img src="../img/f1.png" width="490" height="73" alt="">
</p>
<p>Figure 2. Sector miss-aligned read (long)<br>
<img src="../img/f2.png" width="490" height="140" alt="">
</p>
<p>Figure 3. Sector aligned read<br>
<img src="../img/f3.png" width="490" height="119" alt="">
</p>
<p>The file I/O buffer means a sector buffer to read/write a partial data on the sector. The sector buffer is either file private sector buffer on each file object or shared sector buffer on the file system object. The buffer configuration option <tt>_FS_TINY</tt> determins which sector buffer is used for the file data transfer. When tiny buffer (1) is selected, data memory consumption is reduced 512 bytes each file object. In this case, FatFs module uses only a sector buffer on the file system object for file data transfer and FAT/directory access. The disadvantage of the tiny buffer configuration is: the FAT data cached in the sector buffer will be lost by file data transfer and it must be reloaded at every cluster boundary. However it will be suitable for most application from view point of the decent performance and low memory comsumption.</p>
<p>Figure 1 shows that partial sector data is transferred via the file I/O buffer. On long data transfer shown in Figure 2, middle of transfer data that covers one or more sector is transferred to application buffer directly. Figure 3 shows that the case of entier transfer data is aligned to the sector boundary. In this case, file I/O buffer is not used. On the direct transfer, the maximum extent of sectors are read with disk_read function at a time but the multi sector transfer never across the cluster boundary even if it is contiguous.</p>
<p>Therefore taking effort to sector aligned read/write accesss avoids buffered data transfer and the read/write performance will be improved. Besides the effect, cached FAT data will not be flushed by file data transfer on the tiny configuration so that it can achieve same performance as non tiny configuration with small memory footprint.</p>
</div>

<div class="para">
<h3>Critical Section</h3>
<p>When write operation to the FAT file system is interrupted due to any accidental failure, such as sudden blackout, incorrect disk removal and unrecoverable disk error, the FAT structure can be collapted. Following images shows the critical section on the FatFs module.</p>
<div class="lset">
Figure 4. Long critical section<br>
<img src="../img/f4.png" width="320" height="436" alt="fig.4">
</div>
<div class="lset">
Figure 5. Minimized critical section<br>
<img src="../img/f5.png" width="320" height="436" alt="fig.5">
</div>
<br class="clr">
<p>An interruption in the red section can cause a cross link; as a result, the file/directory being changed may be lost. There is one or more possibility listed below when an interruption in the yellow section is occured.</p>
<ul>
<li>File data being rewrited is collapted.</li>
<li>A file being appended returns initial state.</li>
<li>A file created as new is gone.</li>
<li>A file created as new or in overwritten remains with length of zero.</li>
<li>Efficiency of disk use gets worse due to lost chain.</li>
</ul>
<p>Each case does not affect the files that not in write mode open. To minimize risk of data loss, the critical section can be minimized like shown in Figure 5 by minimizing the time that file is opened in write mode or using f_sync function properly.</p>
</div>

<p class="foot"><a href="../00index_e.html">Return</a></p>
</body>
</html>

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91免费国产在线观看| 欧美视频一区二区在线观看| 毛片不卡一区二区| 亚洲自拍偷拍av| 亚洲精品伦理在线| 玉米视频成人免费看| 一区二区三区四区不卡视频| 一区二区三区在线播| 亚洲精品国产视频| 亚洲影院免费观看| 亚洲成av人片在www色猫咪| 亚洲国产aⅴ天堂久久| 丝袜美腿亚洲综合| 捆绑紧缚一区二区三区视频| 另类专区欧美蜜桃臀第一页| 国产一区二区三区美女| 懂色av一区二区三区免费看| 成人黄色免费短视频| 97久久精品人人做人人爽| 91在线视频在线| 国产性色一区二区| 国产精品美女视频| 亚洲美女一区二区三区| 亚洲国产cao| 看片的网站亚洲| 成人小视频免费观看| 99久久婷婷国产精品综合| 欧洲一区二区三区在线| 91精品国产综合久久久久久久 | 99re视频精品| 欧美视频一区在线观看| 日韩精品自拍偷拍| 亚洲国产精品v| 亚洲国产综合在线| 久久99热这里只有精品| 成人av在线网站| 欧美在线看片a免费观看| 91精品国产免费| 久久久久久电影| 亚洲精品视频一区二区| 毛片一区二区三区| 93久久精品日日躁夜夜躁欧美| 欧美日韩日日夜夜| xnxx国产精品| 亚洲精品国产a| 精品一区二区免费在线观看| 欧美日韩视频一区二区| 久久亚洲私人国产精品va媚药| 国产精品美女久久久久久2018| 亚洲综合在线电影| 韩日av一区二区| 91久久久免费一区二区| 精品国产不卡一区二区三区| 亚洲少妇30p| 美日韩一区二区| 色老综合老女人久久久| 久久综合999| 亚洲成av人片在线| av不卡在线观看| 日韩美女一区二区三区| 亚洲一区二区视频在线| 国产精品66部| 在线不卡中文字幕播放| 日韩毛片在线免费观看| 国内偷窥港台综合视频在线播放| 日本久久一区二区| 日本一区二区电影| 久久av老司机精品网站导航| 欧亚洲嫩模精品一区三区| 国产无人区一区二区三区| 亚洲成人黄色小说| eeuss鲁片一区二区三区| 日韩女优视频免费观看| 亚洲成a人在线观看| 99久久精品久久久久久清纯| 精品成人私密视频| 婷婷丁香久久五月婷婷| 91久久一区二区| 中文字幕日韩精品一区| 国产一区二区精品久久| 91麻豆精品国产91久久久更新时间 | 56国语精品自产拍在线观看| 中文字幕国产一区二区| 久久99热99| 日韩一级免费观看| 日韩av在线发布| 欧美日韩一区久久| 一区二区三区中文在线观看| 成人avav影音| 中文字幕不卡在线播放| 国产91对白在线观看九色| 精品日韩99亚洲| 丝袜美腿一区二区三区| 欧美日韩小视频| 亚洲狠狠爱一区二区三区| 欧美在线视频全部完| 亚洲欧美综合网| 91免费版在线| 亚洲视频一区在线| 97se亚洲国产综合自在线| 中文字幕一区日韩精品欧美| 粉嫩aⅴ一区二区三区四区五区 | 亚洲欧洲国产专区| 成人性生交大片免费看在线播放| 久久理论电影网| 韩国三级电影一区二区| 精品国产精品网麻豆系列| 国产永久精品大片wwwapp| 2021久久国产精品不只是精品| 韩日av一区二区| 国产色婷婷亚洲99精品小说| 欧美丰满少妇xxxbbb| 性久久久久久久久久久久| 91精品视频网| 久99久精品视频免费观看| 精品国产一区二区精华| 国产一区欧美日韩| 国产欧美日韩精品一区| 成人精品在线视频观看| 亚洲图片另类小说| 欧美视频精品在线观看| 午夜视频在线观看一区| 日韩久久免费av| 成人免费av资源| 日韩美女久久久| 欧美乱熟臀69xxxxxx| 狠狠色丁香九九婷婷综合五月| 久久久久亚洲综合| thepron国产精品| 亚洲午夜视频在线| 日韩一区二区三区免费看| 国产一区91精品张津瑜| 中文字幕日本乱码精品影院| 一本久久a久久免费精品不卡| 婷婷成人激情在线网| 亚洲精品在线一区二区| 91亚洲精品一区二区乱码| 亚洲图片自拍偷拍| 精品成人佐山爱一区二区| 99久久伊人精品| 日韩av中文字幕一区二区 | 亚洲大型综合色站| 欧美不卡一二三| www.欧美色图| 日日夜夜精品视频天天综合网| 久久亚洲欧美国产精品乐播| 一本大道久久a久久精品综合| 日韩国产一二三区| 日韩激情一二三区| 久久久精品欧美丰满| 欧美在线啊v一区| 免费av成人在线| 综合激情网...| 日韩一区二区麻豆国产| 岛国一区二区三区| 日韩国产欧美在线播放| 中文字幕一区日韩精品欧美| 日韩一区国产二区欧美三区| 91一区二区三区在线观看| 奇米影视在线99精品| 最好看的中文字幕久久| 欧美电影免费观看高清完整版在 | 国产精品狼人久久影院观看方式| 欧美日韩在线综合| 成人免费高清在线| 麻豆国产91在线播放| 亚洲啪啪综合av一区二区三区| 制服视频三区第一页精品| 成人a级免费电影| 久久99国产精品免费| 一区二区三区小说| 国产色婷婷亚洲99精品小说| 欧美一区二区三区免费观看视频| 不卡的看片网站| 久久国产精品免费| 亚洲va韩国va欧美va| 日韩一区欧美一区| 久久一日本道色综合| 国产精品每日更新| 国产亚洲女人久久久久毛片| 777欧美精品| 91浏览器打开| 成人激情图片网| 精品制服美女久久| 日韩成人精品在线| 亚洲午夜羞羞片| 亚洲老司机在线| 中文字幕一区二区不卡| 久久精品一区二区| 26uuu亚洲综合色| 日韩美女主播在线视频一区二区三区| 欧美在线视频全部完| 91麻豆视频网站| 成人高清免费在线播放| 国产一区二区三区四区在线观看 | 欧美在线free| 91福利在线观看| 欧美主播一区二区三区| 91丝袜美女网| 一本一道综合狠狠老|