Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Ardupilot
GitHub Repository: Ardupilot/ardupilot
Path: blob/master/libraries/AP_Filesystem/AP_Filesystem_config.h
9572 views
1
#pragma once
2
3
#include <AP_HAL/AP_HAL_Boards.h>
4
5
// used by LittleFS
6
#define AP_FILESYSTEM_FLASH_JEDEC_NOR 1
7
#define AP_FILESYSTEM_FLASH_W25NXX 2
8
9
// backends:
10
11
#ifndef AP_FILESYSTEM_ESP32_ENABLED
12
#define AP_FILESYSTEM_ESP32_ENABLED (CONFIG_HAL_BOARD == HAL_BOARD_ESP32)
13
#endif
14
15
#ifndef AP_FILESYSTEM_FATFS_ENABLED
16
#define AP_FILESYSTEM_FATFS_ENABLED HAL_OS_FATFS_IO
17
#endif
18
19
#ifndef AP_FILESYSTEM_LITTLEFS_ENABLED
20
#define AP_FILESYSTEM_LITTLEFS_ENABLED HAL_OS_LITTLEFS_IO
21
#endif
22
23
#ifndef AP_FILESYSTEM_LITTLEFS_FLASH_TYPE
24
#define AP_FILESYSTEM_LITTLEFS_FLASH_TYPE AP_FILESYSTEM_FLASH_JEDEC_NOR
25
#endif
26
27
#ifndef AP_FILESYSTEM_PARAM_ENABLED
28
#define AP_FILESYSTEM_PARAM_ENABLED 1
29
#endif
30
31
#ifndef AP_FILESYSTEM_POSIX_ENABLED
32
#define AP_FILESYSTEM_POSIX_ENABLED (CONFIG_HAL_BOARD == HAL_BOARD_SITL || CONFIG_HAL_BOARD == HAL_BOARD_LINUX || CONFIG_HAL_BOARD == HAL_BOARD_QURT)
33
#endif
34
35
#ifndef AP_FILESYSTEM_ROMFS_ENABLED
36
#define AP_FILESYSTEM_ROMFS_ENABLED defined(HAL_HAVE_AP_ROMFS_EMBEDDED_H)
37
#endif
38
39
#ifndef AP_FILESYSTEM_SYS_ENABLED
40
#define AP_FILESYSTEM_SYS_ENABLED 1
41
#endif
42
43
#ifndef AP_FILESYSTEM_POSIX_MAP_FILENAME_ALLOC
44
// this requires AP_FILESYSTEM_POSIX_MAP_FILENAME_BASEDIR
45
#define AP_FILESYSTEM_POSIX_MAP_FILENAME_ALLOC 0
46
#endif
47
48
// AP_FILESYSTEM_FILE_WRITING_ENABLED is true if you could expect to
49
// be able to open and write a non-virtual file. Notably this
50
// excludes virtual files like SYSFS, and the magic param/mission
51
// upload targets, and also excludes ROMFS (where you can read but not
52
// write!)
53
#ifndef AP_FILESYSTEM_FILE_WRITING_ENABLED
54
#define AP_FILESYSTEM_FILE_WRITING_ENABLED (AP_FILESYSTEM_ESP32_ENABLED || AP_FILESYSTEM_FATFS_ENABLED || AP_FILESYSTEM_LITTLEFS_ENABLED || AP_FILESYSTEM_POSIX_ENABLED)
55
#endif
56
57
// AP_FILESYSTEM_FILE_READING_ENABLED is true if you could expect to
58
// be able to open and read a non-virtual file. Notably this excludes
59
// virtual files like SYSFS, and the magic param/mission upload targets.
60
#ifndef AP_FILESYSTEM_FILE_READING_ENABLED
61
#define AP_FILESYSTEM_FILE_READING_ENABLED (AP_FILESYSTEM_FILE_WRITING_ENABLED || AP_FILESYSTEM_ROMFS_ENABLED || AP_FILESYSTEM_SYS_ENABLED || AP_FILESYSTEM_PARAM_ENABLED)
62
#endif
63
64
#ifndef AP_FILESYSTEM_SYS_FLASH_ENABLED
65
#define AP_FILESYSTEM_SYS_FLASH_ENABLED CONFIG_HAL_BOARD == HAL_BOARD_CHIBIOS
66
#endif
67
68
#ifndef AP_FILESYSTEM_HAVE_DIRENT_DTYPE
69
#define AP_FILESYSTEM_HAVE_DIRENT_DTYPE 1
70
#endif
71
72
#ifndef AP_FILESYSTEM_MISSION_ENABLED
73
#include <AP_Mission/AP_Mission_config.h>
74
#define AP_FILESYSTEM_MISSION_ENABLED AP_MISSION_ENABLED
75
#endif
76
77
#ifndef AP_FATFS_MAX_IO_SIZE
78
#define AP_FATFS_MAX_IO_SIZE 4096
79
#endif
80
81
#ifndef AP_FATFS_MIN_IO_SIZE
82
#define AP_FATFS_MIN_IO_SIZE 4096
83
#endif
84
85