2016-07-23 08:48:59 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2016 Intel Corporation.
|
|
|
|
*
|
2017-01-19 09:01:01 +08:00
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
2016-07-23 08:48:59 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _FS_INTERFACE_H_
|
|
|
|
#define _FS_INTERFACE_H_
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @brief Macro to define _zfile_object structure
|
|
|
|
*
|
|
|
|
* This structure contains information about the open files. This
|
|
|
|
* structure will be passed to the api functions as an opaque
|
|
|
|
* pointer.
|
|
|
|
*
|
|
|
|
* @param _file_object File structure used by underlying file system
|
|
|
|
*/
|
|
|
|
|
2016-10-30 14:57:35 +08:00
|
|
|
#define FS_FILE_DEFINE(_file_object) \
|
|
|
|
struct _fs_file_object { \
|
2016-07-23 08:48:59 +08:00
|
|
|
_file_object; \
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @brief Macro to define _zdir_object structure
|
|
|
|
*
|
|
|
|
* This structure contains information about the open directories. This
|
|
|
|
* structure will be passed to the directory api functions as an opaque
|
|
|
|
* pointer.
|
|
|
|
*
|
|
|
|
* @param _dir_object Directory structure used by underlying file system
|
|
|
|
*/
|
|
|
|
|
2016-10-30 14:57:35 +08:00
|
|
|
#define FS_DIR_DEFINE(_dir_object) \
|
|
|
|
struct _fs_dir_object { \
|
2016-07-23 08:48:59 +08:00
|
|
|
_dir_object; \
|
|
|
|
}
|
|
|
|
|
2017-09-30 20:49:22 +08:00
|
|
|
#ifdef CONFIG_FAT_FILESYSTEM_ELM
|
2016-07-23 08:48:59 +08:00
|
|
|
#include <fs/fat_fs.h>
|
2017-08-08 21:12:55 +08:00
|
|
|
#elif CONFIG_FILE_SYSTEM_NFFS
|
|
|
|
#include <fs/nffs_fs.h>
|
2016-07-23 08:48:59 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* _FS_INTERFACE_H_ */
|