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

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

?? appnote.html

?? FatFs/Tiny-FatFs Module Source Files R0.07
?? 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)
_EXCLUDE_LIB     0 (Use string.h)
_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. 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>.</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 LFN is enabled, the module size will be increased depends on the selected code page. Right table shows the difference in module size between the conditions that LFN is disabled and enabled on 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 enabled 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 independent 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 platform dependent lock out function in the ff.c must be re-written for each RTOS. When a file function is called while the volume is in use by any other thread, the access is blocked until the volume is unlocked. If wait time exceeded <tt>_TIMEOUT</tt> milliseconds, the function will abort with <tt>FR_TIMEOUT</tt>. The timeout 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, other thread 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>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一区二区三区免费野_久草精品视频
日韩一区二区三| 国产亚洲综合在线| 欧洲精品一区二区三区在线观看| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 免费在线观看视频一区| 五月天一区二区| 亚洲成人精品一区二区| 亚洲成人精品一区二区| 亚洲福利视频一区| 午夜精品在线视频一区| 日韩专区一卡二卡| 免费三级欧美电影| 国内精品在线播放| 国产宾馆实践打屁股91| 成人性生交大片免费看视频在线| 成人午夜在线播放| 91在线免费看| 欧美丝袜丝交足nylons| 欧美日韩国产影片| 日韩片之四级片| 久久久精品蜜桃| 中国色在线观看另类| 亚洲欧美日韩久久精品| 午夜a成v人精品| 老司机免费视频一区二区| 国产高清在线精品| 99久久免费视频.com| 欧美日韩日日夜夜| 久久久久久久久久久久久女国产乱 | 日韩女优av电影在线观看| 久久综合色播五月| 国产精品美女久久久久aⅴ| 自拍偷拍欧美激情| 日韩电影在线一区| 国产精品自拍三区| 91浏览器在线视频| 欧美成人高清电影在线| 中文一区二区完整视频在线观看| 亚洲激情六月丁香| 久久国产精品99精品国产| 国产白丝网站精品污在线入口| 一本到不卡免费一区二区| 欧美一区二区视频在线观看| 国产女人18毛片水真多成人如厕| 亚洲精品日日夜夜| 蜜臂av日日欢夜夜爽一区| 成人毛片视频在线观看| 欧美日韩黄色一区二区| 国产人成一区二区三区影院| 亚洲网友自拍偷拍| 国产精品一二三区在线| 欧美做爰猛烈大尺度电影无法无天| 日韩一区二区三免费高清| 亚洲桃色在线一区| 久久99最新地址| 欧美午夜精品久久久| 久久日一线二线三线suv| 亚洲精品菠萝久久久久久久| 国产一区视频导航| 欧美日韩在线播放一区| 国产日韩欧美精品一区| 日本视频中文字幕一区二区三区 | 久久亚洲精品小早川怜子| 亚洲少妇中出一区| 久久66热re国产| 在线观看视频一区二区| 国产精品人人做人人爽人人添| 日本不卡一区二区三区| 91免费在线播放| 国产调教视频一区| 奇米在线7777在线精品 | 国产日韩欧美高清在线| 青青青伊人色综合久久| 色就色 综合激情| 国产欧美视频在线观看| 老色鬼精品视频在线观看播放| 欧美性受极品xxxx喷水| 国产精品成人一区二区艾草 | 免费精品视频最新在线| 欧美综合一区二区三区| 国产精品国产自产拍高清av王其| 久久精品国产一区二区三 | 亚洲综合视频网| 成人av网站在线观看免费| 精品少妇一区二区三区免费观看| 亚洲成人黄色影院| 色综合色综合色综合| 国产精品你懂的| 国产乱码精品一区二区三区av| 日韩一区二区在线看片| 亚洲高清视频的网址| 91美女片黄在线观看| 中文字幕亚洲区| 成人精品免费网站| 国产亚洲视频系列| 国产乱一区二区| 精品久久久久久久久久久久久久久| 午夜成人免费电影| 4438成人网| 奇米影视7777精品一区二区| 制服丝袜成人动漫| 日韩福利视频网| 欧美日韩色综合| 天天免费综合色| 91精品国产麻豆国产自产在线| 亚洲成a人片在线观看中文| 欧美日韩久久一区二区| 五月天久久比比资源色| 欧美疯狂做受xxxx富婆| 日本怡春院一区二区| 91精品国产综合久久福利| 日韩中文字幕av电影| 日韩一二在线观看| 九色综合狠狠综合久久| 久久午夜免费电影| 国产不卡在线视频| 国产精品无码永久免费888| 成人av午夜影院| 亚洲精品欧美在线| 欧美麻豆精品久久久久久| 日本欧美一区二区| 日韩片之四级片| 国产精品888| 日韩伦理电影网| 欧美日本视频在线| 免费欧美日韩国产三级电影| 精品国产精品一区二区夜夜嗨| 国产精品小仙女| 国产精品国产精品国产专区不蜜 | 亚洲女人小视频在线观看| 91成人免费电影| 天堂影院一区二区| 久久综合网色—综合色88| 成年人网站91| 亚洲一区二区三区自拍| 欧美精品日韩综合在线| 激情图片小说一区| 国产精品麻豆视频| 欧美视频一区二区三区在线观看 | 国产精品一区二区三区网站| 国产精品美女久久久久久2018| 欧美四级电影网| 国产老妇另类xxxxx| 亚洲精品乱码久久久久久黑人| 欧美日韩夫妻久久| 国产高清成人在线| 亚洲激情图片小说视频| 精品欧美乱码久久久久久| 成人免费av网站| 日韩成人伦理电影在线观看| 欧美激情在线一区二区| 欧美日韩一级片在线观看| 国产一区二区三区蝌蚪| 一区二区三区鲁丝不卡| 欧美精品一区二区蜜臀亚洲| 99精品国产91久久久久久| 欧美a一区二区| 中文字幕综合网| 精品sm在线观看| 欧洲亚洲国产日韩| 国产精品综合一区二区| 亚洲成人资源在线| 中文字幕不卡在线播放| 69久久99精品久久久久婷婷| 成人aa视频在线观看| 美脚の诱脚舐め脚责91 | 精品亚洲国产成人av制服丝袜| 亚洲欧美福利一区二区| 久久精品视频免费观看| 欧美一区二区视频在线观看2020 | 久久一日本道色综合| 在线视频一区二区三区| 国产传媒一区在线| 日韩成人一级片| 亚洲一区二区免费视频| 国产精品福利一区| www亚洲一区| 91超碰这里只有精品国产| 日本精品视频一区二区三区| 国产一区在线看| 日韩精品国产欧美| 亚洲制服丝袜av| 国产精品网站一区| 久久久久久一二三区| 欧美大黄免费观看| 这里是久久伊人| 欧美日韩在线播放三区四区| 色综合天天做天天爱| 国产成a人亚洲精| 国产专区欧美精品| 蜜臀av在线播放一区二区三区| 亚洲国产成人高清精品| 亚洲精品乱码久久久久久日本蜜臀| 国产精品免费久久| 中文字幕欧美日本乱码一线二线| 26uuu另类欧美| 精品福利av导航| 欧美va亚洲va在线观看蝴蝶网| 91精品国产高清一区二区三区蜜臀| 欧美综合亚洲图片综合区|