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
|
|
|
*/
|
|
|
|
|
2018-09-15 01:43:44 +08:00
|
|
|
#ifndef ZEPHYR_INCLUDE_FS_FS_INTERFACE_H_
|
|
|
|
#define ZEPHYR_INCLUDE_FS_FS_INTERFACE_H_
|
2016-07-23 08:48:59 +08:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2018-02-22 16:02:57 +08:00
|
|
|
#ifdef CONFIG_FILE_SYSTEM_NFFS
|
|
|
|
#define MAX_FILE_NAME 256
|
|
|
|
#else /* FAT_FS */
|
|
|
|
#define MAX_FILE_NAME 12 /* Uses 8.3 SFN */
|
|
|
|
#endif
|
2016-07-23 08:48:59 +08:00
|
|
|
|
2018-02-22 16:02:57 +08:00
|
|
|
struct fs_mount_t;
|
2016-07-23 08:48:59 +08:00
|
|
|
|
2018-02-22 16:02:57 +08:00
|
|
|
/**
|
|
|
|
* @brief File object representing an open file
|
2016-07-23 08:48:59 +08:00
|
|
|
*
|
2018-04-17 00:44:48 +08:00
|
|
|
* @param Pointer to FATFS file object structure
|
2018-02-22 16:02:57 +08:00
|
|
|
* @param mp Pointer to mount point structure
|
2016-07-23 08:48:59 +08:00
|
|
|
*/
|
2018-02-22 16:02:57 +08:00
|
|
|
struct fs_file_t {
|
2018-04-17 00:44:48 +08:00
|
|
|
void *filep;
|
2018-02-22 16:02:57 +08:00
|
|
|
const struct fs_mount_t *mp;
|
|
|
|
};
|
2016-07-23 08:48:59 +08:00
|
|
|
|
2018-02-22 16:02:57 +08:00
|
|
|
/**
|
|
|
|
* @brief Directory object representing an open directory
|
|
|
|
*
|
2018-04-17 00:44:48 +08:00
|
|
|
* @param dirp Pointer to directory object structure
|
2018-02-22 16:02:57 +08:00
|
|
|
* @param mp Pointer to mount point structure
|
|
|
|
*/
|
|
|
|
struct fs_dir_t {
|
2018-04-17 00:44:48 +08:00
|
|
|
void *dirp;
|
2018-02-22 16:02:57 +08:00
|
|
|
const struct fs_mount_t *mp;
|
|
|
|
};
|
2016-07-23 08:48:59 +08:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2018-09-15 01:43:44 +08:00
|
|
|
#endif /* ZEPHYR_INCLUDE_FS_FS_INTERFACE_H_ */
|