tbs.c 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. #include "profiler.h"
  24. /************************************************************************
  25. Constant Table (N/A)
  26. *************************************************************************/
  27. /*************************************************************************
  28. Exported Functions (N/A)
  29. *************************************************************************/
  30. /***************************************************************
  31. Function: tbS_voIsr;
  32. Description: TBS interrupt service
  33. Call by:
  34. Input Variables: N/A
  35. Output/Return Variables: N/A
  36. Subroutine Call: ...;
  37. Reference: N/A
  38. ****************************************************************/
  39. void tbs_voIsr(void)
  40. {
  41. /* Alarm detect */
  42. alm_voDetecTBS(&alm_stIn, &alm_stDetectTbsCoef);
  43. /* 1st FSM */
  44. FSM1st_Sys_state.Tbs_hook();
  45. }
  46. /*************************************************************************
  47. Copyright (c) 2018 Welling Motor Technology(Shanghai) Co. Ltd.
  48. All rights reserved.
  49. *************************************************************************/
  50. #ifdef _TBS_C_
  51. #undef _TBS_C_ /* parasoft-suppress MISRA2004-19_6 "本项目中无法更改,后续避免使用" */
  52. #endif
  53. /*************************************************************************
  54. End of this File (EOF)!
  55. Do not put anything after this part!
  56. *************************************************************************/