From dd38d907244bc0e483c3d760f2ba464a394ec229 Mon Sep 17 00:00:00 2001 From: Dave Hylands Date: Tue, 11 Mar 2014 23:55:41 -0700 Subject: Initial checkin with STM HAL This compiles and links, but hasn't been tested on a board yet and even if it was run, it doesn't currently do anything. --- stmhal/fatfs/doc/en/mount.html | 83 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 stmhal/fatfs/doc/en/mount.html (limited to 'stmhal/fatfs/doc/en/mount.html') diff --git a/stmhal/fatfs/doc/en/mount.html b/stmhal/fatfs/doc/en/mount.html new file mode 100644 index 000000000..5fc1eb647 --- /dev/null +++ b/stmhal/fatfs/doc/en/mount.html @@ -0,0 +1,83 @@ + + + + + + + + +FatFs - f_mount + + + + +
+

f_mount

+

The f_mount fucntion registers/unregisters file system object (work area) to the FatFs module.

+
+FRESULT f_mount (
+  FATFS*       fatfs, /* [IN] File system object */
+  const TCHAR* path,  /* [IN] Logical drive number */
+  BYTE         opt    /* [IN] Initialization option */
+);
+
+
+ +
+

Parameters

+
+
fatfs
+
Pointer to the file system object to be registered. Null pointer unregisters the registered file system object.
+
path
+
Pointer to the null-terminated string that specifies the logical drive. If there is no drive number, it means the default drive.
+
opt
+
Initialization option. 0: Do not mount now (to be mounted later), 1: Force mounted the volume to check if the volume is available.
+
+
+ +
+

Return Values

+

+FR_OK, +FR_INVALID_DRIVE, +FR_DISK_ERR, +FR_NOT_READY, +FR_NO_FILESYSTEM +

+
+ + +
+

Description

+

The f_mount() function registers/unregisters a file system object used for the logical drive to the FatFs module as follows:

+
    +
  1. Determines the logical drive which specified by path.
  2. +
  3. Clears and unregisters the regsitered work area of the drive.
  4. +
  5. Clears and registers the work area to the drive if fatfs is not NULL.
  6. +
  7. Performs volume mount process to the drive if forced mount is specified.
  8. +
+

The file system object is the work area needed for each logical drive. It must be given to the logical drive with this function prior to use any other file functions. To unregister a work area, specify a NULL to the fatfs, and then the work area can be discarded.

+

If forced mount is not specified, this function always succeeds regardless of the physical drive status due to delayed mount feature. It only clears (de-initializes) the given work area and registers its address to the internal table. No activity of the physical drive in this function. It can also be used to force de-initialized the registered work area of a logical drive. The volume mount processes, initialize the corresponding physical drive, find the FAT volume in it and initialize the work area, is performed in the subsequent file access functions when either or both of following condition is true.

+ +

If the function with forced mount failed, it means that the file system object is registered but the volume is currently not available. Mount process will also be attempted in subsequent file access functions.

+

If implementation of the disk I/O layer lacks media change detection, application program needs to perform a f_mount() after media change to force cleared the file system object.

+
+ + +
+

QuickInfo

+

Always available.

+
+ + +
+

See Also

+

f_open, FATFS

+
+ +

Return

+ + -- cgit v1.2.3