⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 iqmathlib.h

📁 TI公司28XDSP控制永磁同步电机(PMSM)
💻 H
📖 第 1 页 / 共 5 页
字号:
#define   _IQsqrt(A)  _IQ24sqrt(A)
#endif
#if GLOBAL_Q == 23
#define   _IQsqrt(A)  _IQ23sqrt(A)
#endif
#if GLOBAL_Q == 22
#define   _IQsqrt(A)  _IQ22sqrt(A)
#endif
#if GLOBAL_Q == 21
#define   _IQsqrt(A)  _IQ21sqrt(A)
#endif
#if GLOBAL_Q == 20
#define   _IQsqrt(A)  _IQ20sqrt(A)
#endif
#if GLOBAL_Q == 19
#define   _IQsqrt(A)  _IQ19sqrt(A)
#endif
#if GLOBAL_Q == 18
#define   _IQsqrt(A)  _IQ18sqrt(A)
#endif
#if GLOBAL_Q == 17
#define   _IQsqrt(A)  _IQ17sqrt(A)
#endif
#if GLOBAL_Q == 16
#define   _IQsqrt(A)  _IQ16sqrt(A)
#endif
#if GLOBAL_Q == 15
#define   _IQsqrt(A)  _IQ15sqrt(A)
#endif
#if GLOBAL_Q == 14
#define   _IQsqrt(A)  _IQ14sqrt(A)
#endif
#if GLOBAL_Q == 13
#define   _IQsqrt(A)  _IQ13sqrt(A)
#endif
#if GLOBAL_Q == 12
#define   _IQsqrt(A)  _IQ12sqrt(A)
#endif
#if GLOBAL_Q == 11
#define   _IQsqrt(A)  _IQ11sqrt(A)
#endif
#if GLOBAL_Q == 10
#define   _IQsqrt(A)  _IQ10sqrt(A)
#endif
#if GLOBAL_Q == 9
#define   _IQsqrt(A)  _IQ9sqrt(A)
#endif
#if GLOBAL_Q == 8
#define   _IQsqrt(A)  _IQ8sqrt(A)
#endif
#if GLOBAL_Q == 7
#define   _IQsqrt(A)  _IQ7sqrt(A)
#endif
#if GLOBAL_Q == 6
#define   _IQsqrt(A)  _IQ6sqrt(A)
#endif
#if GLOBAL_Q == 5
#define   _IQsqrt(A)  _IQ5sqrt(A)
#endif
#if GLOBAL_Q == 4
#define   _IQsqrt(A)  _IQ4sqrt(A)
#endif
#if GLOBAL_Q == 3
#define   _IQsqrt(A)  _IQ3sqrt(A)
#endif
#if GLOBAL_Q == 2
#define   _IQsqrt(A)  _IQ2sqrt(A)
#endif
#if GLOBAL_Q == 1
#define   _IQsqrt(A)  _IQ1sqrt(A)
#endif
//---------------------------------------------------------------------------
extern    long _IQ30isqrt(long A);
extern    long _IQ29isqrt(long A);
extern    long _IQ28isqrt(long A);
extern    long _IQ27isqrt(long A);
extern    long _IQ26isqrt(long A);
extern    long _IQ25isqrt(long A);
extern    long _IQ24isqrt(long A);
extern    long _IQ23isqrt(long A);
extern    long _IQ22isqrt(long A);
extern    long _IQ21isqrt(long A);
extern    long _IQ20isqrt(long A);
extern    long _IQ19isqrt(long A);
extern    long _IQ18isqrt(long A);
extern    long _IQ17isqrt(long A);
extern    long _IQ16isqrt(long A);
extern    long _IQ15isqrt(long A);
extern    long _IQ14isqrt(long A);
extern    long _IQ13isqrt(long A);
extern    long _IQ12isqrt(long A);
extern    long _IQ11isqrt(long A);
extern    long _IQ10isqrt(long A);
extern    long _IQ9isqrt(long A);
extern    long _IQ8isqrt(long A);
extern    long _IQ7isqrt(long A);
extern    long _IQ6isqrt(long A);
extern    long _IQ5isqrt(long A);
extern    long _IQ4isqrt(long A);
extern    long _IQ3isqrt(long A);
extern    long _IQ2isqrt(long A);
extern    long _IQ1isqrt(long A);

