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