fal_cfg.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * Copyright (c) 2006-2022, RT-Thread Development Team
  3. * Copyright (c) 2022-2024, Xiaohua Semiconductor Co., Ltd.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0
  6. *
  7. * Change Logs:
  8. * Date Author Notes
  9. * 2024-02-20 CDT first version
  10. */
  11. #ifndef _FAL_CFG_H_
  12. #define _FAL_CFG_H_
  13. #include <rtthread.h>
  14. #include <board.h>
  15. /* enable hc32f4 onchip flash driver sample */
  16. #define FAL_FLASH_PORT_DRIVER_HC32F4
  17. /* enable SFUD flash driver sample */
  18. #define FAL_FLASH_PORT_DRIVER_SFUD
  19. extern const struct fal_flash_dev hc32_onchip_flash;
  20. extern struct fal_flash_dev ext_nor_flash0;
  21. /* flash device table */
  22. #define FAL_FLASH_DEV_TABLE \
  23. { \
  24. &hc32_onchip_flash, \
  25. &ext_nor_flash0, \
  26. }
  27. /* ====================== Partition Configuration ========================== */
  28. #ifdef FAL_PART_HAS_TABLE_CFG
  29. /* partition table */
  30. #define FAL_PART_TABLE \
  31. { \
  32. {FAL_PART_MAGIC_WROD, "app", "onchip_flash", 0, 256 * 1024, 0}, \
  33. {FAL_PART_MAGIC_WROD, "filesystem", "w25q64", 0, 8 * 1024 * 1024, 0}, \
  34. }
  35. #endif /* FAL_PART_HAS_TABLE_CFG */
  36. #endif /* _FAL_CFG_H_ */