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 int get_lib_ver(void);\r
33 void tas2557_ftc_start(void);\r
34 void set_scth(double nSCTH);\r
35 void set_nfs(double nNFS);\r
36 void set_re(double re_ppc3, double re, double alpha);\r
37 void set_temp_cal(uint32_t prm_pow, uint32_t prm_tlimit);\r
38 double get_re(double re_ppc3);\r
39 double get_f0(int32_t fs);\r
40 double get_q(int32_t fs);\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);\r
43 double calc_safe_prm_tlimit(double prm_tlimit_safe, double alpha, double nDevNonlinPer, double nSpkReTolPer);\r
44 double coeff_fixed_to_float(uint32_t coeff);\r
45 \r
46 \r
47 #endif /* TAS2557_LIB_FTC_H_ */\r