2019-08-01 02:07:26 -03:00
|
|
|
/*
|
|
|
|
FATFS backend for AP_Filesystem
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/stat.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include <errno.h>
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <ff.h>
|
|
|
|
|
|
|
|
// Seek offset macros
|
|
|
|
#define SEEK_SET 0
|
|
|
|
#define SEEK_CUR 1
|
|
|
|
#define SEEK_END 2
|
|
|
|
|
|
|
|
#if FF_USE_LFN != 0
|
|
|
|
#define MAX_NAME_LEN FF_MAX_LFN
|
|
|
|
#else
|
|
|
|
#define MAX_NAME_LEN 13
|
|
|
|
#endif
|
|
|
|
|
2019-09-26 00:41:43 -03:00
|
|
|
#define DT_REG 0
|
|
|
|
#define DT_DIR 1
|
|
|
|
|
2019-08-01 02:07:26 -03:00
|
|
|
struct dirent {
|
|
|
|
char d_name[MAX_NAME_LEN]; /* filename */
|
2019-09-26 00:41:43 -03:00
|
|
|
uint8_t d_type;
|
2019-08-01 02:07:26 -03:00
|
|
|
};
|