vfs_default.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2022 ML!PA Consulting GmbH
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
20 #ifndef VFS_DEFAULT_H
21 #define VFS_DEFAULT_H
22 
23 #include "board.h"
24 #include "modules.h"
25 #if IS_USED(MODULE_VFS) || DOXYGEN
26 #include "vfs.h"
27 #else
28 /* don't try to create auto-mounts if there is no VFS module */
29 #define VFS_AUTO_MOUNT(type, mtd, path, idx)
30 #endif
31 
32 #if IS_USED(MODULE_FATFS_VFS)
33 #include "fs/fatfs.h"
34 #endif
35 #if IS_USED(MODULE_LITTLEFS)
36 #include "fs/littlefs_fs.h"
37 #endif
38 #if IS_USED(MODULE_LITTLEFS2)
39 #include "fs/littlefs2_fs.h"
40 #endif
41 #if IS_USED(MODULE_SPIFFS)
42 #include "fs/spiffs_fs.h"
43 #endif
44 #if IS_USED(MODULE_LWEXT4)
45 #include "fs/lwext4_fs.h"
46 #endif
47 #if IS_USED(MODULE_FS_NATIVE)
48 #include "fs/native_fs.h"
49 #endif
50 
51 #ifdef __cplusplus
52 extern "C" {
53 #endif
54 
58 #ifndef VFS_DEFAULT_SD
59 #define VFS_DEFAULT_SD(n) "/sd" # n
60 #endif
61 
65 #ifndef VFS_DEFAULT_NVM
66 #define VFS_DEFAULT_NVM(n) "/nvm" # n
67 #endif
68 
73 #ifndef VFS_DEFAULT_DATA
74 #if IS_USED(MODULE_MTD_MCI) || IS_USED(MODULE_MTD_SDCARD) || \
75  IS_USED(MODULE_SAM0_SDHC) || IS_USED(MODULE_MTD_SDMMC)
76 #define VFS_DEFAULT_DATA VFS_DEFAULT_SD(0)
77 #else
78 #define VFS_DEFAULT_DATA VFS_DEFAULT_NVM(0)
79 #endif
80 #endif
81 
82 #ifdef __cplusplus
83 }
84 #endif
85 
86 #endif /* VFS_DEFAULT_H */
87 
FatFs integration for vfs.
littlefs v2 integration with vfs
littlefs integration with vfs
lwext4 integration with vfs
Common macros and compiler attributes/pragmas configuration.
Native integration with virtual filesystem (VFS)
SPIFFS integration with vfs.
VFS layer API declarations.