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 
9 #pragma once
10 
22 #include "board.h"
23 #include "modules.h"
24 #if IS_USED(MODULE_VFS) || DOXYGEN
25 #include "vfs.h"
26 #else
27 /* don't try to create auto-mounts if there is no VFS module */
28 #define VFS_AUTO_MOUNT(type, mtd, path, idx)
29 #endif
30 
31 #if IS_USED(MODULE_FATFS_VFS)
32 #include "fs/fatfs.h"
33 #endif
34 #if IS_USED(MODULE_LITTLEFS)
35 #include "fs/littlefs_fs.h"
36 #endif
37 #if IS_USED(MODULE_LITTLEFS2)
38 #include "fs/littlefs2_fs.h"
39 #endif
40 #if IS_USED(MODULE_SPIFFS)
41 #include "fs/spiffs_fs.h"
42 #endif
43 #if IS_USED(MODULE_LWEXT4)
44 #include "fs/lwext4_fs.h"
45 #endif
46 #if IS_USED(MODULE_XIPFS)
47 #include "fs/xipfs_fs.h"
48 #endif
49 #if IS_USED(MODULE_FS_NATIVE)
50 #include "fs/native_fs.h"
51 #endif
52 
53 #ifdef __cplusplus
54 extern "C" {
55 #endif
56 
60 #ifndef VFS_DEFAULT_SD
61 #define VFS_DEFAULT_SD(n) "/sd" # n
62 #endif
63 
67 #ifndef VFS_DEFAULT_NVM
68 #define VFS_DEFAULT_NVM(n) "/nvm" # n
69 #endif
70 
75 #ifndef VFS_DEFAULT_DATA
76 #if IS_USED(MODULE_MTD_MCI) || IS_USED(MODULE_MTD_SDCARD) || \
77  IS_USED(MODULE_SAM0_SDHC) || IS_USED(MODULE_MTD_SDMMC)
78 #define VFS_DEFAULT_DATA VFS_DEFAULT_SD(0)
79 #else
80 #define VFS_DEFAULT_DATA VFS_DEFAULT_NVM(0)
81 #endif
82 #endif
83 
84 #ifdef __cplusplus
85 }
86 #endif
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.
xipfs integration with vfs