/************************************************************************ Project: Welling Motor Control Paltform Filename: flash_master.h Partner Filename: flash_master.c Description: The header file of flash_master.c Complier: IAR Embedded Workbench for ARM 6.50, IAR Systems. CPU TYPE : STM32F30x ************************************************************************* Copyright (c) 2014 Welling Motor Technology(Shanghai) Co. Ltd. All rights reserved. ************************************************************************* ************************************************************************* Revising History (ECL of this file): liyue create this file; ************************************************************************/ /************************************************************************ Beginning of File, do not put anything above here except notes Compiler Directives ************************************************************************/ #ifndef FLASH_MASTER_H #define FLASH_MASTER_H #include "typedefine.h" #include "queue.h" #include "canAppl.h" #include "AssistCurve.h" #include "bikeinformation.h" /************************************************************************ Compiler Directives (N/A) *************************************************************************/ #ifdef _FLASH_MASTER_C_ #define _FLASH_MASTER_EXT #else #define _FLASH_MASTER_EXT extern #endif #define FLASH_CRC_TEST /************************************************************************ Definitions & Macros *************************************************************************/ #define StartServerManageProtuct_Address ((_ULONG)0x00006000) //生产信息 #define EndServerManageProtuct_Address ((_ULONG)0x000063FF) //生产信息 #define StartServerManageSysPara_Address ((_ULONG)0x00006400) //读写起始地址(系统参数/版本信息/MOS参数,的主存储块地址) #define EndServerManageSysPara_Address ((_ULONG)0x000067FF) #define StartServerManageHistory_Address ((_ULONG)0x00006800) //读写起始地址(历史信息的主存储块地址) #define EndServerManageHistory_Address ((_ULONG)0x00006BFF) #define StartServerManageError_Address ((_ULONG)0x00006c00) //读写起始地址(故障日志的主存储块地址) #define EndServerManageError_Address ((_ULONG)0x00006FFF) //读写起始地址(故障日志的主存储块地址) #define APP_START_Address ((_ULONG)0x00007000) //读写起始地址(故障日志的主存储块地址) #define FLASH_END ((_ULONG)0x00006FFF) /************************************************************************ TypeDefs & Structure defines (N/A) *************************************************************************/ //typedef struct //{ // UBYTE ubMotorVersion[16]; // UBYTE ubSN[16]; // MC_MacInfo_Struct_t ubProdInfo; // SLONG slTorqAssGain[15][4]; // SLONG slCadAssGain[5][4]; // MC_RS_ASCII_Struct_t ubRsASSCII; // UPC_TestParaInfo_Struct_t stTestParaInfo; //} FLASH_PARA_TYPE; //extern FLASH_PARA_TYPE flash_stPara; extern History_PARAMETER stHistoryPara; extern UWORD uwFlash_IRQ_Enble; /************************************************************************ Exported Function Call Prototypes *************************************************************************/ //extern void flash_voVerRead(void); extern void flash_voSysParaWrite(void); extern void flash_voSysParaRead(void); extern void flash_voSysParaInit(void); void FLASH_voWriteMoreData(ULONG startAddress, UWORD *writeData, UWORD countToWrite, UBYTE Era_enble); void FLASH_voReadMoreData(ULONG startAddress, UWORD *readData, UWORD countToRead); void flash_voErrorRead(void); void flash_voErrorWrite(void); void flash_voErrorClear(void); void flash_voProductParaRead(void); void flash_voProductParaWrite(void); void flash_HistoryRead(void); void flash_HistoryWrite(void); void flash_voMosResParaInit(void); //void flash_voMosResParaRead(void); void flash_voMosResParaWrite(void); /************************************************************************ Flag Define (N/A) *************************************************************************/ #endif /************************************************************************ Copyright (c) 2018 Welling Motor Technology(Shanghai) Co. Ltd. All rights reserved. ************************************************************************* End of this File (EOF)! Do not put anything after this part! *************************************************************************/