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 (0)
The function succeeded.
FR_INVALID_DRIVE
The drive number is invalid.

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 only initializes the given work area and registers its address to the internal table, any access to the disk I/O layer does not occure. The volume mount process is performed on first file access after f_mount function or media change.

QuickInfo

Always available.

See Also

FATFS

Return