123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- /************************************************************************
- 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!
- *************************************************************************/
|