flash_master.h 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. #ifdef __cplusplus
  24. extern "C" {
  25. #endif // __cplusplus
  26. /************************************************************************
  27. Compiler Directives (N/A)
  28. *************************************************************************/
  29. #ifdef _FLASH_MASTER_C_
  30. #define _FLASH_MASTER_EXT
  31. #else
  32. #define _FLASH_MASTER_EXT extern
  33. #endif
  34. /************************************************************************
  35. Definitions & Macros
  36. *************************************************************************/
  37. #define StartServerManageFlashAddress ((_ULONG)0x0803E000)
  38. #define StartServerManageErrorFlashAddress ((_ULONG)0x0803F000)
  39. #define FLASH_END ((uint32_t)0x08040000)
  40. /************************************************************************
  41. TypeDefs & Structure defines (N/A)
  42. *************************************************************************/
  43. typedef struct
  44. {
  45. UBYTE ubMotorVersion[16];
  46. UBYTE ubSN[16];
  47. MC_MacInfo_Struct_t ubProdInfo;
  48. SLONG slTorqAssGain[15][4];
  49. SLONG slCadAssGain[5][4];
  50. MC_RS_ASCII_Struct_t ubRsASSCII;
  51. } FLASH_PARA_TYPE;
  52. extern FLASH_PARA_TYPE flash_stPara;
  53. /************************************************************************
  54. Exported Function Call Prototypes
  55. *************************************************************************/
  56. void flash_voWrite(void);
  57. void flash_voRead(void);
  58. void flash_voParaInit(void);
  59. void flash_voErrorWrite(void);
  60. void flash_voErrorRead(void);
  61. void FLASH_voWriteMoreData(ULONG startAddress, const UWORD writeData[], UWORD countToWrite);
  62. void FLASH_voReadMoreData(ULONG startAddress, UWORD readData[], UWORD countToRead);
  63. /************************************************************************
  64. Flag Define (N/A)
  65. *************************************************************************/
  66. #ifdef __cplusplus
  67. }
  68. #endif // __cplusplus
  69. #endif
  70. /************************************************************************
  71. Copyright (c) 2018 Welling Motor Technology(Shanghai) Co. Ltd.
  72. All rights reserved.
  73. *************************************************************************
  74. End of this File (EOF)!
  75. Do not put anything after this part!
  76. *************************************************************************/