Skip to content

Commit 74b3bb0

Browse files
committed
【添加】添加dfs_romfs.h文件,并修改构建脚本
1 parent a403a3e commit 74b3bb0

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

bsp/stm32/stm32f407-atk-explorer/board/SConscript

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ if GetDepend(['BSP_USING_SPI_FLASH']):
2020

2121
if GetDepend(['BSP_USING_FS']):
2222
src += Glob('ports/drv_filesystem.c')
23+
src += Glob('ports/dfs_romfs.h')
2324

2425
if GetDepend(['BSP_USING_SRAM']):
2526
src += Glob('ports/drv_sram.c')
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* Copyright (c) 2006-2021, RT-Thread Development Team
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*
6+
* Change Logs:
7+
* Date Author Notes
8+
* 2019/01/13 Bernard code cleanup
9+
*/
10+
11+
#ifndef __DFS_ROMFS_H__
12+
#define __DFS_ROMFS_H__
13+
14+
#include <rtthread.h>
15+
16+
#define ROMFS_DIRENT_FILE 0x00
17+
#define ROMFS_DIRENT_DIR 0x01
18+
19+
struct romfs_dirent
20+
{
21+
rt_uint32_t type; /* dirent type */
22+
23+
const char *name; /* dirent name */
24+
const rt_uint8_t *data; /* file date ptr */
25+
rt_size_t size; /* file size */
26+
};
27+
28+
int dfs_romfs_init(void);
29+
extern const struct romfs_dirent romfs_root;
30+
31+
#endif

0 commit comments

Comments
 (0)