dread.html 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  2. <html lang="en">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  5. <meta http-equiv="Content-Style-Type" content="text/css">
  6. <link rel="up" title="FatFs" href="../00index_e.html">
  7. <link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
  8. <title>FatFs - disk_read</title>
  9. </head>
  10. <body>
  11. <div class="para">
  12. <h2>disk_read</h2>
  13. <p>The disk_read function reads sector(s) from the disk drive.</p>
  14. <pre>
  15. DRESULT disk_read (
  16. BYTE <em>Drive</em>, /* Physical drive number */
  17. BYTE* <em>Buffer</em>, /* Pointer to the read data buffer */
  18. DWORD <em>SectorNumber</em>, /* Start sector number */
  19. BYTE <em>SectorCount</em> /* Number of sectros to read */
  20. );
  21. </pre>
  22. </div>
  23. <div class="para">
  24. <h4>Parameters</h4>
  25. <dl class="par">
  26. <dt>Drive</dt>
  27. <dd>Specifies the physical drive number.</dd>
  28. <dt>Buffer</dt>
  29. <dd>Pointer to the read buffer to store the read data. The buffer size of number of bytes to be read is required.</dd>
  30. <dt>SectorNumber</dt>
  31. <dd>Specifies the start sector number in logical block address (LBA).</dd>
  32. <dt>SectorCount</dt>
  33. <dd>Specifies number of sectors to read. The value can be 1 to 255.</dd>
  34. </dl>
  35. </div>
  36. <div class="para">
  37. <h4>Return Value</h4>
  38. <dl class="ret">
  39. <dt>RES_OK (0)</dt>
  40. <dd>The function succeeded.</dd>
  41. <dt>RES_ERROR</dt>
  42. <dd>Any hard error occured during the read operation and could not recover it.</dd>
  43. <dt>RES_PARERR</dt>
  44. <dd>Invalid parameter.</dd>
  45. <dt>RES_NOTRDY</dt>
  46. <dd>The disk drive has not been initialized.</dd>
  47. </dl>
  48. </div>
  49. <p class="foot"><a href="../00index_e.html">Return</a></p>
  50. </body>
  51. </html>