X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Ffs%2Ffat.h;h=7d03252b87ab80c533647803fe2ef3d0e016d783;hb=2bc2b05bc4ee047d9287d97f504ae737507b5d5b;hp=34b20bbac1a7e2725fd562264984857384509ae0;hpb=f8224de0624cd0c81dbdf0bc969b86a83c29d5d8;p=bertos.git diff --git a/bertos/fs/fat.h b/bertos/fs/fat.h index 34b20bba..7d03252b 100644 --- a/bertos/fs/fat.h +++ b/bertos/fs/fat.h @@ -32,7 +32,9 @@ * * \brief FatFS: kfile interface for FatFS module by ChaN. * - * \version $Id$ + * This driver needs some low level hardware access functions. An example implementation + * is provided in sd.h. + * * * \author Luca Ottaviano * @@ -45,7 +47,7 @@ #ifndef FS_FAT_H #define FS_FAT_H -#include +#include #include "fatfs/ff.h" typedef struct FatFile @@ -65,9 +67,15 @@ 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. + * \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);