#if GLOBAL_Q == 30
#define   _IQisqrt(A)  _IQ30isqrt(A)
#endif
#if GLOBAL_Q == 29
#define   _IQisqrt(A)  _IQ29isqrt(A)
#endif
#if GLOBAL_Q == 28
#define   _IQisqrt(A)  _IQ28isqrt(A)
#endif
#if GLOBAL_Q == 27
#define   _IQisqrt(A)  _IQ27isqrt(A)
#endif
#if GLOBAL_Q == 26
#define   _IQisqrt(A)  _IQ26isqrt(A)
#endif
#if GLOBAL_Q == 25
#define   _IQisqrt(A)  _IQ25isqrt(A)
#endif
#if GLOBAL_Q == 24
#define   _IQisqrt(A)  _IQ24isqrt(A)
#endif
#if GLOBAL_Q == 23
#define   _IQisqrt(A)  _IQ23isqrt(A)
#endif
#if GLOBAL_Q == 22
#define   _IQisqrt(A)  _IQ22isqrt(A)
#endif
#if GLOBAL_Q == 21
#define   _IQisqrt(A)  _IQ21isqrt(A)
#endif
#if GLOBAL_Q == 20
#define   _IQisqrt(A)  _IQ20isqrt(A)
#endif
#if GLOBAL_Q == 19
#define   _IQisqrt(A)  _IQ19isqrt(A)
#endif
#if GLOBAL_Q == 18
#define   _IQisqrt(A)  _IQ18isqrt(A)
#endif
#if GLOBAL_Q == 17
#define   _IQisqrt(A)  _IQ17isqrt(A)
#endif
#if GLOBAL_Q == 16
#define   _IQisqrt(A)  _IQ16isqrt(A)
#endif
#if GLOBAL_Q == 15
#define   _IQisqrt(A)  _IQ15isqrt(A)
#endif
#if GLOBAL_Q == 14
#define   _IQisqrt(A)  _IQ14isqrt(A)
#endif
#if GLOBAL_Q == 13
#define   _IQisqrt(A)  _IQ13isqrt(A)
#endif
#if GLOBAL_Q == 12
#define   _IQisqrt(A)  _IQ12isqrt(A)
#endif
#if GLOBAL_Q == 11
#define   _IQisqrt(A)  _IQ11isqrt(A)
#endif
#if GLOBAL_Q == 10
#define   _IQisqrt(A)  _IQ10isqrt(A)
#endif
#if GLOBAL_Q == 9
#define   _IQisqrt(A)  _IQ9isqrt(A)
#endif
#if GLOBAL_Q == 8
#define   _IQisqrt(A)  _IQ8isqrt(A)
#endif
#if GLOBAL_Q == 7
#define   _IQisqrt(A)  _IQ7isqrt(A)
#endif
#if GLOBAL_Q == 6
#define   _IQisqrt(A)  _IQ6isqrt(A)
#endif
#if GLOBAL_Q == 5
#define   _IQisqrt(A)  _IQ5isqrt(A)
#endif
#if GLOBAL_Q == 4
#define   _IQisqrt(A)  _IQ4isqrt(A)
#endif
#if GLOBAL_Q == 3
#define   _IQisqrt(A)  _IQ3isqrt(A)
#endif
#if GLOBAL_Q == 2
#define   _IQisqrt(A)  _IQ2isqrt(A)
#endif
#if GLOBAL_Q == 1
#define   _IQisqrt(A)  _IQ1isqrt(A)
#endif
//---------------------------------------------------------------------------
extern    long _IQ30int(long A);
extern    long _IQ29int(long A);
extern    long _IQ28int(long A);
extern    long _IQ27int(long A);
extern    long _IQ26int(long A);
extern    long _IQ25int(long A);
extern    long _IQ24int(long A);
extern    long _IQ23int(long A);
extern    long _IQ22int(long A);
extern    long _IQ21int(long A);
extern    long _IQ20int(long A);
extern    long _IQ19int(long A);
extern    long _IQ18int(long A);
extern    long _IQ17int(long A);
extern    long _IQ16int(long A);
extern    long _IQ15int(long A);
extern    long _IQ14int(long A);
extern    long _IQ13int(long A);
extern    long _IQ12int(long A);
extern    long _IQ11int(long A);
extern    long _IQ10int(long A);
extern    long _IQ9int(long A);
extern    long _IQ8int(long A);
extern    long _IQ7int(long A);
extern    long _IQ6int(long A);
extern    long _IQ5int(long A);
extern    long _IQ4int(long A);
extern    long _IQ3int(long A);
extern    long _IQ2int(long A);
extern    long _IQ1int(long A);

