- Added a memory configuration option. (_USE_LFN) - Added file lock feature. (_FS_SHARE) - Added fast seek feature. (_USE_FASTSEEK) - Changed some types on the API, XCHAR->TCHAR. - Changed fname member in the FILINFO structure on Unicode cfg. - String functions support UTF-8 encoding files on Unicode cfg.
		
			
				
	
	
		
			69 lines
		
	
	
		
			2.8 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			69 lines
		
	
	
		
			2.8 KiB
		
	
	
	
		
			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="alternate" hreflang="ja" title="Japanese" href="../ja/dioctl.html">
 | |
| <link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
 | |
| <title>FatFs - disk_ioctl</title>
 | |
| </head>
 | |
| 
 | |
| <body>
 | |
| 
 | |
| <div class="para">
 | |
| <h2>disk_ioctl</h2>
 | |
| <p>The disk_ioctl function cntrols device specified features and miscellaneous functions other than disk read/write.</p>
 | |
| <pre>
 | |
| DRESULT disk_ioctl (
 | |
|   BYTE <em>Drive</em>,      <span>/* Drive number */</span>
 | |
|   BYTE <em>Command</em>,    <span>/* Control command code */</span>
 | |
|   void* <em>Buffer</em>     <span>/* Parameter and data buffer */</span>
 | |
| );
 | |
| </pre>
 | |
| </div>
 | |
| 
 | |
| <div class="para">
 | |
| <h4>Parameters</h4>
 | |
| <dl class="par">
 | |
| <dt>Drive</dt>
 | |
| <dd>Specifies the drive number (0-9).</dd>
 | |
| <dt>Command</dt>
 | |
| <dd>Specifies the command code.</dd>
 | |
| <dt>Buffer</dt>
 | |
| <dd>Pointer to the parameter buffer depends on the command code. When it is not used, specify a NULL pointer.</dd>
 | |
| </dl>
 | |
| </div>
 | |
| 
 | |
| 
 | |
| <div class="para">
 | |
| <h4>Return Value</h4>
 | |
| <dl class="ret">
 | |
| <dt>RES_OK (0)</dt>
 | |
| <dd>The function succeeded.</dd>
 | |
| <dt>RES_ERROR</dt>
 | |
| <dd>Any error occured.</dd>
 | |
| <dt>RES_PARERR</dt>
 | |
| <dd>Invalid command code.</dd>
 | |
| <dt>RES_NOTRDY</dt>
 | |
| <dd>The disk drive has not been initialized.</dd>
 | |
| </dl>
 | |
| </div>
 | |
| 
 | |
| 
 | |
| <div class="para">
 | |
| <h4>Description</h4>
 | |
| <p>The FatFs module uses only device independent commands described below. Any device dependent function is not used.</p>
 | |
| <table class="lst">
 | |
| <tr><th>Command</th><th>Description</th></tr>
 | |
| <tr><td>CTRL_SYNC</td><td>Make sure that the disk drive has finished pending write process. When the disk I/O module has a write back cache, flush the dirty sector immediately. This command is not required in read-only configuration.</td></tr>
 | |
| <tr><td>GET_SECTOR_SIZE</td><td>Returns sector size of the drive into the WORD variable pointed by <tt>Buffer</tt>. This command is not required in single sector size configuration, _MAX_SS is 512.</td></tr>
 | |
| <tr><td>GET_SECTOR_COUNT</td><td>Returns total sectors on the drive into the DWORD variable pointed by <tt>Buffer</tt>. This command is used by only f_mkfs function to determine the volume size to be created.</td></tr>
 | |
| <tr><td>GET_BLOCK_SIZE</td><td>Returns erase block size of the flash memory in unit of sector into the DWORD variable pointed by <tt>Buffer</tt>. This command is used by only f_mkfs function and it attempts to align data area to the erase block boundary. The allowable value is 1 to 32768 in power of 2. Return 1 if the erase block size is unknown or disk devices.</td></tr>
 | |
| </table>
 | |
| </div>
 | |
| 
 | |
| <p class="foot"><a href="../00index_e.html">Return</a></p>
 | |
| </body>
 | |
| </html>
 |