X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Ffs%2Ffat.h;h=3e7dc787a1a8da95b1d4ee127640ab4fde373947;hb=4ebb8b433309c67d161345c43c99450c661b8403;hp=77d046eeb9ae8aa58b6398556fccc290ea4d6f20;hpb=b65e60edaa04a0d0bec335198d7cf2279f3a22ae;p=bertos.git diff --git a/bertos/fs/fat.h b/bertos/fs/fat.h index 77d046ee..3e7dc787 100644 --- a/bertos/fs/fat.h +++ b/bertos/fs/fat.h @@ -32,16 +32,24 @@ * * \brief FatFS: kfile interface for FatFS module by ChaN. * + * This driver needs some low level hardware access functions. An example implementation + * is provided in sd.h. + * * \version $Id$ * * \author Luca Ottaviano * + * $WIZ$ module_name = "fat" + * $WIZ$ module_configuration = "bertos/cfg/cfg_fat.h" + * $WIZ$ module_depends = "kfile", "ff" + * */ + #ifndef FS_FAT_H #define FS_FAT_H #include -#include "fatfs/src/ff.h" +#include "fatfs/ff.h" typedef struct FatFile { @@ -60,6 +68,16 @@ INLINE FatFile * FATFILE_CAST(KFile *fd) /** * Initialize \a file and open \a file_path for reading. + * + * \a mode is a OR combination of various flags, you can use \a FA_READ for + * read access or \a FA_WRITE for write access. + * The function returns \a FR_OK if success, other values (defined in ff.h) in case + * of failure. + * + * \param file A pointer to a FatFile structure. + * \param file_path The file path on the filesystem. + * \param mode Open mode for the file, which can be OR'ed together + * \sa ff.h for return code meaning and \a mode flags. */ FRESULT fatfile_open(FatFile *file, const char *file_path, BYTE mode);