//  Copyright (C) 2016, mituhiromatuura all right reserved.

#include "diskio.h"
#include "ff.h"

extern FATFS fatfs;
extern int last_size;

extern FRESULT fatfs_open (FIL* fp, const TCHAR* path, BYTE mode);
extern FRESULT fatfs_close (FIL* fp);
extern FRESULT fatfs_read (FIL* fp, void* buff, UINT btr, UINT* br);
extern FRESULT fatfs_write (FIL* fp, const void* buff, UINT btw, UINT* bw);
extern FRESULT fatfs_lseek (FIL* fp, DWORD ofs);
extern FRESULT fatfs_sync (FIL* fp);
extern int fatfs_tell (FIL* fp);
extern int fatfs_error (FIL* fp);
extern FRESULT fatfs_opendir (DIR* dp, const TCHAR* path);
extern FRESULT fatfs_readdir (DIR* dp, FILINFO* fno);
extern FRESULT fatfs_stat (const TCHAR* path, FILINFO* fno);
extern FRESULT fatfs_unlink (const TCHAR* path);
extern FRESULT fatfs_mount (FATFS* fs, const TCHAR* path, BYTE opt);
extern FRESULT fatfs_getfree (const TCHAR* path, DWORD* nclst, FATFS** fatfs);
