ft5336.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536
  1. /**
  2. ******************************************************************************
  3. * @file ft5336.h
  4. * @author MCD Application Team
  5. * @version V1.0.0
  6. * @date 25-June-2015
  7. * @brief This file contains all the functions prototypes for the
  8. * ft5336.c Touch screen driver.
  9. ******************************************************************************
  10. * @attention
  11. *
  12. * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
  13. *
  14. * Redistribution and use in source and binary forms, with or without modification,
  15. * are permitted provided that the following conditions are met:
  16. * 1. Redistributions of source code must retain the above copyright notice,
  17. * this list of conditions and the following disclaimer.
  18. * 2. Redistributions in binary form must reproduce the above copyright notice,
  19. * this list of conditions and the following disclaimer in the documentation
  20. * and/or other materials provided with the distribution.
  21. * 3. Neither the name of STMicroelectronics nor the names of its contributors
  22. * may be used to endorse or promote products derived from this software
  23. * without specific prior written permission.
  24. *
  25. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  26. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  27. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  28. * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
  29. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  30. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  31. * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  32. * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  33. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  34. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  35. *
  36. ******************************************************************************
  37. */
  38. /* Define to prevent recursive inclusion -------------------------------------*/
  39. #ifndef __FT5336_H
  40. #define __FT5336_H
  41. #ifdef __cplusplus
  42. extern "C" {
  43. #endif
  44. /* Set Multi-touch as supported */
  45. #if !defined(TS_MONO_TOUCH_SUPPORTED)
  46. #define TS_MULTI_TOUCH_SUPPORTED 1
  47. #endif /* TS_MONO_TOUCH_SUPPORTED */
  48. /* Includes ------------------------------------------------------------------*/
  49. #include <stdint.h>
  50. /* Macros --------------------------------------------------------------------*/
  51. #if defined(FT5336_ENABLE_ASSERT)
  52. /* Assert activated */
  53. #define FT5336_ASSERT(__condition__) do { if(__condition__) \
  54. { \
  55. while(1); \
  56. } \
  57. }while(0)
  58. #else
  59. /* Assert not activated : macro has no effect */
  60. #define FT5336_ASSERT(__condition__) do { if(__condition__) \
  61. { \
  62. ; \
  63. } \
  64. }while(0)
  65. #endif /* FT5336_ENABLE_ASSERT == 1 */
  66. /** @typedef ft5336_handle_TypeDef
  67. * ft5336 Handle definition.
  68. */
  69. typedef struct
  70. {
  71. uint8_t i2cInitialized;
  72. /* field holding the current number of simultaneous active touches */
  73. uint8_t currActiveTouchNb;
  74. /* field holding the touch index currently managed */
  75. uint8_t currActiveTouchIdx;
  76. } ft5336_handle_TypeDef;
  77. /** @addtogroup BSP
  78. * @{
  79. */
  80. /** @addtogroup Component
  81. * @{
  82. */
  83. /** @defgroup FT5336
  84. * @{
  85. */
  86. /* Exported types ------------------------------------------------------------*/
  87. /** @defgroup FT5336_Exported_Types
  88. * @{
  89. */
  90. /* Exported constants --------------------------------------------------------*/
  91. /** @defgroup FT5336_Exported_Constants
  92. * @{
  93. */
  94. /* I2C Slave address of touchscreen FocalTech FT5336 */
  95. #define FT5336_I2C_SLAVE_ADDRESS ((uint8_t)0x70)
  96. /* Maximum border values of the touchscreen pad */
  97. #define FT5336_MAX_WIDTH ((uint16_t)480) /* Touchscreen pad max width */
  98. #define FT5336_MAX_HEIGHT ((uint16_t)272) /* Touchscreen pad max height */
  99. /* Possible values of driver functions return status */
  100. #define FT5336_STATUS_OK ((uint8_t)0x00)
  101. #define FT5336_STATUS_NOT_OK ((uint8_t)0x01)
  102. /* Possible values of global variable 'TS_I2C_Initialized' */
  103. #define FT5336_I2C_NOT_INITIALIZED ((uint8_t)0x00)
  104. #define FT5336_I2C_INITIALIZED ((uint8_t)0x01)
  105. /* Max detectable simultaneous touches */
  106. #define FT5336_MAX_DETECTABLE_TOUCH ((uint8_t)0x05)
  107. /**
  108. * @brief : Definitions for FT5336 I2C register addresses on 8 bit
  109. **/
  110. /* Current mode register of the FT5336 (R/W) */
  111. #define FT5336_DEV_MODE_REG ((uint8_t)0x00)
  112. /* Possible values of FT5336_DEV_MODE_REG */
  113. #define FT5336_DEV_MODE_WORKING ((uint8_t)0x00)
  114. #define FT5336_DEV_MODE_FACTORY ((uint8_t)0x04)
  115. #define FT5336_DEV_MODE_MASK ((uint8_t)0x07)
  116. #define FT5336_DEV_MODE_SHIFT ((uint8_t)0x04)
  117. /* Gesture ID register */
  118. #define FT5336_GEST_ID_REG ((uint8_t)0x01)
  119. /* Possible values of FT5336_GEST_ID_REG */
  120. #define FT5336_GEST_ID_NO_GESTURE ((uint8_t)0x00)
  121. #define FT5336_GEST_ID_MOVE_UP ((uint8_t)0x10)
  122. #define FT5336_GEST_ID_MOVE_RIGHT ((uint8_t)0x14)
  123. #define FT5336_GEST_ID_MOVE_DOWN ((uint8_t)0x18)
  124. #define FT5336_GEST_ID_MOVE_LEFT ((uint8_t)0x1C)
  125. #define FT5336_GEST_ID_SINGLE_CLICK ((uint8_t)0x20)
  126. #define FT5336_GEST_ID_DOUBLE_CLICK ((uint8_t)0x22)
  127. #define FT5336_GEST_ID_ROTATE_CLOCKWISE ((uint8_t)0x28)
  128. #define FT5336_GEST_ID_ROTATE_C_CLOCKWISE ((uint8_t)0x29)
  129. #define FT5336_GEST_ID_ZOOM_IN ((uint8_t)0x40)
  130. #define FT5336_GEST_ID_ZOOM_OUT ((uint8_t)0x49)
  131. /* Touch Data Status register : gives number of active touch points (0..5) */
  132. #define FT5336_TD_STAT_REG ((uint8_t)0x02)
  133. /* Values related to FT5336_TD_STAT_REG */
  134. #define FT5336_TD_STAT_MASK ((uint8_t)0x0F)
  135. #define FT5336_TD_STAT_SHIFT ((uint8_t)0x00)
  136. /* Values Pn_XH and Pn_YH related */
  137. #define FT5336_TOUCH_EVT_FLAG_PRESS_DOWN ((uint8_t)0x00)
  138. #define FT5336_TOUCH_EVT_FLAG_LIFT_UP ((uint8_t)0x01)
  139. #define FT5336_TOUCH_EVT_FLAG_CONTACT ((uint8_t)0x02)
  140. #define FT5336_TOUCH_EVT_FLAG_NO_EVENT ((uint8_t)0x03)
  141. #define FT5336_TOUCH_EVT_FLAG_SHIFT ((uint8_t)0x06)
  142. #define FT5336_TOUCH_EVT_FLAG_MASK ((uint8_t)(3 << FT5336_TOUCH_EVT_FLAG_SHIFT))
  143. #define FT5336_TOUCH_POS_MSB_MASK ((uint8_t)0x0F)
  144. #define FT5336_TOUCH_POS_MSB_SHIFT ((uint8_t)0x00)
  145. /* Values Pn_XL and Pn_YL related */
  146. #define FT5336_TOUCH_POS_LSB_MASK ((uint8_t)0xFF)
  147. #define FT5336_TOUCH_POS_LSB_SHIFT ((uint8_t)0x00)
  148. #define FT5336_P1_XH_REG ((uint8_t)0x03)
  149. #define FT5336_P1_XL_REG ((uint8_t)0x04)
  150. #define FT5336_P1_YH_REG ((uint8_t)0x05)
  151. #define FT5336_P1_YL_REG ((uint8_t)0x06)
  152. /* Touch Pressure register value (R) */
  153. #define FT5336_P1_WEIGHT_REG ((uint8_t)0x07)
  154. /* Values Pn_WEIGHT related */
  155. #define FT5336_TOUCH_WEIGHT_MASK ((uint8_t)0xFF)
  156. #define FT5336_TOUCH_WEIGHT_SHIFT ((uint8_t)0x00)
  157. /* Touch area register */
  158. #define FT5336_P1_MISC_REG ((uint8_t)0x08)
  159. /* Values related to FT5336_Pn_MISC_REG */
  160. #define FT5336_TOUCH_AREA_MASK ((uint8_t)(0x04 << 4))
  161. #define FT5336_TOUCH_AREA_SHIFT ((uint8_t)0x04)
  162. #define FT5336_P2_XH_REG ((uint8_t)0x09)
  163. #define FT5336_P2_XL_REG ((uint8_t)0x0A)
  164. #define FT5336_P2_YH_REG ((uint8_t)0x0B)
  165. #define FT5336_P2_YL_REG ((uint8_t)0x0C)
  166. #define FT5336_P2_WEIGHT_REG ((uint8_t)0x0D)
  167. #define FT5336_P2_MISC_REG ((uint8_t)0x0E)
  168. #define FT5336_P3_XH_REG ((uint8_t)0x0F)
  169. #define FT5336_P3_XL_REG ((uint8_t)0x10)
  170. #define FT5336_P3_YH_REG ((uint8_t)0x11)
  171. #define FT5336_P3_YL_REG ((uint8_t)0x12)
  172. #define FT5336_P3_WEIGHT_REG ((uint8_t)0x13)
  173. #define FT5336_P3_MISC_REG ((uint8_t)0x14)
  174. #define FT5336_P4_XH_REG ((uint8_t)0x15)
  175. #define FT5336_P4_XL_REG ((uint8_t)0x16)
  176. #define FT5336_P4_YH_REG ((uint8_t)0x17)
  177. #define FT5336_P4_YL_REG ((uint8_t)0x18)
  178. #define FT5336_P4_WEIGHT_REG ((uint8_t)0x19)
  179. #define FT5336_P4_MISC_REG ((uint8_t)0x1A)
  180. #define FT5336_P5_XH_REG ((uint8_t)0x1B)
  181. #define FT5336_P5_XL_REG ((uint8_t)0x1C)
  182. #define FT5336_P5_YH_REG ((uint8_t)0x1D)
  183. #define FT5336_P5_YL_REG ((uint8_t)0x1E)
  184. #define FT5336_P5_WEIGHT_REG ((uint8_t)0x1F)
  185. #define FT5336_P5_MISC_REG ((uint8_t)0x20)
  186. #define FT5336_P6_XH_REG ((uint8_t)0x21)
  187. #define FT5336_P6_XL_REG ((uint8_t)0x22)
  188. #define FT5336_P6_YH_REG ((uint8_t)0x23)
  189. #define FT5336_P6_YL_REG ((uint8_t)0x24)
  190. #define FT5336_P6_WEIGHT_REG ((uint8_t)0x25)
  191. #define FT5336_P6_MISC_REG ((uint8_t)0x26)
  192. #define FT5336_P7_XH_REG ((uint8_t)0x27)
  193. #define FT5336_P7_XL_REG ((uint8_t)0x28)
  194. #define FT5336_P7_YH_REG ((uint8_t)0x29)
  195. #define FT5336_P7_YL_REG ((uint8_t)0x2A)
  196. #define FT5336_P7_WEIGHT_REG ((uint8_t)0x2B)
  197. #define FT5336_P7_MISC_REG ((uint8_t)0x2C)
  198. #define FT5336_P8_XH_REG ((uint8_t)0x2D)
  199. #define FT5336_P8_XL_REG ((uint8_t)0x2E)
  200. #define FT5336_P8_YH_REG ((uint8_t)0x2F)
  201. #define FT5336_P8_YL_REG ((uint8_t)0x30)
  202. #define FT5336_P8_WEIGHT_REG ((uint8_t)0x31)
  203. #define FT5336_P8_MISC_REG ((uint8_t)0x32)
  204. #define FT5336_P9_XH_REG ((uint8_t)0x33)
  205. #define FT5336_P9_XL_REG ((uint8_t)0x34)
  206. #define FT5336_P9_YH_REG ((uint8_t)0x35)
  207. #define FT5336_P9_YL_REG ((uint8_t)0x36)
  208. #define FT5336_P9_WEIGHT_REG ((uint8_t)0x37)
  209. #define FT5336_P9_MISC_REG ((uint8_t)0x38)
  210. #define FT5336_P10_XH_REG ((uint8_t)0x39)
  211. #define FT5336_P10_XL_REG ((uint8_t)0x3A)
  212. #define FT5336_P10_YH_REG ((uint8_t)0x3B)
  213. #define FT5336_P10_YL_REG ((uint8_t)0x3C)
  214. #define FT5336_P10_WEIGHT_REG ((uint8_t)0x3D)
  215. #define FT5336_P10_MISC_REG ((uint8_t)0x3E)
  216. /* Threshold for touch detection */
  217. #define FT5336_TH_GROUP_REG ((uint8_t)0x80)
  218. /* Values FT5336_TH_GROUP_REG : threshold related */
  219. #define FT5336_THRESHOLD_MASK ((uint8_t)0xFF)
  220. #define FT5336_THRESHOLD_SHIFT ((uint8_t)0x00)
  221. /* Filter function coefficients */
  222. #define FT5336_TH_DIFF_REG ((uint8_t)0x85)
  223. /* Control register */
  224. #define FT5336_CTRL_REG ((uint8_t)0x86)
  225. /* Values related to FT5336_CTRL_REG */
  226. /* Will keep the Active mode when there is no touching */
  227. #define FT5336_CTRL_KEEP_ACTIVE_MODE ((uint8_t)0x00)
  228. /* Switching from Active mode to Monitor mode automatically when there is no touching */
  229. #define FT5336_CTRL_KEEP_AUTO_SWITCH_MONITOR_MODE ((uint8_t)0x01
  230. /* The time period of switching from Active mode to Monitor mode when there is no touching */
  231. #define FT5336_TIMEENTERMONITOR_REG ((uint8_t)0x87)
  232. /* Report rate in Active mode */
  233. #define FT5336_PERIODACTIVE_REG ((uint8_t)0x88)
  234. /* Report rate in Monitor mode */
  235. #define FT5336_PERIODMONITOR_REG ((uint8_t)0x89)
  236. /* The value of the minimum allowed angle while Rotating gesture mode */
  237. #define FT5336_RADIAN_VALUE_REG ((uint8_t)0x91)
  238. /* Maximum offset while Moving Left and Moving Right gesture */
  239. #define FT5336_OFFSET_LEFT_RIGHT_REG ((uint8_t)0x92)
  240. /* Maximum offset while Moving Up and Moving Down gesture */
  241. #define FT5336_OFFSET_UP_DOWN_REG ((uint8_t)0x93)
  242. /* Minimum distance while Moving Left and Moving Right gesture */
  243. #define FT5336_DISTANCE_LEFT_RIGHT_REG ((uint8_t)0x94)
  244. /* Minimum distance while Moving Up and Moving Down gesture */
  245. #define FT5336_DISTANCE_UP_DOWN_REG ((uint8_t)0x95)
  246. /* Maximum distance while Zoom In and Zoom Out gesture */
  247. #define FT5336_DISTANCE_ZOOM_REG ((uint8_t)0x96)
  248. /* High 8-bit of LIB Version info */
  249. #define FT5336_LIB_VER_H_REG ((uint8_t)0xA1)
  250. /* Low 8-bit of LIB Version info */
  251. #define FT5336_LIB_VER_L_REG ((uint8_t)0xA2)
  252. /* Chip Selecting */
  253. #define FT5336_CIPHER_REG ((uint8_t)0xA3)
  254. /* Interrupt mode register (used when in interrupt mode) */
  255. #define FT5336_GMODE_REG ((uint8_t)0xA4)
  256. #define FT5336_G_MODE_INTERRUPT_MASK ((uint8_t)0x03)
  257. #define FT5336_G_MODE_INTERRUPT_SHIFT ((uint8_t)0x00)
  258. /* Possible values of FT5336_GMODE_REG */
  259. #define FT5336_G_MODE_INTERRUPT_POLLING ((uint8_t)0x00)
  260. #define FT5336_G_MODE_INTERRUPT_TRIGGER ((uint8_t)0x01)
  261. /* Current power mode the FT5336 system is in (R) */
  262. #define FT5336_PWR_MODE_REG ((uint8_t)0xA5)
  263. /* FT5336 firmware version */
  264. #define FT5336_FIRMID_REG ((uint8_t)0xA6)
  265. /* FT5336 Chip identification register */
  266. #define FT5336_CHIP_ID_REG ((uint8_t)0xA8)
  267. /* Possible values of FT5336_CHIP_ID_REG */
  268. #define FT5336_ID_VALUE ((uint8_t)0x51)
  269. /* Release code version */
  270. #define FT5336_RELEASE_CODE_ID_REG ((uint8_t)0xAF)
  271. /* Current operating mode the FT5336 system is in (R) */
  272. #define FT5336_STATE_REG ((uint8_t)0xBC)
  273. /**
  274. * @}
  275. */
  276. /* Exported macro ------------------------------------------------------------*/
  277. /** @defgroup ft5336_Exported_Macros
  278. * @{
  279. */
  280. /* Exported functions --------------------------------------------------------*/
  281. /** @defgroup ft5336_Exported_Functions
  282. * @{
  283. */
  284. /**
  285. * @brief ft5336 Control functions
  286. */
  287. /**
  288. * @brief Initialize the ft5336 communication bus
  289. * from MCU to FT5336 : ie I2C channel initialization (if required).
  290. * @param DeviceAddr: Device address on communication Bus (I2C slave address of FT5336).
  291. * @retval None
  292. */
  293. void ft5336_Init(uint16_t DeviceAddr);
  294. /**
  295. * @brief Software Reset the ft5336.
  296. * @param DeviceAddr: Device address on communication Bus (I2C slave address of FT5336).
  297. * @retval None
  298. */
  299. void ft5336_Reset(uint16_t DeviceAddr);
  300. /**
  301. * @brief Read the ft5336 device ID, pre initialize I2C in case of need to be
  302. * able to read the FT5336 device ID, and verify this is a FT5336.
  303. * @param DeviceAddr: I2C FT5336 Slave address.
  304. * @retval The Device ID (two bytes).
  305. */
  306. uint16_t ft5336_ReadID(uint16_t DeviceAddr);
  307. /**
  308. * @brief Configures the touch Screen IC device to start detecting touches
  309. * @param DeviceAddr: Device address on communication Bus (I2C slave address).
  310. * @retval None.
  311. */
  312. void ft5336_TS_Start(uint16_t DeviceAddr);
  313. /**
  314. * @brief Return if there is touches detected or not.
  315. * Try to detect new touches and forget the old ones (reset internal global
  316. * variables).
  317. * @param DeviceAddr: Device address on communication Bus.
  318. * @retval : Number of active touches detected (can be 0, 1 or 2).
  319. */
  320. uint8_t ft5336_TS_DetectTouch(uint16_t DeviceAddr);
  321. /**
  322. * @brief Get the touch screen X and Y positions values
  323. * Manage multi touch thanks to touch Index global
  324. * variable 'ft5336_handle.currActiveTouchIdx'.
  325. * @param DeviceAddr: Device address on communication Bus.
  326. * @param X: Pointer to X position value
  327. * @param Y: Pointer to Y position value
  328. * @retval None.
  329. */
  330. void ft5336_TS_GetXY(uint16_t DeviceAddr, uint16_t *X, uint16_t *Y);
  331. /**
  332. * @brief Configure the FT5336 device to generate IT on given INT pin
  333. * connected to MCU as EXTI.
  334. * @param DeviceAddr: Device address on communication Bus (Slave I2C address of FT5336).
  335. * @retval None
  336. */
  337. void ft5336_TS_EnableIT(uint16_t DeviceAddr);
  338. /**
  339. * @brief Configure the FT5336 device to stop generating IT on the given INT pin
  340. * connected to MCU as EXTI.
  341. * @param DeviceAddr: Device address on communication Bus (Slave I2C address of FT5336).
  342. * @retval None
  343. */
  344. void ft5336_TS_DisableIT(uint16_t DeviceAddr);
  345. /**
  346. * @brief Get IT status from FT5336 interrupt status registers
  347. * Should be called Following an EXTI coming to the MCU to know the detailed
  348. * reason of the interrupt.
  349. * @param DeviceAddr: Device address on communication Bus (I2C slave address of FT5336).
  350. * @retval TS interrupts status
  351. */
  352. uint8_t ft5336_TS_ITStatus (uint16_t DeviceAddr);
  353. /**
  354. * @brief Clear IT status in FT5336 interrupt status clear registers
  355. * Should be called Following an EXTI coming to the MCU.
  356. * @param DeviceAddr: Device address on communication Bus (I2C slave address of FT5336).
  357. * @retval TS interrupts status
  358. */
  359. void ft5336_TS_ClearIT (uint16_t DeviceAddr);
  360. /**** NEW FEATURES enabled when Multi-touch support is enabled ****/
  361. #if (TS_MULTI_TOUCH_SUPPORTED == 1)
  362. /**
  363. * @brief Get the last touch gesture identification (zoom, move up/down...).
  364. * @param DeviceAddr: Device address on communication Bus (I2C slave address of FT5336).
  365. * @param pGestureId : Pointer to get last touch gesture Identification.
  366. * @retval None.
  367. */
  368. void ft5336_TS_GetGestureID(uint16_t DeviceAddr, uint32_t * pGestureId);
  369. /**
  370. * @brief Get the touch detailed informations on touch number 'touchIdx' (0..1)
  371. * This touch detailed information contains :
  372. * - weight that was applied to this touch
  373. * - sub-area of the touch in the touch panel
  374. * - event of linked to the touch (press down, lift up, ...)
  375. * @param DeviceAddr: Device address on communication Bus (I2C slave address of FT5336).
  376. * @param touchIdx : Passed index of the touch (0..1) on which we want to get the
  377. * detailed information.
  378. * @param pWeight : Pointer to to get the weight information of 'touchIdx'.
  379. * @param pArea : Pointer to to get the sub-area information of 'touchIdx'.
  380. * @param pEvent : Pointer to to get the event information of 'touchIdx'.
  381. * @retval None.
  382. */
  383. void ft5336_TS_GetTouchInfo(uint16_t DeviceAddr,
  384. uint32_t touchIdx,
  385. uint32_t * pWeight,
  386. uint32_t * pArea,
  387. uint32_t * pEvent);
  388. #endif /* TS_MULTI_TOUCH_SUPPORTED == 1 */
  389. /* Imported TS IO functions --------------------------------------------------------*/
  390. /** @defgroup ft5336_Imported_Functions
  391. * @{
  392. */
  393. /* TouchScreen (TS) external IO functions */
  394. extern void TS_IO_Init(void);
  395. extern void TS_IO_Write(uint8_t Addr, uint8_t Reg, uint8_t Value);
  396. extern uint8_t TS_IO_Read(uint8_t Addr, uint8_t Reg);
  397. extern void TS_IO_Delay(uint32_t Delay);
  398. /**
  399. * @}
  400. */
  401. /* Imported global variables --------------------------------------------------------*/
  402. /** @defgroup ft5336_Imported_Globals
  403. * @{
  404. */
  405. /**
  406. * @}
  407. */
  408. #ifdef __cplusplus
  409. }
  410. #endif
  411. #endif /* __FT5336_H */
  412. /**
  413. * @}
  414. */
  415. /**
  416. * @}
  417. */
  418. /**
  419. * @}
  420. */
  421. /**
  422. * @}
  423. */
  424. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/