flash_master.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /************************************************************************
  2. Project: Welling Motor Control Paltform
  3. Filename: flash_master.h
  4. Partner Filename: flash_master.c
  5. Description: The header file of flash_master.c
  6. Complier: IAR Embedded Workbench for ARM 8.40.2, IAR Systems.
  7. CPU TYPE : GD32F30x
  8. *************************************************************************
  9. Copyright (c) 2022 Welling Motor Technology(Shanghai) Co. Ltd.
  10. All rights reserved.
  11. *************************************************************************
  12. *************************************************************************
  13. Revising History (ECL of this file):
  14. ************************************************************************/
  15. /************************************************************************
  16. Beginning of File, do not put anything above here except notes
  17. Compiler Directives
  18. ************************************************************************/
  19. #ifndef FLASH_MASTER_H
  20. #define FLASH_MASTER_H
  21. #include "typedefine.h"
  22. #include "canAppl.h"
  23. /************************************************************************
  24. Compiler Directives (N/A)
  25. *************************************************************************/
  26. #ifdef _FLASH_MASTER_C_
  27. #define _FLASH_MASTER_EXT
  28. #else
  29. #define _FLASH_MASTER_EXT extern
  30. #endif
  31. /************************************************************************
  32. Definitions & Macros
  33. *************************************************************************/
  34. #define StartServerManageFlashAddress ((_ULONG)0x0803E000)
  35. #define StartServerManageErrorFlashAddress ((_ULONG)0x0803F000)
  36. #define FLASH_END ((uint32_t)0x08040000)
  37. /************************************************************************
  38. TypeDefs & Structure defines (N/A)
  39. *************************************************************************/
  40. typedef struct
  41. {
  42. UBYTE ubMotorVersion[16];
  43. UBYTE ubSN[16];
  44. MC_MacInfo_Struct_t ubProdInfo;
  45. SLONG slTorqAssGain[15][4];
  46. SLONG slCadAssGain[5][4];
  47. MC_RS_ASCII_Struct_t ubRsASSCII;
  48. } FLASH_PARA_TYPE;
  49. extern FLASH_PARA_TYPE flash_stPara;
  50. /************************************************************************
  51. Exported Function Call Prototypes
  52. *************************************************************************/
  53. void flash_voWrite(void);
  54. void flash_voRead(void);
  55. void flash_voParaInit(void);
  56. void flash_voErrorWrite(void);
  57. void flash_voErrorRead(void);
  58. void FLASH_voWriteMoreData(ULONG startAddress, const UWORD writeData[], UWORD countToWrite);
  59. void FLASH_voReadMoreData(ULONG startAddress, UWORD readData[], UWORD countToRead);
  60. /************************************************************************
  61. Flag Define (N/A)
  62. *************************************************************************/
  63. #endif
  64. /************************************************************************
  65. Copyright (c) 2018 Welling Motor Technology(Shanghai) Co. Ltd.
  66. All rights reserved.
  67. *************************************************************************
  68. End of this File (EOF)!
  69. Do not put anything after this part!
  70. *************************************************************************/