mount.html 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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 - f_mount</title>
  9. </head>
  10. <body>
  11. <div class="para">
  12. <h2>f_mount</h2>
  13. <p>The f_mount fucntion registers/unregisters a work area to the FatFs module.</p>
  14. <pre>
  15. FRESULT f_mount (
  16. BYTE <em>Drive</em>, /* Logical drive number */
  17. FATFS* <em>FileSystemObject</em> /* Pointer to the work area */
  18. );
  19. </pre>
  20. </div>
  21. <div class="para">
  22. <h4>Parameters</h4>
  23. <dl class="par">
  24. <dt>Drive</dt>
  25. <dd>Logical drive number (0-9) to register/unregister the work area. Always 0 for Tiny-FatFs.</dd>
  26. <dt>FileSystemObject</dt>
  27. <dd>Pointer to the work area (file system object) to be registered.</dd>
  28. </dl>
  29. </div>
  30. <div class="para">
  31. <h4>Return Values</h4>
  32. <dl class="ret">
  33. <dt>FR_OK (0)</dt>
  34. <dd>The function succeeded.</dd>
  35. <dt>FR_INVALID_DRIVE</dt>
  36. <dd>The drive number is invalid.</dd>
  37. </dl>
  38. </div>
  39. <div class="para">
  40. <h4>Description</h4>
  41. <p>The f_mount function registers/unregisters a work area to the FatFs module. The work area must be given to the logical drive with this function before any other file function. To unregister a work area, specify a NULL to the <em>FileSystemObject</em>, and then the work area can be discarded.</p>
  42. <p>This function only initializes the work area and registers its address to the internal table, any access to the disk I/O layer does not occure. The actual mounting process is performed depends on requirement in any other file funcitons with path name.<p>
  43. </div>
  44. <div class="para">
  45. <h4>References</h4>
  46. <p><tt><a href="sfatfs.html">FATFS</a></tt></p>
  47. </div>
  48. <p class="foot"><a href="../00index_e.html">Return</a></p>
  49. </body>
  50. </html>