CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
Ardupilot

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

GitHub Repository: Ardupilot/ardupilot
Path: blob/master/libraries/AP_Filesystem/AP_Filesystem_config.h
Views: 1798
1
#pragma once
2
3
#include <AP_HAL/AP_HAL_Boards.h>
4
5
// backends:
6
7
#ifndef AP_FILESYSTEM_ESP32_ENABLED
8
#define AP_FILESYSTEM_ESP32_ENABLED (CONFIG_HAL_BOARD == HAL_BOARD_ESP32)
9
#endif
10
11
#ifndef AP_FILESYSTEM_FATFS_ENABLED
12
#define AP_FILESYSTEM_FATFS_ENABLED HAL_OS_FATFS_IO
13
#endif
14
15
#ifndef AP_FILESYSTEM_PARAM_ENABLED
16
#define AP_FILESYSTEM_PARAM_ENABLED 1
17
#endif
18
19
#ifndef AP_FILESYSTEM_POSIX_ENABLED
20
#define AP_FILESYSTEM_POSIX_ENABLED (CONFIG_HAL_BOARD == HAL_BOARD_SITL || CONFIG_HAL_BOARD == HAL_BOARD_LINUX || CONFIG_HAL_BOARD == HAL_BOARD_QURT)
21
#endif
22
23
#ifndef AP_FILESYSTEM_ROMFS_ENABLED
24
#define AP_FILESYSTEM_ROMFS_ENABLED defined(HAL_HAVE_AP_ROMFS_EMBEDDED_H)
25
#endif
26
27
#ifndef AP_FILESYSTEM_SYS_ENABLED
28
#define AP_FILESYSTEM_SYS_ENABLED 1
29
#endif
30
31
#ifndef AP_FILESYSTEM_POSIX_MAP_FILENAME_ALLOC
32
// this requires AP_FILESYSTEM_POSIX_MAP_FILENAME_BASEDIR
33
#define AP_FILESYSTEM_POSIX_MAP_FILENAME_ALLOC 0
34
#endif
35
36
// AP_FILESYSTEM_FILE_WRITING_ENABLED is true if you could expect to
37
// be able to open and write a non-virtual file. Notably this
38
// excludes virtual files like SYSFS, and the magic param/mission
39
// upload targets, and also excludes ROMFS (where you can read but not
40
// write!)
41
#ifndef AP_FILESYSTEM_FILE_WRITING_ENABLED
42
#define AP_FILESYSTEM_FILE_WRITING_ENABLED (AP_FILESYSTEM_ESP32_ENABLED || AP_FILESYSTEM_FATFS_ENABLED || AP_FILESYSTEM_POSIX_ENABLED)
43
#endif
44
45
// AP_FILESYSTEM_FILE_READING_ENABLED is true if you could expect to
46
// be able to open and read a non-virtual file. Notably this excludes
47
// virtual files like SYSFS, and the magic param/mission upload targets.
48
#ifndef AP_FILESYSTEM_FILE_READING_ENABLED
49
#define AP_FILESYSTEM_FILE_READING_ENABLED (AP_FILESYSTEM_FILE_WRITING_ENABLED || AP_FILESYSTEM_ROMFS_ENABLED || AP_FILESYSTEM_SYS_ENABLED || AP_FILESYSTEM_PARAM_ENABLED)
50
#endif
51
52
#ifndef AP_FILESYSTEM_SYS_FLASH_ENABLED
53
#define AP_FILESYSTEM_SYS_FLASH_ENABLED CONFIG_HAL_BOARD == HAL_BOARD_CHIBIOS
54
#endif
55
56
#ifndef AP_FILESYSTEM_HAVE_DIRENT_DTYPE
57
#define AP_FILESYSTEM_HAVE_DIRENT_DTYPE 1
58
#endif
59
60
#ifndef AP_FILESYSTEM_MISSION_ENABLED
61
#include <AP_Mission/AP_Mission_config.h>
62
#define AP_FILESYSTEM_MISSION_ENABLED AP_MISSION_ENABLED
63
#endif
64
65