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 
30 #ifndef RT_USING_DFS_ROMFS_USER_ROOT
31 extern const struct romfs_dirent romfs_root;
32 #endif /* RT_USING_DFS_ROMFS_USER_ROOT */
33 
34 #endif /* __DFS_ROMFS_H__ */
35