vfs_default.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2022 ML!PA Consulting GmbH
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
19 #include "board.h"
20 #include "modules.h"
21 #if IS_USED(MODULE_VFS) || DOXYGEN
22 #include "vfs.h"
23 #else
24 /* don't try to create auto-mounts if there is no VFS module */
25 #define VFS_AUTO_MOUNT(type, mtd, path, idx)
26 #endif
27 
28 #if IS_USED(MODULE_FATFS_VFS)
29 #include "fs/fatfs.h"
30 #endif
31 #if IS_USED(MODULE_LITTLEFS)
32 #include "fs/littlefs_fs.h"
33 #endif
34 #if IS_USED(MODULE_LITTLEFS2)
35 #include "fs/littlefs2_fs.h"
36 #endif
37 #if IS_USED(MODULE_SPIFFS)
38 #include "fs/spiffs_fs.h"
39 #endif
40 #if IS_USED(MODULE_LWEXT4)
41 #include "fs/lwext4_fs.h"
42 #endif
43 #if IS_USED(MODULE_XIPFS)
44 #include "fs/xipfs_fs.h"
45 #endif
46 #if IS_USED(MODULE_FS_NATIVE)
47 #include "fs/native_fs.h"
48 #endif
49 
50 #ifdef __cplusplus
51 extern "C" {
52 #endif
53 
57 #ifndef VFS_DEFAULT_SD
58 #define VFS_DEFAULT_SD(n) "/sd" # n
59 #endif
60 
64 #ifndef VFS_DEFAULT_NVM
65 #define VFS_DEFAULT_NVM(n) "/nvm" # n
66 #endif
67 
72 #ifndef VFS_DEFAULT_DATA
73 #if IS_USED(MODULE_MTD_MCI) || IS_USED(MODULE_MTD_SDCARD) || \
74  IS_USED(MODULE_SAM0_SDHC) || IS_USED(MODULE_MTD_SDMMC)
75 #define VFS_DEFAULT_DATA VFS_DEFAULT_SD(0)
76 #else
77 #define VFS_DEFAULT_DATA VFS_DEFAULT_NVM(0)
78 #endif
79 #endif
80 
81 #ifdef __cplusplus
82 }
83 #endif
84 
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.
xipfs integration with vfs