#if GLOBAL_Q == 30
#define   _IQint(A)  _IQ30int(A)
#endif
#if GLOBAL_Q == 29
#define   _IQint(A)  _IQ29int(A)
#endif
#if GLOBAL_Q == 28
#define   _IQint(A)  _IQ28int(A)
#endif
#if GLOBAL_Q == 27
#define   _IQint(A)  _IQ27int(A)
#endif
#if GLOBAL_Q == 26
#define   _IQint(A)  _IQ26int(A)
#endif
#if GLOBAL_Q == 25
#define   _IQint(A)  _IQ25int(A)
#endif
#if GLOBAL_Q == 24
#define   _IQint(A)  _IQ24int(A)
#endif
#if GLOBAL_Q == 23
#define   _IQint(A)  _IQ23int(A)
#endif
#if GLOBAL_Q == 22
#define   _IQint(A)  _IQ22int(A)
#endif
#if GLOBAL_Q == 21
#define   _IQint(A)  _IQ21int(A)
#endif
#if GLOBAL_Q == 20
#define   _IQint(A)  _IQ20int(A)
#endif
#if GLOBAL_Q == 19
#define   _IQint(A)  _IQ19int(A)
#endif
#if GLOBAL_Q == 18
#define   _IQint(A)  _IQ18int(A)
#endif
#if GLOBAL_Q == 17
#define   _IQint(A)  _IQ17int(A)
#endif
#if GLOBAL_Q == 16
#define   _IQint(A)  _IQ16int(A)
#endif
#if GLOBAL_Q == 15
#define   _IQint(A)  _IQ15int(A)
#endif
#if GLOBAL_Q == 14
#define   _IQint(A)  _IQ14int(A)
#endif
#if GLOBAL_Q == 13
#define   _IQint(A)  _IQ13int(A)
#endif
#if GLOBAL_Q == 12
#define   _IQint(A)  _IQ12int(A)
#endif
#if GLOBAL_Q == 11
#define   _IQint(A)  _IQ11int(A)
#endif
#if GLOBAL_Q == 10
#define   _IQint(A)  _IQ10int(A)
#endif
#if GLOBAL_Q == 9
#define   _IQint(A)  _IQ9int(A)
#endif
#if GLOBAL_Q == 8
#define   _IQint(A)  _IQ8int(A)
#endif
#if GLOBAL_Q == 7
#define   _IQint(A)  _IQ7int(A)
#endif
#if GLOBAL_Q == 6
#define   _IQint(A)  _IQ6int(A)
#endif
#if GLOBAL_Q == 5
#define   _IQint(A)  _IQ5int(A)
#endif
#if GLOBAL_Q == 4
#define   _IQint(A)  _IQ4int(A)
#endif
#if GLOBAL_Q == 3
#define   _IQint(A)  _IQ3int(A)
#endif
#if GLOBAL_Q == 2
#define   _IQint(A)  _IQ2int(A)
#endif
#if GLOBAL_Q == 1
#define   _IQint(A)  _IQ1int(A)
#endif
//---------------------------------------------------------------------------
extern    long _IQ30frac(long A);
extern    long _IQ29frac(long A);
extern    long _IQ28frac(long A);
extern    long _IQ27frac(long A);
extern    long _IQ26frac(long A);
extern    long _IQ25frac(long A);
extern    long _IQ24frac(long A);
extern    long _IQ23frac(long A);
extern    long _IQ22frac(long A);
extern    long _IQ21frac(long A);
extern    long _IQ20frac(long A);
extern    long _IQ19frac(long A);
extern    long _IQ18frac(long A);
extern    long _IQ17frac(long A);
extern    long _IQ16frac(long A);
extern    long _IQ15frac(long A);
extern    long _IQ14frac(long A);
extern    long _IQ13frac(long A);
extern    long _IQ12frac(long A);
extern    long _IQ11frac(long A);
extern    long _IQ10frac(long A);
extern    long _IQ9frac(long A);
extern    long _IQ8frac(long A);
extern    long _IQ7frac(long A);
extern    long _IQ6frac(long A);
extern    long _IQ5frac(long A);
extern    long _IQ4frac(long A);
extern    long _IQ3frac(long A);
extern    long _IQ2frac(long A);
extern    long _IQ1frac(long A);

