f_mount

The f_mount fucntion registers/unregisters a work area to the FatFs module.

FRESULT f_mount (
  BYTE  Drive,              /* Logical drive number */
  FATFS*  FileSystemObject  /* Pointer to the work area */
);

Parameters

Drive
Logical drive number (0-9) to register/unregister the work area.
FileSystemObject
Pointer to the work area (file system object) to be registered.

Return Values

FR_OK, FR_INVALID_DRIVE

Description

The f_mount function registers/unregisters a work area to the FatFs module. The work area must be given to the each volume with this function prior to use any other file function. To unregister a work area, specify a NULL to the FileSystemObject, and then the work area can be discarded.

This function always succeeds regardless of the drive status. No media access is occured in this function. It only clears the given work area and registers its address to the internal table. The volume mount process is performed on first file access after f_mount function or media change.

QuickInfo

Always available.

See Also

FATFS

Return