Temp.h 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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 MOTOR_TEMP_DETECT 1 //
  27. #define MOTOR_TEMP_R1 150 //0.01K
  28. #define MOTOR_TEMP_R2 82 //0.01k
  29. #define MOTOR_TEMP_VCC 51 //0.1V PCB霍尔板供电电压大约5.1V
  30. #define MOTOR_TEMP_AD_VCC 33 //0.1V
  31. #define TEMPNUM 8
  32. #define CURCALIBNUM 8
  33. #define CURCALIBUNIT 10 // centidegree
  34. /************************************************************************
  35. TypeDefs & Structure defines (N/A)
  36. *************************************************************************/
  37. #define temp__20 0
  38. #define temp_0 1
  39. #define temp_20 2
  40. #define temp_40 3
  41. #define temp_60 4
  42. #define temp_80 5
  43. #define temp_100 6
  44. #define temp_120 7
  45. #define temp_motor_150 32
  46. #define temp_pcb_140 25
  47. #define temp_coef_0_20 0
  48. #define temp_coef_20_40 1
  49. #define temp_coef_40_60 2
  50. #define temp_coef_60_80 3
  51. #define temp_coef_80_100 4
  52. /************************************************************************
  53. Exported Variables
  54. *************************************************************************/
  55. extern SWORD tmp_PcbTemp;
  56. extern SWORD tmp_MotTemp;
  57. //extern SWORD tmp_CurCalibCoef[];
  58. //extern SWORD tmp_CurCalibLimitDeta[];
  59. extern void TempInit(void);
  60. extern void PcbTempCal(SWORD PcbR);
  61. extern void MotorTempCal(SWORD PcbR);
  62. /************************************************************************
  63. Flag Define (N/A)
  64. *************************************************************************/
  65. #endif
  66. /************************************************************************
  67. Copyright (c) 2017 Welling Motor Technology(Shanghai) Co. Ltd.
  68. All rights reserved.
  69. *************************************************************************
  70. End of this File (EOF)!
  71. Do not put anything after this part!
  72. *************************************************************************/