1 /*!
2 * @file tsc.c
3 *
4 * @brief This file contains the Touch Driver main functions.
5 *
6 * @version V1.0.1
7 *
8 * @date 2022-09-20
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 /* Includes */
27 #include "tsc.h"
28
29 /** @addtogroup TSC_Driver_Library TSC Driver Library
30 @{
31 */
32
33 /** @addtogroup TSC_Driver TSC Driver
34 @{
35 */
36
37 /** @defgroup TSC_Macros Macros
38 @{
39 */
40
41 /**@} end of group TSC_Macros */
42
43 /** @defgroup TSC_Enumerations Enumerations
44 @{
45 */
46
47 /**@} end of group TSC_Enumerations */
48
49 /** @defgroup TSC_Variables Variables
50 @{
51 */
52
53 /* Global variables used by main() and TSC modules */
54 TSC_Globals_T TSC_Globals;
55
56 /**@} end of group TSC_Variables */
57
58 /** @defgroup TSC_Functions Functions
59 @{
60 */
61
62 /*!
63 * @brief Config the TSC GPIO interface
64 *
65 * @param block: Array holding all the blocks
66 *
67 * @retval pointer to a TSC_STATUS_T structure
68 */
TSC_Config(CONST TSC_Block_T * block)69 TSC_STATUS_T TSC_Config(CONST TSC_Block_T* block)
70 {
71 TSC_STATUS_T retval;
72
73 /* Read blocks array */
74 TSC_Globals.Block_Array = block;
75
76 retval = TSC_Time_Config();
77
78 if (retval == TSC_STATUS_OK)
79 {
80 retval = TSC_Acq_Config();
81 }
82
83 return retval;
84 }
85
86 /**@} end of group TSC_Functions */
87 /**@} end of group TSC_Driver */
88 /**@} end of group TSC_Driver_Library */
89