ts.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. /**
  2. ******************************************************************************
  3. * @file ts.h
  4. * @author MCD Application Team
  5. * @brief This file contains all the functions prototypes for the Touch Screen driver.
  6. ******************************************************************************
  7. * @attention
  8. *
  9. * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
  10. * All rights reserved.</center></h2>
  11. *
  12. * This software component is licensed by ST under BSD 3-Clause license,
  13. * the "License"; You may not use this file except in compliance with the
  14. * License. You may obtain a copy of the License at:
  15. * opensource.org/licenses/BSD-3-Clause
  16. *
  17. ******************************************************************************
  18. */
  19. /* Define to prevent recursive inclusion -------------------------------------*/
  20. #ifndef __TS_H
  21. #define __TS_H
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25. /* Includes ------------------------------------------------------------------*/
  26. #include <stdint.h>
  27. /** @addtogroup BSP
  28. * @{
  29. */
  30. /** @addtogroup Components
  31. * @{
  32. */
  33. /** @addtogroup TS
  34. * @{
  35. */
  36. /** @defgroup TS_Exported_Types
  37. * @{
  38. */
  39. /** @defgroup TS_Driver_structure Touch Sensor Driver structure
  40. * @{
  41. */
  42. typedef struct
  43. {
  44. void (*Init)(uint16_t);
  45. uint16_t (*ReadID)(uint16_t);
  46. void (*Reset)(uint16_t);
  47. void (*Start)(uint16_t);
  48. uint8_t (*DetectTouch)(uint16_t);
  49. void (*GetXY)(uint16_t, uint16_t*, uint16_t*);
  50. void (*EnableIT)(uint16_t);
  51. void (*ClearIT)(uint16_t);
  52. uint8_t (*GetITStatus)(uint16_t);
  53. void (*DisableIT)(uint16_t);
  54. }TS_DrvTypeDef;
  55. /**
  56. * @}
  57. */
  58. /**
  59. * @}
  60. */
  61. /**
  62. * @}
  63. */
  64. /**
  65. * @}
  66. */
  67. /**
  68. * @}
  69. */
  70. #ifdef __cplusplus
  71. }
  72. #endif
  73. #endif /* __TS_H */
  74. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/