Temp.h 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /************************************************************************
  2. Project: Washing Machine Drive
  3. Filename: classB.h
  4. Partner Filename: N/A
  5. Description: Partner file of main.c
  6. Complier: IAR Embedded Workbench for ARM 7.80, IAR Systems.
  7. CPU TYPE : ST32F0xx
  8. *************************************************************************
  9. Copyright (c) 2017 Welling Motor Technology(Shanghai) Co. Ltd.
  10. All rights reserved.
  11. *************************************************************************
  12. *************************************************************************
  13. Revising History (ECL of this file):
  14. WLBDM_M0_SR_20170814-new FSM1.1, by cyf, create this file;
  15. ************************************************************************/
  16. /************************************************************************
  17. Beginning of File, do not put anything above here except notes
  18. Compiler Directives:
  19. *************************************************************************/
  20. #ifndef TEMP_H
  21. #define TEMP_H
  22. /************************************************************************
  23. Definitions & Macros
  24. *************************************************************************/
  25. #define PCB_TEMP_SAMPLER 1000 // 0.01kOhm
  26. #define PCB_TEMP_NUM 13
  27. #define TORQ_TEMP_NUM 7
  28. #define CURCALIBNUM 8
  29. #define CURCALIBUNIT 10 // centidegree
  30. /************************************************************************
  31. TypeDefs & Structure defines (N/A)
  32. *************************************************************************/
  33. #define temp_0 0
  34. #define temp_10 1
  35. #define temp_20 2
  36. #define temp_30 3
  37. #define temp_40 4
  38. #define temp_50 5
  39. #define temp_60 6
  40. #define temp_70 7
  41. #define temp_80 8
  42. #define temp_90 9
  43. #define temp_100 10
  44. #define temp_110 11
  45. #define temp_120 12
  46. #define temp_coef_0_10 0
  47. #define temp_coef_10_20 1
  48. #define temp_coef_20_30 2
  49. #define temp_coef_30_40 3
  50. #define temp_coef_40_50 4
  51. #define temp_coef_50_60 5
  52. #define temp_coef_60_70 6
  53. #define temp_coef_70_80 7
  54. #define temp_coef_80_90 8
  55. #define temp_coef_90_100 9
  56. #define temp_coef_100_110 10
  57. #define temp_coef_110_120 11
  58. /************************************************************************
  59. Exported Variables
  60. *************************************************************************/
  61. extern SWORD tmp_PcbTemp;
  62. extern SWORD tmp_CurCalibCoef[];
  63. extern SWORD tmp_CurCalibLimitDeta[];
  64. extern void TempInit(void);
  65. extern void PcbTempCal(SWORD PcbR);
  66. extern void MotorTempCal(void);
  67. SWORD temp_swTorqTempCal(UWORD Reg);
  68. /************************************************************************
  69. Flag Define (N/A)
  70. *************************************************************************/
  71. #endif
  72. /************************************************************************
  73. Copyright (c) 2017 Welling Motor Technology(Shanghai) Co. Ltd.
  74. All rights reserved.
  75. *************************************************************************
  76. End of this File (EOF)!
  77. Do not put anything after this part!
  78. *************************************************************************/