/************************************************************************ Project: Welling FAN Motor Developing platform Filename: cmdgen.h Partner Filename: cmdgen.c Description: Partner file of cmdgen.c Complier: IAR Embedded Workbench for ARM 7.80, IAR Systems. CPU TYPE : ST32F0xx ************************************************************************* Copyright (c) 2019 Welling Motor Technology(Shanghai) Co. Ltd. All rights reserved. ************************************************************************* ************************************************************************* Revising History (ECL of this file): 20191225, by cyf, create this file; ************************************************************************/ #include "typedefine.h" /************************************************************************ Beginning of File, do not put anything above here except notes Compiler Directives: *************************************************************************/ #ifndef CMDGENNEW_H #define CMDGENNEW_H /************************************************************************ Compiler Directives�� *************************************************************************/ #ifdef _CMDGENNEW_C_ #define CMDGENNEW_EXT #else #define CMDGENNEW_EXT extern #endif /************************************************************************ Definitions & Macros: *************************************************************************/ /************************************************************************ Constant Table: *************************************************************************/ /************************************************************************ TypeDefs & Structure Defines: *************************************************************************/ typedef struct { SWORD swSpdCmdRpm; SWORD swSpdNowPu; } CMD_CMDIN; typedef struct { SWORD swNewSpdRefPu; SWORD swOldSpdRefPu; SWORD swNewCmdDir; SWORD swOldCmdDir; // FlagStatus blConsVolBrakeFlg; BOOL blConsVolBrakeFlg; SWORD swIntRefPu; // Q14, command pu ,(electrical value) SLONG slIntRefPu; SWORD swMotorDir; } CMD_CMDOUT; typedef struct { ULONG ulAccelPu; ULONG ulDecelPu; SWORD swBrakeSpdDeltaPu; } CMD_CMDCOFIN; typedef struct { ULONG ulAccelPu; ULONG ulDecelPu; SWORD swBrakeSpdDeltaPu; } CMD_CMDCOF; /************************************************************************ Exported Variables: *************************************************************************/ #ifdef _CMDGENNEW_C_ CMDGENNEW_EXT CMD_CMDOUT cmd_stCmdOut; CMDGENNEW_EXT CMD_CMDCOF cmd_stCmdCoef; CMDGENNEW_EXT CMD_CMDIN cmd_stCmdIn; #else CMDGENNEW_EXT CMD_CMDOUT cmd_stCmdOut; CMDGENNEW_EXT CMD_CMDCOF cmd_stCmdCoef; CMDGENNEW_EXT CMD_CMDIN cmd_stCmdIn; #endif /************************************************************************ Local Variables: *************************************************************************/ /************************************************************************ Ram Allocation: *************************************************************************/ //#define cmd_stCmdCoefIn (*(CMD_CMDCOFIN *)MN_BUFFER) CMDGENNEW_EXT CMD_CMDCOFIN cmd_stCmdCoefIn; /************************************************************************ Exported Function Call Prototypes: *************************************************************************/ #ifdef _CMDGENNEW_C_ CMDGENNEW_EXT void cmd_voCmdInit(void); CMDGENNEW_EXT void cmd_voCmdOut(CMD_CMDIN *IN, CMD_CMDCOF *COF, CMD_CMDOUT *OUT); CMDGENNEW_EXT void cmd_voCmdCoef(CMD_CMDCOFIN *IN, CMD_CMDCOF *OUT); #else CMDGENNEW_EXT void cmd_voCmdInit(void); CMDGENNEW_EXT void cmd_voCmdOut(CMD_CMDIN *IN, CMD_CMDCOF *COF, CMD_CMDOUT *OUT); CMDGENNEW_EXT void cmd_voCmdCoef(CMD_CMDCOFIN *IN, CMD_CMDCOF *OUT); #endif /************************************************************************ Local Function Call Prototypes: *************************************************************************/ #endif /************************************************************************ Copyright (c) 2019 Welling Motor Technology(Shanghai) Co. Ltd. All rights reserved. ************************************************************************* End of this File (EOF)! Do not put anything after this part! *************************************************************************/