SFO_V6.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. //###########################################################################
  2. //
  3. // FILE: SFO_V6.H
  4. //
  5. // TITLE: Scale Factor Optimizer Library V6 Interface Header
  6. //
  7. //
  8. //###########################################################################
  9. //
  10. // Ver | dd mmm yyyy | Who | Description of changes
  11. // =====|=============|======|===============================================
  12. // 0.03| 11 Aug 2008 | TI | New version (V6) with calibration logic separate
  13. // | from each ePWM channel.
  14. // 0.04| 03 Aug 2009 | TI | Minor update to set MEP_ScaleFactor limit to 255
  15. // | instead of 254.
  16. // | Now updates HRMSTEP register for
  17. // | auto-conversion only of MEP_ScaleFactor is <= 255
  18. // |
  19. //###########################################################################
  20. //============================================================================
  21. // Description: This header provides the function call interface
  22. // for the scale factor optimizer
  23. //============================================================================
  24. //============================================================================
  25. // Multiple include Guard
  26. //============================================================================
  27. #ifndef _SFO_V6_H
  28. #define _SFO_V6_H
  29. //============================================================================
  30. // C++ namespace
  31. //============================================================================
  32. #ifdef __cplusplus
  33. extern "C" {
  34. #endif
  35. //============================================================================
  36. // USER MUST UPDATE THIS CONSTANT FOR NUMBER OF HRPWM CHANNELS USED
  37. //============================================================================
  38. #define PWM_CH 5 // Equal # of HRPWM channels PLUS 1
  39. // i.e. PWM_CH is 9 for 8 channels, 7 for 6 channels, etc.
  40. //============================================================================
  41. // Function prototypes for MEP SFO
  42. //============================================================================
  43. int SFO(void); // SFO V6 Calibration Function
  44. //============================================================================
  45. // Useful Defines when Using SFO Functions
  46. //============================================================================
  47. #define SFO_INCOMPLETE 0
  48. #define SFO_COMPLETE 1
  49. #define SFO_ERROR 2
  50. //============================================================================
  51. // Multiple include Guard
  52. //============================================================================
  53. #endif // End: Multiple include Guard
  54. //============================================================================
  55. // C++ namespace
  56. //============================================================================
  57. #ifdef __cplusplus
  58. }
  59. #endif /* extern "C" */