- Added selection of character encoding on the file. (_STRF_ENCODE) - Added f_closedir(). - Added forced full FAT scan for f_getfree(). (_FS_NOFSINFO) - Added forced mount feature with changes of f_mount(). - Improved behavior of volume auto detection. - Improved write throughput of f_puts() and f_printf(). - Changed argument of f_chdrive(), f_mkfs(), disk_read() and disk_write(). - Fixed f_write() can be truncated when the file size is close to 4GB. - Fixed f_open(), f_mkdir() and f_setlabel() can return incorrect error code.
		
			
				
	
	
		
			69 lines
		
	
	
		
			2.5 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			69 lines
		
	
	
		
			2.5 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 | ||
| <html lang="ja">
 | ||
| <head>
 | ||
| <meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
 | ||
| <meta http-equiv="Content-Style-Type" content="text/css">
 | ||
| <link rel="up" title="FatFs" href="../00index_j.html">
 | ||
| <link rel="alternate" hreflang="en" title="English" href="../en/dwrite.html">
 | ||
| <link rel="stylesheet" href="../css_j.css" type="text/css" media="screen" title="ELM Default">
 | ||
| <title>FatFs - disk_write</title>
 | ||
| </head>
 | ||
| 
 | ||
| <body>
 | ||
| 
 | ||
| <div class="para func">
 | ||
| <h2>disk_write</h2>
 | ||
| <p>ディスクにデータを書き込みます。</p>
 | ||
| <pre>
 | ||
| DRESULT disk_write (
 | ||
|   BYTE <span class="arg">pdrv</span>,        <span class="c">/* [IN] 物理ドライブ番号 */</span>
 | ||
|   const BYTE* <span class="arg">buff</span>, <span class="c">/* [IN] 書き込むデータへのポインタ */</span>
 | ||
|   DWORD <span class="arg">sector</span>,     <span class="c">/* [IN] 書き込み開始セクタ番号 */</span>
 | ||
|   UINT <span class="arg">count</span>        <span class="c">/* [IN] 書き込むセクタ数 */</span>
 | ||
| );
 | ||
| </pre>
 | ||
| </div>
 | ||
| 
 | ||
| <div class="para arg">
 | ||
| <h4>引数</h4>
 | ||
| <dl class="par">
 | ||
| <dt>pdrv</dt>
 | ||
| <dd>物理ドライブ番号(0-9)が指定されます。</dd>
 | ||
| <dt>buff</dt>
 | ||
| <dd>ディスクに書き込む<em>バイト配列</em>が指定されます。<em>アドレスは常にワード・アライメントされているとは限りません</em>。</dd>
 | ||
| <dt>sector</dt>
 | ||
| <dd>書き込みを開始するセクタ番号。LBAで指定されます。</dd>
 | ||
| <dt>count</dt>
 | ||
| <dd>書き込むセクタ数。 1~128の範囲の値で指定されます。一般的に、複数セクタの転送要求はデバイスに対して可能な限りマルチ・セクタ転送しなければなりません。複数のシングル・セクタ書き込みに分解した場合、スループットが極端に低下することがあります。</dd>
 | ||
| </dl>
 | ||
| </div>
 | ||
| 
 | ||
| 
 | ||
| <div class="para ret">
 | ||
| <h4>戻り値</h4>
 | ||
| <dl class="ret">
 | ||
| <dt>RES_OK (0)</dt>
 | ||
| <dd>正常終了。</dd>
 | ||
| <dt>RES_ERROR</dt>
 | ||
| <dd>書き込み中にエラーが発生し、その回復にも失敗した。</dd>
 | ||
| <dt>RES_WRPRT</dt>
 | ||
| <dd>メディアが書き込み禁止状態。</dd>
 | ||
| <dt>RES_PARERR</dt>
 | ||
| <dd>パラメータが不正。</dd>
 | ||
| <dt>RES_NOTRDY</dt>
 | ||
| <dd>ドライブが動作可能状態ではない(初期化されていない)。</dd>
 | ||
| </dl>
 | ||
| </div>
 | ||
| 
 | ||
| 
 | ||
| <div class="para desc">
 | ||
| <h4>解説</h4>
 | ||
| <p>リード・オンリー構成ではこの関数は必要とされません。</p>
 | ||
| <p><em>FatFsの使用中はアプリケーションからはこの関数を呼び出してはなりません。さもないと、FATボリュームが破壊されます。エラー等により再初期化が必要なときは、<tt>f_mount()</tt>を使用してください。</em>FatFsモジュールは、自動マウント動作により、必要に応じてこの関数を呼び出します。</p>
 | ||
| </div>
 | ||
| 
 | ||
| 
 | ||
| <p class="foot"><a href="../00index_j.html">戻る</a></p>
 | ||
| </body>
 | ||
| </html>
 |