PMSM_Controller_private.h 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. /*
  2. * File: PMSM_Controller_private.h
  3. *
  4. * Code generated for Simulink model 'PMSM_Controller'.
  5. *
  6. * Model version : 1.1228
  7. * Simulink Coder version : 9.4 (R2020b) 29-Jul-2020
  8. * C/C++ source code generated on : Tue Apr 5 20:46:52 2022
  9. *
  10. * Target selection: ert.tlc
  11. * Embedded hardware selection: ARM Compatible->ARM Cortex-M
  12. * Code generation objectives:
  13. * 1. Execution efficiency
  14. * 2. RAM efficiency
  15. * Validation result: Not run
  16. */
  17. #ifndef RTW_HEADER_PMSM_Controller_private_h_
  18. #define RTW_HEADER_PMSM_Controller_private_h_
  19. #include "rtwtypes.h"
  20. #include "zero_crossing_types.h"
  21. #include "PMSM_Controller.h"
  22. #ifndef UCHAR_MAX
  23. #include <limits.h>
  24. #endif
  25. #if ( UCHAR_MAX != (0xFFU) ) || ( SCHAR_MAX != (0x7F) )
  26. #error Code was generated for compiler with different sized uchar/char. \
  27. Consider adjusting Test hardware word size settings on the \
  28. Hardware Implementation pane to match your compiler word sizes as \
  29. defined in limits.h of the compiler. Alternatively, you can \
  30. select the Test hardware is the same as production hardware option and \
  31. select the Enable portable word sizes option on the Code Generation > \
  32. Verification pane for ERT based targets, which will disable the \
  33. preprocessor word size checks.
  34. #endif
  35. #if ( USHRT_MAX != (0xFFFFU) ) || ( SHRT_MAX != (0x7FFF) )
  36. #error Code was generated for compiler with different sized ushort/short. \
  37. Consider adjusting Test hardware word size settings on the \
  38. Hardware Implementation pane to match your compiler word sizes as \
  39. defined in limits.h of the compiler. Alternatively, you can \
  40. select the Test hardware is the same as production hardware option and \
  41. select the Enable portable word sizes option on the Code Generation > \
  42. Verification pane for ERT based targets, which will disable the \
  43. preprocessor word size checks.
  44. #endif
  45. #if ( UINT_MAX != (0xFFFFFFFFU) ) || ( INT_MAX != (0x7FFFFFFF) )
  46. #error Code was generated for compiler with different sized uint/int. \
  47. Consider adjusting Test hardware word size settings on the \
  48. Hardware Implementation pane to match your compiler word sizes as \
  49. defined in limits.h of the compiler. Alternatively, you can \
  50. select the Test hardware is the same as production hardware option and \
  51. select the Enable portable word sizes option on the Code Generation > \
  52. Verification pane for ERT based targets, which will disable the \
  53. preprocessor word size checks.
  54. #endif
  55. #if ( ULONG_MAX != (0xFFFFFFFFU) ) || ( LONG_MAX != (0x7FFFFFFF) )
  56. #error Code was generated for compiler with different sized ulong/long. \
  57. Consider adjusting Test hardware word size settings on the \
  58. Hardware Implementation pane to match your compiler word sizes as \
  59. defined in limits.h of the compiler. Alternatively, you can \
  60. select the Test hardware is the same as production hardware option and \
  61. select the Enable portable word sizes option on the Code Generation > \
  62. Verification pane for ERT based targets, which will disable the \
  63. preprocessor word size checks.
  64. #endif
  65. /* Skipping ulong_long/long_long check: insufficient preprocessor integer range. */
  66. extern uint16_T plook_u16s16_evencka(int16_T u, int16_T bp0, uint16_T bpSpace,
  67. uint32_T maxIndex);
  68. extern uint8_T plook_u8u16_evencka(uint16_T u, uint16_T bp0, uint16_T bpSpace,
  69. uint32_T maxIndex);
  70. extern void Counter_Init(DW_Counter *localDW, uint16_T rtp_z_cntInit);
  71. extern uint16_T Counter(uint16_T rtu_inc, uint16_T rtu_max, boolean_T rtu_rst,
  72. DW_Counter *localDW);
  73. extern boolean_T either_edge(boolean_T rtu_u, DW_either_edge *localDW);
  74. extern void Debounce_Filter_Init(DW_Debounce_Filter *localDW);
  75. extern void Debounce_Filter(boolean_T rtu_u, uint16_T rtu_tAcv, uint16_T
  76. rtu_tDeacv, boolean_T *rty_y, DW_Debounce_Filter *localDW);
  77. extern void Low_Pass_Filter(const int16_T rtu_u[2], uint16_T rtu_coef, int16_T
  78. rty_y[2], DW_Low_Pass_Filter *localDW);
  79. extern void PI_iq(int16_T rtu_err, int16_T rtu_P, int16_T rtu_I, int16_T rtu_Kb,
  80. int16_T rtu_satMax, int16_T rtu_satMin, int16_T
  81. rtu_ext_limProt, int16_T *rty_pi_out, DW_PI_iq *localDW);
  82. extern void PI_id(int16_T rtu_err, int16_T rtu_P, int16_T rtu_I, int16_T rtu_Kb,
  83. int16_T rtu_satMax, int16_T rtu_satMin, int16_T
  84. rtu_ext_limProt, int16_T *rty_pi_out, DW_PI_id *localDW);
  85. extern void pi_speed_Init(DW_pi_speed *localDW);
  86. extern int16_T pi_speed(int16_T rtu_err, int16_T rtu_P, int16_T rtu_I, int16_T
  87. rtu_Kb, int16_T rtu_satMax, int16_T rtu_satMin, int16_T rtu_ext_limProt,
  88. uint8_T rtu_reset, const ConstB_pi_speed *localC, DW_pi_speed *localDW,
  89. ZCE_pi_speed *localZCE);
  90. #endif /* RTW_HEADER_PMSM_Controller_private_h_ */
  91. /*
  92. * File trailer for generated code.
  93. *
  94. * [EOF]
  95. */