XFusion API
v1.3.0
载入中...
搜索中...
未找到
xf_vfs_private.h
浏览该文件的文档.
1
9
/*
10
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
11
*
12
* SPDX-License-Identifier: Apache-2.0
13
*/
14
27
#ifndef __XF_VFS_PRIVATE_H__
28
#define __XF_VFS_PRIVATE_H__
29
30
/* ==================== [Includes] ========================================== */
31
32
#include "
xf_vfs_types.h
"
33
34
#ifdef __cplusplus
35
extern
"C"
{
36
#endif
37
45
/* ==================== [Defines] =========================================== */
46
47
/* ==================== [Typedefs] ========================================== */
48
49
typedef
struct
_xf_vfs_entry_t
{
50
int
flags
;
51
const
xf_vfs_fs_ops_t
*
vfs
;
// contains pointers to VFS functions
52
char
path_prefix
[
XF_VFS_PATH_MAX
];
// path prefix mapped to this VFS
53
size_t
path_prefix_len
;
// micro-optimization to avoid doing extra strlen
54
void
*
ctx
;
// optional pointer which can be passed to VFS
55
int
offset
;
// index of this structure in s_vfs array
56
}
xf_vfs_entry_t
;
57
84
xf_err_t
xf_vfs_register_common
(
const
char
*base_path,
size_t
len,
const
xf_vfs_t
*vfs,
void
*
ctx
,
int
*vfs_index);
85
93
const
xf_vfs_entry_t
*
xf_vfs_get_vfs_for_path
(
const
char
*path);
94
102
const
xf_vfs_entry_t
*
xf_vfs_get_vfs_for_index
(
int
index);
103
104
/* ==================== [Global Prototypes] ================================= */
105
106
/* ==================== [Macros] ============================================ */
107
113
#ifdef __cplusplus
114
}
/* extern "C" */
115
#endif
116
117
#endif
/* __XF_VFS_PRIVATE_H__ */
xf_err_t
int32_t xf_err_t
整形错误类型。 错误码具体值见 xf_err_code_t.
Definition
xf_err.h:69
_xf_vfs_entry_t
Definition
xf_vfs_private.h:49
_xf_vfs_entry_t::ctx
void * ctx
Definition
xf_vfs_private.h:54
_xf_vfs_entry_t::vfs
const xf_vfs_fs_ops_t * vfs
Definition
xf_vfs_private.h:51
_xf_vfs_entry_t::flags
int flags
Definition
xf_vfs_private.h:50
_xf_vfs_entry_t::path_prefix_len
size_t path_prefix_len
Definition
xf_vfs_private.h:53
_xf_vfs_entry_t::path_prefix
char path_prefix[XF_VFS_PATH_MAX]
Definition
xf_vfs_private.h:52
_xf_vfs_entry_t::offset
int offset
Definition
xf_vfs_private.h:55
xf_vfs_fs_ops_t
Main struct of the minified vfs API, containing basic function pointers as well as pointers to the ot...
Definition
xf_vfs_ops.h:188
xf_vfs_t
VFS definition structure
Definition
xf_vfs_types.h:125
ctx
static ex_scan_ctx_t ctx
Definition
xf_main.c:69
XF_VFS_PATH_MAX
#define XF_VFS_PATH_MAX
Definition
xf_vfs_config_internal.h:70
xf_vfs_get_vfs_for_index
const xf_vfs_entry_t * xf_vfs_get_vfs_for_index(int index)
Definition
xf_vfs.c:405
xf_vfs_register_common
xf_err_t xf_vfs_register_common(const char *base_path, size_t len, const xf_vfs_t *vfs, void *ctx, int *vfs_index)
Definition
xf_vfs.c:146
xf_vfs_entry_t
struct _xf_vfs_entry_t xf_vfs_entry_t
xf_vfs_get_vfs_for_path
const xf_vfs_entry_t * xf_vfs_get_vfs_for_path(const char *path)
Definition
xf_vfs.c:414
xf_vfs_types.h
components
xf_vfs
xf_vfs
src
xf_vfs_private.h
生成于 2025年 一月 21日 星期二 17:25:09 , 为 XFusion API使用
1.9.8