tbs.c 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /************************************************************************
  2. Project: Welling Motor Control Paltform
  3. Filename: tbs.c
  4. Partner Filename: tbs.h
  5. Description: Time base for speed loop
  6. Complier: IAR Embedded Workbench for ARM 7.80, IAR Systems.
  7. CPU TYPE : GD32F3x0
  8. *************************************************************************
  9. Copyright (c) 2018 Welling Motor Technology(Shanghai) Co. Ltd.
  10. All rights reserved.
  11. *************************************************************************
  12. *************************************************************************
  13. Revising History (ECL of this file):
  14. ************************************************************************/
  15. #ifndef _TBS_C_
  16. #define _TBS_C_
  17. #endif
  18. /************************************************************************
  19. Included File
  20. *************************************************************************/
  21. #include "user.h"
  22. #include "FSM_1st.h"
  23. /************************************************************************
  24. Constant Table (N/A)
  25. *************************************************************************/
  26. /*************************************************************************
  27. Exported Functions (N/A)
  28. *************************************************************************/
  29. /***************************************************************
  30. Function: tbS_voIsr;
  31. Description: TBS interrupt service
  32. Call by:
  33. Input Variables: N/A
  34. Output/Return Variables: N/A
  35. Subroutine Call: ...;
  36. Reference: N/A
  37. ****************************************************************/
  38. void tbs_voIsr(void)
  39. {
  40. /* Alarm detect */
  41. alm_voDetecTBS(&alm_stIn, &alm_stDetectTbsCoef);
  42. /* 1st FSM */
  43. FSM1st_Sys_state.Tbs_hook();
  44. }
  45. /*************************************************************************
  46. Copyright (c) 2018 Welling Motor Technology(Shanghai) Co. Ltd.
  47. All rights reserved.
  48. *************************************************************************/
  49. #ifdef _TBS_C_
  50. #undef _TBS_C_ /* parasoft-suppress MISRA2004-19_6 "本项目中无法更改,后续避免使用" */
  51. #endif
  52. /*************************************************************************
  53. End of this File (EOF)!
  54. Do not put anything after this part!
  55. *************************************************************************/