X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Ffs%2Ffat.h;h=df748d5b0147928cb3a8417443bf0269dd883fa6;hb=4d8a6a97c6c0e15296b51d5f02674079bede1aa0;hp=0dd1529f752568e36df92fedbae4a0a07cbd0853;hpb=ef02c60278e6425cd2bcc2b30598924bf53f402d;p=bertos.git diff --git a/bertos/fs/fat.h b/bertos/fs/fat.h index 0dd1529f..df748d5b 100644 --- a/bertos/fs/fat.h +++ b/bertos/fs/fat.h @@ -35,20 +35,19 @@ * 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" + * $WIZ$ module_depends = "kfile", "ff", "diskio" * */ #ifndef FS_FAT_H #define FS_FAT_H -#include +#include #include "fatfs/ff.h" typedef struct FatFile @@ -68,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);