106 lines
2.8 KiB
C
106 lines
2.8 KiB
C
//
|
|
// Created by cfif on 27.12.22.
|
|
//
|
|
|
|
#ifndef GONEC_GSM_FS_INTERFACE_H
|
|
#define GONEC_GSM_FS_INTERFACE_H
|
|
|
|
#include "cmsis_os.h"
|
|
#include "ff.h"
|
|
|
|
extern const char dir_temp[];
|
|
extern const char dir_web[];
|
|
|
|
|
|
typedef struct {
|
|
FATFS fs;
|
|
} tFs;
|
|
|
|
|
|
FRESULT f_readdir_i (
|
|
tFs* fs,
|
|
DIR* dp, /* Pointer to the open directory object */
|
|
FILINFO* fno /* Pointer to file information to return */
|
|
);
|
|
|
|
FRESULT f_opendir_i (
|
|
tFs* fs,
|
|
DIR* dp, /* Pointer to directory object to create */
|
|
const TCHAR* path /* Pointer to the directory path */
|
|
);
|
|
|
|
FRESULT f_open_i (
|
|
tFs* fs,
|
|
FIL* fp, /* Pointer to the blank file object */
|
|
const TCHAR* path, /* Pointer to the file name */
|
|
BYTE mode /* Access mode and open mode flags */
|
|
);
|
|
|
|
FRESULT f_write_i (
|
|
tFs* fs,
|
|
FIL* fp, /* Open file to be written */
|
|
const void* buff, /* Data to be written */
|
|
UINT btw, /* Number of bytes to write */
|
|
UINT* bw /* Number of bytes written */
|
|
);
|
|
|
|
|
|
FRESULT f_read_i (
|
|
tFs* fs,
|
|
FIL* fp, /* Open file to be read */
|
|
void* buff, /* Data buffer to store the read data */
|
|
UINT btr, /* Number of bytes to read */
|
|
UINT* br /* Number of bytes read */
|
|
);
|
|
|
|
FRESULT f_close_i (
|
|
tFs* fs,
|
|
FIL* fp /* Open file to be closed */
|
|
);
|
|
|
|
FRESULT f_unlink_i (
|
|
tFs* fs,
|
|
const TCHAR* path /* Pointer to the file or directory path */
|
|
);
|
|
|
|
FRESULT f_rename_i (
|
|
tFs* fs,
|
|
const TCHAR* path_old, /* Pointer to the object name to be renamed */
|
|
const TCHAR* path_new /* Pointer to the new name */
|
|
);
|
|
|
|
FRESULT f_findfirst_i (
|
|
tFs* fs,
|
|
DIR* dp, /* Pointer to the blank directory object */
|
|
FILINFO* fno, /* Pointer to the file information structure */
|
|
const TCHAR* path, /* Pointer to the directory to open */
|
|
const TCHAR* pattern /* Pointer to the matching pattern */
|
|
);
|
|
|
|
FRESULT f_findnext_i (
|
|
tFs* fs,
|
|
DIR* dp, /* Pointer to the open directory object */
|
|
FILINFO* fno /* Pointer to the file information structure */
|
|
);
|
|
|
|
/*-----------------------------------------------------------------------*/
|
|
/* Seek File Read/Write Pointer */
|
|
/*-----------------------------------------------------------------------*/
|
|
|
|
FRESULT f_lseek_i (
|
|
tFs* fs,
|
|
FIL* fp, /* Pointer to the file object */
|
|
FSIZE_t ofs /* File pointer from top of file */
|
|
);
|
|
|
|
/*-----------------------------------------------------------------------*/
|
|
/* Close Directory */
|
|
/*-----------------------------------------------------------------------*/
|
|
|
|
FRESULT f_closedir_i (
|
|
tFs* fs,
|
|
DIR *dp /* Pointer to the directory object to be closed */
|
|
);
|
|
|
|
#endif //GONEC_GSM_FS_INTERFACE_H
|