hal_flash.h 712 B

12345678910111213141516171819202122232425262728
  1. #ifndef __HAL_FLASH_H__
  2. #define __HAL_FLASH_H__
  3. #include "hc32_ll_fcg.h"
  4. #include "hc32_ll_efm.h"
  5. /* Flash definitions */
  6. #define FLASH_BASE (EFM_START_ADDR)
  7. #define FLASH_SIZE (EFM_END_ADDR + 1U)
  8. #define FLASH_SECTOR_SIZE (SECTOR_SIZE)
  9. #define FLASH_SECTOR0_NUM (0U)
  10. #define FLASH_SECTOR_NUM (32U)
  11. /* SRAM definitions */
  12. #define SRAM_SIZE (0x010000UL)
  13. /* Vector table */
  14. #define VECT_TAB_STEP (0x400UL)
  15. int32_t hc32_flash_read(uint32_t u32Addr, uint8_t *pu8Buff, uint32_t u32Len);
  16. int32_t hc32_flash_write(uint32_t write_addr,uint8_t *buffer,uint32_t number);
  17. #endif