diff options
author | pashamray <pashamray@gmail.com> | 2014-07-02 13:03:18 +0300 |
---|---|---|
committer | pashamray <pashamray@gmail.com> | 2014-07-02 13:03:18 +0300 |
commit | a3993c80e0f2cbb11813ce29613af5f3bc0070fa (patch) | |
tree | 9fabe62195ec5068f8aea3e9d4f961847ca67c13 /src/gfile/fatfs/doc/en/dread.html | |
parent | 8e13c10f392396022a4b2ae04b5ccd8cb795f17e (diff) | |
parent | e67fbb3e6b82742eae4096faff2a1e47e25804e3 (diff) | |
download | uGFX-a3993c80e0f2cbb11813ce29613af5f3bc0070fa.tar.gz uGFX-a3993c80e0f2cbb11813ce29613af5f3bc0070fa.tar.bz2 uGFX-a3993c80e0f2cbb11813ce29613af5f3bc0070fa.zip |
master слито с pcf8812
Diffstat (limited to 'src/gfile/fatfs/doc/en/dread.html')
-rw-r--r-- | src/gfile/fatfs/doc/en/dread.html | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/src/gfile/fatfs/doc/en/dread.html b/src/gfile/fatfs/doc/en/dread.html new file mode 100644 index 00000000..f81cf906 --- /dev/null +++ b/src/gfile/fatfs/doc/en/dread.html @@ -0,0 +1,71 @@ +<!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/dread.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - disk_read</title>
+</head>
+
+<body>
+
+<div class="para func">
+<h2>disk_read</h2>
+<p>The disk_read function reads sector(s) from the storage device.</p>
+<pre>
+DRESULT disk_read (
+ BYTE <span class="arg">pdrv</span>, <span class="c">/* [IN] Physical drive number */</span>
+ BYTE* <span class="arg">buff</span>, <span class="c">/* [OUT] Pointer to the read data buffer */</span>
+ DWORD <span class="arg">sector</span>, <span class="c">/* [IN] Start sector number */</span>
+ UINT <span class="arg">count</span> <span class="c">/* [IN] Number of sectros to read */</span>
+);
+</pre>
+</div>
+
+<div class="para arg">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>pdrv</dt>
+<dd>Physical drive number to identify the target device.</dd>
+<dt>buff</dt>
+<dd>Pointer to the <em>byte array</em> to store the read data.</dd>
+<dt>sector</dt>
+<dd>Start sector number in logical block address (LBA).</dd>
+<dt>count</dt>
+<dd>Number of sectors to read. FatFs specifis it in range of from 1 to 128.</dd>
+</dl>
+</div>
+
+
+<div class="para ret">
+<h4>Return Value</h4>
+<dl class="ret">
+<dt>RES_OK (0)</dt>
+<dd>The function succeeded.</dd>
+<dt>RES_ERROR</dt>
+<dd>Any hard error occured during the read operation and could not recover it.</dd>
+<dt>RES_PARERR</dt>
+<dd>Invalid parameter.</dd>
+<dt>RES_NOTRDY</dt>
+<dd>The device has not been initialized.</dd>
+</dl>
+</div>
+
+
+<div class="para desc">
+<h4>Description</h4>
+<p>The memory address specified by <tt class="arg">buff</tt> is not that always aligned to word boundary because the type of argument is defined as <tt>BYTE*</tt>. The misaligned read/write request can occure at <a href="appnote.html#fs1">direct transfer</a>. If the bus architecture, especially DMA controller, does not allow misaligned memory access, it should be solved in this function. There are some workarounds described below to avoid this issue.</p>
+<ul>
+<li>Convert word transfer to byte transfer in this function. - Recommended.</li>
+<li>For <tt>f_read()</tt>, avoid long read request that includes a whole of sector. - Direct transfer will never occure.</li>
+<li>For <tt>f_read(fp, buff, btr, &br)</tt>, make sure that <tt>(((UINT)buff & 3) == (f_tell(fp) & 3))</tt> is true. - Word aligned direct transfer is guaranteed.</li>
+</ul>
+<p>Generally, a multiple sector transfer request must not be split into single sector transactions to the storage device, or you will not get good read throughput.</p>
+</div>
+
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
|