d7610282b1a5f63beaff40954a9ecccc75d50601
1 /*\r
2 ** =============================================================================\r
3 ** Copyright (c) 2016 Texas Instruments Inc.\r
4 **\r
5 ** This program is free software; you can redistribute it and/or modify it under\r
6 ** the terms of the GNU General Public License as published by the Free Software \r
7 ** Foundation; version 2.\r
8 **\r
9 ** This program is distributed in the hope that it will be useful, but WITHOUT\r
10 ** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
11 ** FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r
12 **\r
13 ** You should have received a copy of the GNU General Public License along with\r
14 ** this program; if not, write to the Free Software Foundation, Inc., 51 Franklin\r
15 ** Street, Fifth Floor, Boston, MA 02110-1301, USA.\r
16 **\r
17 ** File:\r
18 ** tas2557_lib_ftc.h\r
19 **\r
20 ** Description:\r
21 ** header file for tas2557_lib_ftc.c\r
22 **\r
23 ** =============================================================================\r
24 */\r
25 \r
26 #ifndef TAS2557_LIB_FTC_H_\r
27 #define TAS2557_LIB_FTC_H_\r
28 \r
29 #include <stdint.h>\r
30 #include <stdbool.h>\r
31 \r
32 #include "tas2557.h"\r
33 \r
34 int get_lib_ver(void);\r
35 void tas2557_ftc_set_PGID(unsigned char nPGID);\r
36 void tas2557_ftc_start(void);\r
37 void set_re(double re_ppc3, double re, double alpha);\r
38 void set_temp_cal(uint32_t prm_pow, uint32_t prm_tlimit);\r
39 double get_re(double re_ppc3);\r
40 double CalcRe(double re_ppc3, uint32_t prm_r0);\r
41 uint32_t calc_prm_pow(double re, double delta_t_max, double nRTV, double nRTM, double nRTVA, double nSysGain);\r
42 uint32_t calc_prm_tlimit(double delta_t_max, double alpha, double nDevNonlinPer, double nRTV, double nRTM, double nRTVA, double nPIG);\r
43 void tas2557_ftc_stop(void);\r
44 \r
45 /* below functions are used in SPK measurement only */\r
46 int get_Re_deltaT(double nPPC3_Re, double nPPC3_alpha, double *pnRe, double *pnDeltaT);\r
47 int get_f0_Q(double nPPC3_FWarp, double nPPC3_nFS, double nPPC3_Bl, double nPPC3_Mms, double nPPC3_Re0, double *pnF0, double *pnQ);\r
48 \r
49 #endif /* TAS2557_LIB_FTC_H_ */\r