cmdgennew.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. /************************************************************************
  2. Project: Welling FAN Motor Developing platform
  3. Filename: cmdgen.h
  4. Partner Filename: cmdgen.c
  5. Description: Partner file of cmdgen.c
  6. Complier: IAR Embedded Workbench for ARM 7.80, IAR Systems.
  7. CPU TYPE : ST32F0xx
  8. *************************************************************************
  9. Copyright (c) 2019 Welling Motor Technology(Shanghai) Co. Ltd.
  10. All rights reserved.
  11. *************************************************************************
  12. *************************************************************************
  13. Revising History (ECL of this file):
  14. 20191225, by cyf, create this file;
  15. ************************************************************************/
  16. #include "typedefine.h"
  17. /************************************************************************
  18. Beginning of File, do not put anything above here except notes
  19. Compiler Directives:
  20. *************************************************************************/
  21. #ifndef CMDGENNEW_H
  22. #define CMDGENNEW_H
  23. /************************************************************************
  24. Compiler Directives��
  25. *************************************************************************/
  26. #ifdef _CMDGENNEW_C_
  27. #define CMDGENNEW_EXT
  28. #else
  29. #define CMDGENNEW_EXT extern
  30. #endif
  31. /************************************************************************
  32. Definitions & Macros:
  33. *************************************************************************/
  34. /************************************************************************
  35. Constant Table:
  36. *************************************************************************/
  37. /************************************************************************
  38. TypeDefs & Structure Defines:
  39. *************************************************************************/
  40. typedef struct
  41. {
  42. SWORD swSpdCmdRpm;
  43. SWORD swSpdNowPu;
  44. } CMD_CMDIN;
  45. typedef struct
  46. {
  47. SWORD swNewSpdRefPu;
  48. SWORD swOldSpdRefPu;
  49. SWORD swNewCmdDir;
  50. SWORD swOldCmdDir;
  51. // FlagStatus blConsVolBrakeFlg;
  52. BOOL blConsVolBrakeFlg;
  53. SWORD swIntRefPu; // Q14, command pu ,(electrical value)
  54. SLONG slIntRefPu;
  55. SWORD swMotorDir;
  56. } CMD_CMDOUT;
  57. typedef struct
  58. {
  59. ULONG ulAccelPu;
  60. ULONG ulDecelPu;
  61. SWORD swBrakeSpdDeltaPu;
  62. } CMD_CMDCOFIN;
  63. typedef struct
  64. {
  65. ULONG ulAccelPu;
  66. ULONG ulDecelPu;
  67. SWORD swBrakeSpdDeltaPu;
  68. } CMD_CMDCOF;
  69. /************************************************************************
  70. Exported Variables:
  71. *************************************************************************/
  72. #ifdef _CMDGENNEW_C_
  73. CMDGENNEW_EXT CMD_CMDOUT cmd_stCmdOut;
  74. CMDGENNEW_EXT CMD_CMDCOF cmd_stCmdCoef;
  75. CMDGENNEW_EXT CMD_CMDIN cmd_stCmdIn;
  76. #else
  77. CMDGENNEW_EXT CMD_CMDOUT cmd_stCmdOut;
  78. CMDGENNEW_EXT CMD_CMDCOF cmd_stCmdCoef;
  79. CMDGENNEW_EXT CMD_CMDIN cmd_stCmdIn;
  80. #endif
  81. /************************************************************************
  82. Local Variables:
  83. *************************************************************************/
  84. /************************************************************************
  85. Ram Allocation:
  86. *************************************************************************/
  87. //#define cmd_stCmdCoefIn (*(CMD_CMDCOFIN *)MN_BUFFER)
  88. CMDGENNEW_EXT CMD_CMDCOFIN cmd_stCmdCoefIn;
  89. /************************************************************************
  90. Exported Function Call Prototypes:
  91. *************************************************************************/
  92. #ifdef _CMDGENNEW_C_
  93. CMDGENNEW_EXT void cmd_voCmdInit(void);
  94. CMDGENNEW_EXT void cmd_voCmdOut(CMD_CMDIN *IN, CMD_CMDCOF *COF, CMD_CMDOUT *OUT);
  95. CMDGENNEW_EXT void cmd_voCmdCoef(CMD_CMDCOFIN *IN, CMD_CMDCOF *OUT);
  96. #else
  97. CMDGENNEW_EXT void cmd_voCmdInit(void);
  98. CMDGENNEW_EXT void cmd_voCmdOut(CMD_CMDIN *IN, CMD_CMDCOF *COF, CMD_CMDOUT *OUT);
  99. CMDGENNEW_EXT void cmd_voCmdCoef(CMD_CMDCOFIN *IN, CMD_CMDCOF *OUT);
  100. #endif
  101. /************************************************************************
  102. Local Function Call Prototypes:
  103. *************************************************************************/
  104. #endif
  105. /************************************************************************
  106. Copyright (c) 2019 Welling Motor Technology(Shanghai) Co. Ltd.
  107. All rights reserved.
  108. *************************************************************************
  109. End of this File (EOF)!
  110. Do not put anything after this part!
  111. *************************************************************************/