1 /*! 2 * @file tsc_filter.h 3 * 4 * @brief This file contains external declarations of the tsc_filter.c file. 5 * 6 * @version V1.0.0 7 * 8 * @date 2022-02-21 9 * 10 * @attention 11 * 12 * Copyright (C) 2020-2022 Geehy Semiconductor 13 * 14 * You may not use this file except in compliance with the 15 * GEEHY COPYRIGHT NOTICE (GEEHY SOFTWARE PACKAGE LICENSE). 16 * 17 * The program is only for reference, which is distributed in the hope 18 * that it will be useful and instructional for customers to develop 19 * their software. Unless required by applicable law or agreed to in 20 * writing, the program is distributed on an "AS IS" BASIS, WITHOUT 21 * ANY WARRANTY OR CONDITIONS OF ANY KIND, either express or implied. 22 * See the GEEHY SOFTWARE PACKAGE LICENSE for the governing permissions 23 * and limitations under the License. 24 */ 25 26 /* Define to prevent recursive inclusion */ 27 #ifndef __TSC_FILTER_H 28 #define __TSC_FILTER_H 29 30 #ifdef __cplusplus 31 extern "C" { 32 #endif 33 34 /* Includes */ 35 #include "tsc_acq.h" 36 37 /** @addtogroup TSC_Driver_Library TSC Driver Library 38 @{ 39 */ 40 41 /** @addtogroup TSC_Filter_Driver TSC Filter Driver 42 @{ 43 */ 44 45 /** @defgroup TSC_Filter_Macros Macros 46 @{ 47 */ 48 49 /* Can be[0..5] - Warning: all thresholds must be shifted if different from 0 */ 50 #define ACQ_FILTER_RANGE (0) 51 52 /* Can be[1..255] - First order filter coefficient (k = ACQ_FILTER_COEFF/256) */ 53 #define ACQ_FILTER_COEFF (128) 54 55 /**@} end of group TSC_Filter_Macros */ 56 57 /** @defgroup TSC_Filter_Enumerations Enumerations 58 @{ 59 */ 60 61 /**@} end of group TSC_Filter_Enumerations */ 62 63 /** @defgroup TSC_Filter_Structures Structures 64 @{ 65 */ 66 67 /**@} end of group TSC_Filter_Structures */ 68 69 /** @defgroup TSC_Filter_Variables Variables 70 @{ 71 */ 72 73 /**@} end of group TSC_Filter_Variables */ 74 75 /** @defgroup TSC_Filter_Functions Functions 76 @{ 77 */ 78 79 TSC_tMeas_T TSC_Filt_MeasFilter(TSC_tMeas_T preMeasn, TSC_tMeas_T curMeasn); 80 TSC_tDelta_T TSC_Filt_DeltaFilter(TSC_tDelta_T delta); 81 82 #ifdef __cplusplus 83 } 84 #endif 85 86 #endif /* __TSC_FILTER_H */ 87 88 /**@} end of group TSC_Filter_Functions */ 89 /**@} end of group TSC_Filter_Driver */ 90 /**@} end of group TSC_Driver_Library */ 91