flash_master.h 3.4 KB

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