flash_master.h 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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 6.50, IAR Systems.
  7. CPU TYPE : STM32F30x
  8. *************************************************************************
  9. Copyright (c) 2014 Welling Motor Technology(Shanghai) Co. Ltd.
  10. All rights reserved.
  11. *************************************************************************
  12. *************************************************************************
  13. Revising History (ECL of this file):
  14. liyue create this file;
  15. ************************************************************************/
  16. /************************************************************************
  17. Beginning of File, do not put anything above here except notes
  18. Compiler Directives
  19. ************************************************************************/
  20. #ifndef FLASH_MASTER_H
  21. #define FLASH_MASTER_H
  22. #include "typedefine.h"
  23. #include "queue.h"
  24. #include "canAppl.h"
  25. #include "AssistCurve.h"
  26. #include "bikeinformation.h"
  27. /************************************************************************
  28. Compiler Directives (N/A)
  29. *************************************************************************/
  30. #ifdef _FLASH_MASTER_C_
  31. #define _FLASH_MASTER_EXT
  32. #else
  33. #define _FLASH_MASTER_EXT extern
  34. #endif
  35. #define FLASH_CRC_TEST
  36. /************************************************************************
  37. Definitions & Macros
  38. *************************************************************************/
  39. #define StartServerManageProtuct_Address ((_ULONG)0x00005000) //生产信息
  40. #define EndServerManageProtuct_Address ((_ULONG)0x000053FF) //生产信息
  41. #define StartServerManageSysPara_Address ((_ULONG)0x00005400) //读写起始地址(系统参数/版本信息/MOS参数,的主存储块地址)
  42. #define EndServerManageSysPara_Address ((_ULONG)0x000057FF)
  43. #define StartServerManageHistory_Address ((_ULONG)0x00005800) //读写起始地址(历史信息的主存储块地址)
  44. #define EndServerManageHistory_Address ((_ULONG)0x00005BFF)
  45. #define StartServerManageError_Address ((_ULONG)0x00005c00) //读写起始地址(故障日志的主存储块地址)
  46. #define EndServerManageError_Address ((_ULONG)0x00005FFF) //读写起始地址(故障日志的主存储块地址)
  47. /************************************************************************
  48. TypeDefs & Structure defines (N/A)
  49. *************************************************************************/
  50. //typedef struct
  51. //{
  52. // UBYTE ubMotorVersion[16];
  53. // UBYTE ubSN[16];
  54. // MC_MacInfo_Struct_t ubProdInfo;
  55. // SLONG slTorqAssGain[15][4];
  56. // SLONG slCadAssGain[5][4];
  57. // MC_RS_ASCII_Struct_t ubRsASSCII;
  58. // UPC_TestParaInfo_Struct_t stTestParaInfo;
  59. //} FLASH_PARA_TYPE;
  60. //extern FLASH_PARA_TYPE flash_stPara;
  61. extern History_PARAMETER stHistoryPara;
  62. extern UWORD uwFlash_IRQ_Enble;
  63. /************************************************************************
  64. Exported Function Call Prototypes
  65. *************************************************************************/
  66. //extern void flash_voVerRead(void);
  67. extern void flash_voSysParaWrite(void);
  68. extern void flash_voSysParaRead(void);
  69. extern void flash_voSysParaInit(void);
  70. void FLASH_voWriteMoreData(ULONG startAddress, UWORD *writeData, UWORD countToWrite, UBYTE Era_enble);
  71. void FLASH_voReadMoreData(ULONG startAddress, UWORD *readData, UWORD countToRead);
  72. void flash_voErrorRead(void);
  73. void flash_voErrorWrite(void);
  74. void flash_voErrorClear(void);
  75. void flash_voProductParaRead(void);
  76. void flash_voProductParaWrite(void);
  77. void flash_HistoryRead(void);
  78. void flash_HistoryWrite(void);
  79. void flash_voMosResParaInit(void);
  80. //void flash_voMosResParaRead(void);
  81. void flash_voMosResParaWrite(void);
  82. /************************************************************************
  83. Flag Define (N/A)
  84. *************************************************************************/
  85. #endif
  86. /************************************************************************
  87. Copyright (c) 2018 Welling Motor Technology(Shanghai) Co. Ltd.
  88. All rights reserved.
  89. *************************************************************************
  90. End of this File (EOF)!
  91. Do not put anything after this part!
  92. *************************************************************************/