The f_mount fucntion registers/unregisters file system object (work area) to the FatFs module.
FRESULT f_mount ( BYTE vol, /* [IN] Logical drive number */ FATFS* fatfs /* [IN] File system object */ );
The f_mount() function registers/unregisters a file system object to the FatFs module. 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.
This function always succeeds regardless of the physical drive status. No media access is occured in this function. It only de-initializes the given work area and registers its address to the internal table. It can also be used to force de-initialized the registered work area of a logical drive. The volume mount process, initialize the corresponding physical drive, find the FAT volume in it and initialize the work area, is performed when either or both of following condition is true:
If the disk I/O layer does not detect media change, application program needs to perform f_mount() every media change.
Always available.