From 74b3bb0af36492715e9c3493aecf1d5fd415494f Mon Sep 17 00:00:00 2001 From: YJIE_1998 <1039241323@qq.com> Date: Wed, 4 Aug 2021 19:21:45 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=B7=BB=E5=8A=A0=E3=80=91=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0dfs=5Fromfs.h=E6=96=87=E4=BB=B6=EF=BC=8C=E5=B9=B6?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9E=84=E5=BB=BA=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../stm32f407-atk-explorer/board/SConscript | 1 + .../board/ports/dfs_romfs.h | 31 +++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 bsp/stm32/stm32f407-atk-explorer/board/ports/dfs_romfs.h diff --git a/bsp/stm32/stm32f407-atk-explorer/board/SConscript b/bsp/stm32/stm32f407-atk-explorer/board/SConscript index 64b8ab3f41..4212e953bf 100644 --- a/bsp/stm32/stm32f407-atk-explorer/board/SConscript +++ b/bsp/stm32/stm32f407-atk-explorer/board/SConscript @@ -20,6 +20,7 @@ if GetDepend(['BSP_USING_SPI_FLASH']): if GetDepend(['BSP_USING_FS']): src += Glob('ports/drv_filesystem.c') + src += Glob('ports/dfs_romfs.h') if GetDepend(['BSP_USING_SRAM']): src += Glob('ports/drv_sram.c') diff --git a/bsp/stm32/stm32f407-atk-explorer/board/ports/dfs_romfs.h b/bsp/stm32/stm32f407-atk-explorer/board/ports/dfs_romfs.h new file mode 100644 index 0000000000..affa4bf993 --- /dev/null +++ b/bsp/stm32/stm32f407-atk-explorer/board/ports/dfs_romfs.h @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2019/01/13 Bernard code cleanup + */ + +#ifndef __DFS_ROMFS_H__ +#define __DFS_ROMFS_H__ + +#include + +#define ROMFS_DIRENT_FILE 0x00 +#define ROMFS_DIRENT_DIR 0x01 + +struct romfs_dirent +{ + rt_uint32_t type; /* dirent type */ + + const char *name; /* dirent name */ + const rt_uint8_t *data; /* file date ptr */ + rt_size_t size; /* file size */ +}; + +int dfs_romfs_init(void); +extern const struct romfs_dirent romfs_root; + +#endif -- GitLab