23#ifndef __VSF_FS_CFG_H__
24#define __VSF_FS_CFG_H__
26#if VSF_USE_FS == ENABLED
31# define VSF_FS_ASSERT VSF_ASSERT
34#if VSF_FS_USE_FATFS == ENABLED
35# if VSF_FS_USE_MALFS != ENABLED
36# undef VSF_FS_USE_MALFS
37# define VSF_FS_USE_MALFS ENABLED
41#if VSF_FS_CFG_CACHE == ENABLED
42# warning cache is not supported now, disable VSF_FS_CFG_CACHE
43# undef VSF_FS_CFG_CACHE
44# define VSF_FS_CFG_CACHE DISABLED
47#ifndef VSF_FS_CFG_LOCK
48# define VSF_FS_CFG_LOCK ENABLED
51#ifndef VSF_FS_CFG_TIME
52# define VSF_FS_CFG_TIME ENABLED
55#ifndef VSF_FS_CFG_VFS_FILE_HAS_OP
56# define VSF_FS_CFG_VFS_FILE_HAS_OP ENABLED
61#if (defined(VSF_FS_CFG_FILE_POOL_SIZE) && !defined(VSF_FS_CFG_FILE_POOL_FILE_SIZE))\
62 || (!defined(VSF_FS_CFG_FILE_POOL_SIZE) && defined(VSF_FS_CFG_FILE_POOL_FILE_SIZE))
63# warning both VSF_FS_CFG_FILE_POOL_SIZE and VSF_FS_CFG_FILE_POOL_FILE_SIZE MUST\
64 be defined to enable file pool.
66#if defined(VSF_FS_CFG_FILE_POOL_SIZE) && defined(VSF_FS_CFG_FILE_POOL_FILE_SIZE)
67# define VSF_FS_CFG_FILE_POOL ENABLED
69#if VSF_FS_CFG_FILE_POOL == ENABLED && VSF_USE_POOL != ENABLED
70# error please enable VSF_USE_POOL to use file_pool
73#if VSF_FS_CFG_FILE_POOL != ENABLED
75#if defined(VSF_FS_CFG_MALLOC) && !defined(VSF_FS_CFG_FREE)
76# error VSF_FS_CFG_FREE must be defined
78#if !defined(VSF_FS_CFG_MALLOC) && defined(VSF_FS_CFG_FREE)
79# error VSF_FS_CFG_MALLOC must be defined
82#undef __VSF_FS_WARN_HEAP
83#ifndef VSF_FS_CFG_MALLOC
84# if VSF_USE_HEAP != ENABLED
85# define VSF_FS_CFG_MALLOC(...) ((vk_file_t *)NULL)
86# define VSF_FS_CFG_FREE(...)
87# define __VSF_FS_WARN_HEAP
89# define VSF_FS_CFG_MALLOC vsf_heap_malloc
90# define VSF_FS_CFG_FREE vsf_heap_free
vk_file_attr_t
Definition vsf_fs_cfg.h:99
@ VSF_FILE_ATTR_WRITE
Definition vsf_fs_cfg.h:101
@ VSF_FILE_ATTR_READ
Definition vsf_fs_cfg.h:100
@ VSF_FILE_ATTR_HIDDEN
Definition vsf_fs_cfg.h:103
@ VSF_FILE_ATTR_EXT
Definition vsf_fs_cfg.h:108
@ VSF_FILE_ATTR_DIRECTORY
Definition vsf_fs_cfg.h:104
@ VSF_FILE_ATTR_USER
Definition vsf_fs_cfg.h:109
@ __VSF_FILE_ATTR_DYN
Definition vsf_fs_cfg.h:107
@ VSF_FILE_ATTR_MAX
Definition vsf_fs_cfg.h:111
@ VSF_FILE_ATTR_LNK
Definition vsf_fs_cfg.h:105
@ VSF_FILE_ATTR_EXECUTE
Definition vsf_fs_cfg.h:102
vk_file_whence_t
Definition vsf_fs_cfg.h:114
@ VSF_FILE_SEEK_CUR
Definition vsf_fs_cfg.h:116
@ VSF_FILE_SEEK_END
Definition vsf_fs_cfg.h:117
@ VSF_FILE_SEEK_SET
Definition vsf_fs_cfg.h:115