dfs_romfs.h 736 B

12345678910111213141516171819202122232425262728293031323334
  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. #ifndef __DFS_ROMFS_H__
  11. #define __DFS_ROMFS_H__
  12. #include <rtthread.h>
  13. #define ROMFS_DIRENT_FILE 0x00
  14. #define ROMFS_DIRENT_DIR 0x01
  15. struct romfs_dirent
  16. {
  17. rt_uint32_t type; /* dirent type */
  18. const char *name; /* dirent name */
  19. const rt_uint8_t *data; /* file date ptr */
  20. rt_size_t size; /* file size */
  21. };
  22. int dfs_romfs_init(void);
  23. #ifndef RT_USING_DFS_ROMFS_USER_ROOT
  24. extern const struct romfs_dirent romfs_root;
  25. #endif /* RT_USING_DFS_ROMFS_USER_ROOT */
  26. #endif /* __DFS_ROMFS_H__ */