]> cloudbase.mooo.com Git - z180-stamp.git/blobdiff - fatfs/doc/en/dread.html
Import fatfs R0.12b
[z180-stamp.git] / fatfs / doc / en / dread.html
index 2e7c279c2394ebd4cd2a324fdc5d3affb57b6622..e7c2d7d9764986a6360829ae4a96f4eb01b116b3 100644 (file)
@@ -30,11 +30,11 @@ DRESULT disk_read (
 <dt>pdrv</dt>\r
 <dd>Physical drive number to identify the target device.</dd>\r
 <dt>buff</dt>\r
-<dd>Pointer to the <em>byte array</em> to store the read data.</dd>\r
+<dd>Pointer to the first item of the <em>byte array</em> to store read data.</dd>\r
 <dt>sector</dt>\r
 <dd>Start sector number in 32-bit LBA.</dd>\r
 <dt>count</dt>\r
-<dd>Number of sectors to read in range of from 1 to 128..</dd>\r
+<dd>Number of sectors to read.</dd>\r
 </dl>\r
 </div>\r
 \r
@@ -56,12 +56,12 @@ DRESULT disk_read (
 \r
 <div class="para desc">\r
 <h4>Description</h4>\r
-<p>The data read/write operation to the storage devices is done in unit of <em>sector</em>. FatFs supports the sector size in range of from 512 to 4096 bytes. When FatFs is configured to fixed sector size (<tt>_MIN_SS == MAX_SS</tt>, this will be the most case), the read/write function must work at that sector size. If variable sector size is selected (<tt>_MIN_SS &lt; MAX_SS</tt>), FatFs inquires the sector size with <tt>disk_ioctl()</tt> after initialization</tt>.\r
-<p>The memory address specified by <tt class="arg">buff</tt> is not that always aligned to word boundary because the 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>\r
+<p>The data read/write operation to the storage devices is done in unit of <em>sector</em>. FatFs supports the sector size in range of from 512 to 4096 bytes. When FatFs is configured to fixed sector size (<tt>_MIN_SS == MAX_SS</tt>, this will be the most case), the read/write function must work at that sector size. When FatFs is configured to variable sector size (<tt>_MIN_SS != MAX_SS</tt>), sector size is inquired with <tt>disk_ioctl</tt> function following <tt>disk_initialize</tt> function.</p>\r
+<p>The memory address specified by <tt class="arg">buff</tt> is not that always aligned to word boundary because the argument is defined as <tt>BYTE*</tt>. The unaligned read/write request can occure at <a href="appnote.html#fs1">direct transfer</a>. If the bus architecture, especially DMA controller, does not allow unaligned memory access, it should be solved in this function. There are some workarounds described below to avoid this issue.</p>\r
 <ul>\r
 <li>Convert word transfer to byte transfer in this function if needed. - Recommended.</li>\r
-<li>For <tt>f_read()</tt>, avoid long read request that includes a whole of sector. - Direct transfer will never occure.</li>\r
-<li>For <tt>f_read(fp, buff, btr, &amp;br)</tt>, make sure that <tt>(((UINT)buff &amp; 3) == (f_tell(fp) &amp; 3))</tt> is true. - Word aligned direct transfer is guaranteed.</li>\r
+<li>On the <tt>f_read</tt> calls, avoid long read request that includes a whole of sector. - Any direct transfer never occures.</li>\r
+<li>On the <tt>f_read</tt> calls, make sure that <tt>(((UINT)data &amp; 3) == (f_tell(fp) &amp; 3))</tt> is true. - Word alignment of <tt>buff</tt> is guaranteed.</li>\r
 </ul>\r
 <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>\r
 </div>\r