fal_cfg.h 1.4 KB

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