dstat.html 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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="alternate" hreflang="ja" title="Japanese" href="../ja/dstat.html">
  8. <link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
  9. <title>FatFs - disk_status</title>
  10. </head>
  11. <body>
  12. <div class="para func">
  13. <h2>disk_status</h2>
  14. <p>The disk_status function returns the current disk status.</p>
  15. <pre>
  16. DSTATUS disk_status (
  17. BYTE <span class="arg">pdrv</span> <span class="c">/* [IN] Physical drive number */</span>
  18. );
  19. </pre>
  20. </div>
  21. <div class="para arg">
  22. <h4>Parameter</h4>
  23. <dl class="par">
  24. <dt>pdrv</dt>
  25. <dd>Physical drive number to identify the target device.</dd>
  26. </dl>
  27. </div>
  28. <div class="para ret">
  29. <h4>Return Values</h4>
  30. <p>The disk status is returned in combination of following flags. FatFs refers only <tt>STA_NOINIT</tt> and <tt>STA_PROTECT</tt>.</p>
  31. <dl class="ret">
  32. <dt>STA_NOINIT</dt>
  33. <dd>Indicates that the device is not initialized. This flag is set on system reset, media removal or failure of <tt>disk_initialize()</tt> function. It is cleared on <tt>disk_initialize()</tt> function succeeded. Media change that occurs asynchronously must be captured and reflect it to the status flags, or auto-mount feature will not work correctly. When media change detection feature is not supported, application program needs to de-initialize the file system object with <tt>f_mount()</tt> function after the media change.</dd>
  34. <dt>STA_NODISK</dt>
  35. <dd>Indicates that no medium in the drive. This is always cleared on fixed disk drive. Note that FatFs does not refer this flag.</dd>
  36. <dt>STA_PROTECT</dt>
  37. <dd>Indicates that the medium is write protected. This is always cleared on the drives without write protect feature. Not valid while no medium in the drive.</dd>
  38. </dl>
  39. </div>
  40. <p class="foot"><a href="../00index_e.html">Return</a></p>
  41. </body>
  42. </html>