tsc.c 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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. /* Includes */
  26. #include "tsc.h"
  27. /** @addtogroup TSC_Driver_Library TSC Driver Library
  28. @{
  29. */
  30. /** @addtogroup TSC_Driver TSC Driver
  31. @{
  32. */
  33. /** @defgroup TSC_Macros Macros
  34. @{
  35. */
  36. /**@} end of group TSC_Macros */
  37. /** @defgroup TSC_Enumerations Enumerations
  38. @{
  39. */
  40. /**@} end of group TSC_Enumerations */
  41. /** @defgroup TSC_Variables Variables
  42. @{
  43. */
  44. /* Global variables used by main() and TSC modules */
  45. TSC_Globals_T TSC_Globals;
  46. /**@} end of group TSC_Variables */
  47. /** @defgroup TSC_Functions Functions
  48. @{
  49. */
  50. /*!
  51. * @brief Config the TSC GPIO interface
  52. *
  53. * @param block: Array holding all the blocks
  54. *
  55. * @retval pointer to a TSC_STATUS_T structure
  56. */
  57. TSC_STATUS_T TSC_Config(CONST TSC_Block_T* block)
  58. {
  59. TSC_STATUS_T retval;
  60. /* Read blocks array */
  61. TSC_Globals.Block_Array = block;
  62. retval = TSC_Time_Config();
  63. if (retval == TSC_STATUS_OK)
  64. {
  65. retval = TSC_Acq_Config();
  66. }
  67. return retval;
  68. }
  69. /**@} end of group TSC_Functions */
  70. /**@} end of group TSC_Driver */
  71. /**@} end of group TSC_Driver_Library */