#if GLOBAL_Q == 30
#define   _IQfrac(A)  _IQ30frac(A)
#endif
#if GLOBAL_Q == 29
#define   _IQfrac(A)  _IQ29frac(A)
#endif
#if GLOBAL_Q == 28
#define   _IQfrac(A)  _IQ28frac(A)
#endif
#if GLOBAL_Q == 27
#define   _IQfrac(A)  _IQ27frac(A)
#endif
#if GLOBAL_Q == 26
#define   _IQfrac(A)  _IQ26frac(A)
#endif
#if GLOBAL_Q == 25
#define   _IQfrac(A)  _IQ25frac(A)
#endif
#if GLOBAL_Q == 24
#define   _IQfrac(A)  _IQ24frac(A)
#endif
#if GLOBAL_Q == 23
#define   _IQfrac(A)  _IQ23frac(A)
#endif
#if GLOBAL_Q == 22
#define   _IQfrac(A)  _IQ22frac(A)
#endif
#if GLOBAL_Q == 21
#define   _IQfrac(A)  _IQ21frac(A)
#endif
#if GLOBAL_Q == 20
#define   _IQfrac(A)  _IQ20frac(A)
#endif
#if GLOBAL_Q == 19
#define   _IQfrac(A)  _IQ19frac(A)
#endif
#if GLOBAL_Q == 18
#define   _IQfrac(A)  _IQ18frac(A)
#endif
#if GLOBAL_Q == 17
#define   _IQfrac(A)  _IQ17frac(A)
#endif
#if GLOBAL_Q == 16
#define   _IQfrac(A)  _IQ16frac(A)
#endif
#if GLOBAL_Q == 15
#define   _IQfrac(A)  _IQ15frac(A)
#endif
#if GLOBAL_Q == 14
#define   _IQfrac(A)  _IQ14frac(A)
#endif
#if GLOBAL_Q == 13
#define   _IQfrac(A)  _IQ13frac(A)
#endif
#if GLOBAL_Q == 12
#define   _IQfrac(A)  _IQ12frac(A)
#endif
#if GLOBAL_Q == 11
#define   _IQfrac(A)  _IQ11frac(A)
#endif
#if GLOBAL_Q == 10
#define   _IQfrac(A)  _IQ10frac(A)
#endif
#if GLOBAL_Q == 9
#define   _IQfrac(A)  _IQ9frac(A)
#endif
#if GLOBAL_Q == 8
#define   _IQfrac(A)  _IQ8frac(A)
#endif
#if GLOBAL_Q == 7
#define   _IQfrac(A)  _IQ7frac(A)
#endif
#if GLOBAL_Q == 6
#define   _IQfrac(A)  _IQ6frac(A)
#endif
#if GLOBAL_Q == 5
#define   _IQfrac(A)  _IQ5frac(A)
#endif
#if GLOBAL_Q == 4
#define   _IQfrac(A)  _IQ4frac(A)
#endif
#if GLOBAL_Q == 3
#define   _IQfrac(A)  _IQ3frac(A)
#endif
#if GLOBAL_Q == 2
#define   _IQfrac(A)  _IQ2frac(A)
#endif
#if GLOBAL_Q == 1
#define   _IQfrac(A)  _IQ1frac(A)
#endif
//---------------------------------------------------------------------------
#define   _IQmpyIQX(A, IQA, B, IQB)    __IQxmpy(A, B, (GLOBAL_Q + 32 - IQA - IQB))
#define   _IQ30mpyIQX(A, IQA, B, IQB)  __IQxmpy(A, B, (30 + 32 - IQA - IQB))
#define   _IQ29mpyIQX(A, IQA, B, IQB)  __IQxmpy(A, B, (29 + 32 - IQA - IQB))
#define   _IQ28mpyIQX(A, IQA, B, IQB)  __IQxmpy(A, B, (28 + 32 - IQA - IQB))
#define   _IQ27mpyIQX(A, I

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -