/************************************************************************ 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 8.40.2, IAR Systems. CPU TYPE : GD32F30x ************************************************************************* Copyright (c) 2022 Welling Motor Technology(Shanghai) Co. Ltd. All rights reserved. ************************************************************************* ************************************************************************* Revising History (ECL of 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 "canAppl.h" #ifdef __cplusplus extern "C" { #endif // __cplusplus /************************************************************************ Compiler Directives (N/A) *************************************************************************/ #ifdef _FLASH_MASTER_C_ #define _FLASH_MASTER_EXT #else #define _FLASH_MASTER_EXT extern #endif /************************************************************************ Definitions & Macros *************************************************************************/ #define StartServerManageFlashAddress ((_ULONG)0x0803E000) #define StartServerManageErrorFlashAddress ((_ULONG)0x0803F000) #define FLASH_END ((uint32_t)0x08040000) /************************************************************************ 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; } FLASH_PARA_TYPE; extern FLASH_PARA_TYPE flash_stPara; /************************************************************************ Exported Function Call Prototypes *************************************************************************/ void flash_voWrite(void); void flash_voRead(void); void flash_voParaInit(void); void flash_voErrorWrite(void); void flash_voErrorRead(void); void FLASH_voWriteMoreData(ULONG startAddress, const UWORD writeData[], UWORD countToWrite); void FLASH_voReadMoreData(ULONG startAddress, UWORD readData[], UWORD countToRead); /************************************************************************ Flag Define (N/A) *************************************************************************/ #ifdef __cplusplus } #endif // __cplusplus #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! *************************************************************************/