From 5630b9308323c3f3aaa09be8fe0f3aecaa826473 Mon Sep 17 00:00:00 2001 From: Leo C. Date: Sun, 30 Jun 2024 09:37:28 +0200 Subject: Import fatfs R0.15 --- fatfs/documents/doc/mount.html | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'fatfs/documents/doc/mount.html') diff --git a/fatfs/documents/doc/mount.html b/fatfs/documents/doc/mount.html index 901ffc0..57f40be 100644 --- a/fatfs/documents/doc/mount.html +++ b/fatfs/documents/doc/mount.html @@ -13,7 +13,7 @@
The f_mount fucntion registers/unregisters filesystem object to the FatFs module.
+The f_mount fucntion gives work area to the FatFs module.
FRESULT f_mount ( FATFS* fs, /* [IN] Filesystem object */ @@ -21,6 +21,11 @@ FRESULT f_mount ( BYTE opt /* [IN] Initialization option */ );+
+FRESULT f_unmount ( + const TCHAR* path /* [IN] Logical drive number */ +); +
FatFs requires work area (filesystem object) for each logical drives (FAT volumes). Prior to perform file/directory operations, a filesystem object needs to be registered with f_mount function to the logical drive. The file/directory API functions get ready to work after this procedure. If there is any open object of file or directory on the logical drive, the object will be invalidated by this function.
+FatFs requires work area (filesystem object) for each logical drives (FAT volumes). Prior to perform any file/directory operations, a filesystem object needs to be registered with f_mount function for the logical drive. The file/directory API functions get ready to work after this procedure. Some volume management functions, f_mkfs, f_fdisk and f_setcp, do not want a filesystem object.
The f_mount function registers/unregisters a filesystem object to the FatFs module as follows:
If there is any open object of file or directory on the logical drive, the object will be invalidated by this function.
If forced mounting is not specified (opt = 0), this function always succeeds regardless of the physical drive status. It only clears (de-initializes) the given work area and registers its address to the internal table and no activity of the physical drive in this function. The volume mount process will be attempted on subsequent file/directroy function if the filesystem object is not initialized. (delayed mounting) The volume mount processes, initialize the corresponding physical drive, find the FAT volume in it and then initialize the work area, is performed in the subsequent file/directory functions when either of following conditions is true.
If the function with forced mounting (opt = 1) failed with FR_NOT_READY, it means that the filesystem object has been registered successfully but the volume is currently not ready to work. The volume mount process will be attempted on subsequent file/directroy function.
If implementation of the disk I/O layer lacks asynchronous media change detection, application program needs to perform f_mount function after each media change to force cleared the filesystem object.
-To unregister the work area, specify a NULL to the fs, and then the work area can be discarded.
+To unregister the work area, specify a NULL to the fs, and then the work area can be discarded. f_unmount function is implemented as a macro.
++#define f_unmount(path) f_mount(0, path, 0) +