lib_iap.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /***************************************************************
  2. *Copyright (C), 2017, Shanghai Eastsoft Microelectronics Co., Ltd.
  3. *文件名:
  4. *作 者: Liut
  5. *版 本: V1.00
  6. *日 期: 2017/07/14
  7. *描 述:
  8. *备 注: 适用于 ES8P508x芯片
  9. 本软件仅供学习和演示使用,对用户直接引用代码所带来的风险或后果不承担任何法律责任。
  10. ***************************************************************/
  11. #ifndef __ES8P508x_IAP_TABLE_H
  12. #define __ES8P508x_IAP_TABLE_H
  13. #include "ES8P508x.h"
  14. #include "type.h"
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. #define IAP_PageProgram_addr 0x10000008
  19. #define IAP_PageErase_addr 0x10000000
  20. #define IAP_WordProgram_addr 0x10000004
  21. typedef ErrorStatus (*IAP_PE)(uint32_t address);
  22. typedef ErrorStatus (*IAP_WP)(uint32_t address, uint32_t data);
  23. typedef ErrorStatus (*IAP_PP)(uint32_t address, uint32_t data[], uint32_t length, uint32_t erase);
  24. ErrorStatus IAP_PageErase(uint32_t address);
  25. ErrorStatus IAP_WordProgram(uint32_t address, uint32_t data);
  26. ErrorStatus IAP_PageProgram(uint32_t address, uint32_t data[], uint32_t length, uint32_t erase);
  27. ErrorStatus IAPRead(uint32_t *Ram_Addr, uint32_t Flash_Addr, uint8_t Len);
  28. #define PageEraseEnable 0x00000001
  29. #define PageEraseDisable 0x00000000
  30. #ifdef __cplusplus
  31. }
  32. #endif
  33. #endif
  34. /*************************END OF FILE**********************/