2022-08-14 19:14:57 -03:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <AP_HAL/AP_HAL_Boards.h>
|
|
|
|
|
|
|
|
#include <AP_Mission/AP_Mission_config.h>
|
|
|
|
|
2023-05-14 22:44:22 -03:00
|
|
|
// backends:
|
|
|
|
|
|
|
|
#ifndef AP_FILESYSTEM_ESP32_ENABLED
|
|
|
|
#define AP_FILESYSTEM_ESP32_ENABLED (CONFIG_HAL_BOARD == HAL_BOARD_ESP32)
|
2022-09-14 07:06:39 -03:00
|
|
|
#endif
|
|
|
|
|
2023-05-14 22:44:22 -03:00
|
|
|
#ifndef AP_FILESYSTEM_FATFS_ENABLED
|
|
|
|
#define AP_FILESYSTEM_FATFS_ENABLED HAL_OS_FATFS_IO
|
2022-08-14 19:14:57 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef AP_FILESYSTEM_MISSION_ENABLED
|
|
|
|
#define AP_FILESYSTEM_MISSION_ENABLED AP_MISSION_ENABLED
|
|
|
|
#endif
|
|
|
|
|
2023-05-14 22:44:22 -03:00
|
|
|
#ifndef AP_FILESYSTEM_PARAM_ENABLED
|
|
|
|
#define AP_FILESYSTEM_PARAM_ENABLED 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef AP_FILESYSTEM_POSIX_ENABLED
|
|
|
|
#define AP_FILESYSTEM_POSIX_ENABLED (CONFIG_HAL_BOARD == HAL_BOARD_SITL || CONFIG_HAL_BOARD == HAL_BOARD_LINUX)
|
2022-08-14 19:14:57 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef AP_FILESYSTEM_ROMFS_ENABLED
|
|
|
|
#define AP_FILESYSTEM_ROMFS_ENABLED defined(HAL_HAVE_AP_ROMFS_EMBEDDED_H)
|
|
|
|
#endif
|
2023-05-14 22:44:22 -03:00
|
|
|
|
|
|
|
#ifndef AP_FILESYSTEM_SYS_ENABLED
|
|
|
|
#define AP_FILESYSTEM_SYS_ENABLED 1
|
|
|
|
#endif
|
|
|
|
|
2024-03-10 14:41:53 -03:00
|
|
|
// AP_FILESYSTEM_FILE_WRITING_ENABLED is true if you could expect to
|
2023-05-14 22:44:22 -03:00
|
|
|
// be able to open and write a non-virtual file. Notably this
|
|
|
|
// excludes virtual files like SYSFS, and the magic param/mission
|
|
|
|
// upload targets, and also excludes ROMFS (where you can read but not
|
|
|
|
// write!)
|
|
|
|
#ifndef AP_FILESYSTEM_FILE_WRITING_ENABLED
|
|
|
|
#define AP_FILESYSTEM_FILE_WRITING_ENABLED (AP_FILESYSTEM_ESP32_ENABLED || AP_FILESYSTEM_FATFS_ENABLED || AP_FILESYSTEM_POSIX_ENABLED)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// AP_FILESYSTEM_FILE_READING_ENABLED is true if you could expect to
|
|
|
|
// be able to open and read a non-virtual file. Notably this excludes
|
|
|
|
// virtual files like SYSFS, and the magic param/mission upload targets.
|
|
|
|
#ifndef AP_FILESYSTEM_FILE_READING_ENABLED
|
|
|
|
#define AP_FILESYSTEM_FILE_READING_ENABLED (AP_FILESYSTEM_FILE_WRITING_ENABLED || AP_FILESYSTEM_ROMFS_ENABLED)
|
|
|
|
#endif
|
|
|
|
|
2023-12-04 02:18:47 -04:00
|
|
|
#ifndef AP_FILESYSTEM_SYS_FLASH_ENABLED
|
|
|
|
#define AP_FILESYSTEM_SYS_FLASH_ENABLED CONFIG_HAL_BOARD == HAL_BOARD_CHIBIOS
|
|
|
|
#endif
|
2024-07-09 22:58:42 -03:00
|
|
|
|
|
|
|
#ifndef AP_FILESYSTEM_HAVE_DIRENT_DTYPE
|
|
|
|
#define AP_FILESYSTEM_HAVE_DIRENT_DTYPE 1
|
|
|
|
#endif
|