STM32746G-Discovery board drivers V1.0.0
Dependents: F746_SD_GraphicEqualizer_ren0620
Fork of BSP_DISCO_F746NG by
ft5336.h
00001 /** 00002 ****************************************************************************** 00003 * @file ft5336.h 00004 * @author MCD Application Team 00005 * @version V1.0.0 00006 * @date 25-June-2015 00007 * @brief This file contains all the functions prototypes for the 00008 * ft5336.c Touch screen driver. 00009 ****************************************************************************** 00010 * @attention 00011 * 00012 * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> 00013 * 00014 * Redistribution and use in source and binary forms, with or without modification, 00015 * are permitted provided that the following conditions are met: 00016 * 1. Redistributions of source code must retain the above copyright notice, 00017 * this list of conditions and the following disclaimer. 00018 * 2. Redistributions in binary form must reproduce the above copyright notice, 00019 * this list of conditions and the following disclaimer in the documentation 00020 * and/or other materials provided with the distribution. 00021 * 3. Neither the name of STMicroelectronics nor the names of its contributors 00022 * may be used to endorse or promote products derived from this software 00023 * without specific prior written permission. 00024 * 00025 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00026 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00027 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00028 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 00029 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00030 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 00031 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 00032 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 00033 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00034 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00035 * 00036 ****************************************************************************** 00037 */ 00038 00039 /* Define to prevent recursive inclusion -------------------------------------*/ 00040 #ifndef __FT5336_H 00041 #define __FT5336_H 00042 00043 #ifdef __cplusplus 00044 extern "C" { 00045 #endif 00046 00047 /* Set Multi-touch as supported */ 00048 #if !defined(TS_MONO_TOUCH_SUPPORTED) 00049 #define TS_MULTI_TOUCH_SUPPORTED 1 00050 #endif /* TS_MONO_TOUCH_SUPPORTED */ 00051 00052 /* Includes ------------------------------------------------------------------*/ 00053 #include "ts.h" 00054 00055 /* Macros --------------------------------------------------------------------*/ 00056 00057 #if defined(FT5336_ENABLE_ASSERT) 00058 /* Assert activated */ 00059 #define FT5336_ASSERT(__condition__) do { if(__condition__) \ 00060 { \ 00061 while(1); \ 00062 } \ 00063 }while(0) 00064 #else 00065 /* Assert not activated : macro has no effect */ 00066 #define FT5336_ASSERT(__condition__) do { if(__condition__) \ 00067 { \ 00068 ; \ 00069 } \ 00070 }while(0) 00071 #endif /* FT5336_ENABLE_ASSERT == 1 */ 00072 00073 /** @typedef ft5336_handle_TypeDef 00074 * ft5336 Handle definition. 00075 */ 00076 typedef struct 00077 { 00078 uint8_t i2cInitialized; 00079 00080 /* field holding the current number of simultaneous active touches */ 00081 uint8_t currActiveTouchNb; 00082 00083 /* field holding the touch index currently managed */ 00084 uint8_t currActiveTouchIdx; 00085 00086 } ft5336_handle_TypeDef; 00087 00088 /** @addtogroup BSP 00089 * @{ 00090 */ 00091 00092 /** @addtogroup Component 00093 * @{ 00094 */ 00095 00096 /** @defgroup FT5336 00097 * @{ 00098 */ 00099 00100 /* Exported types ------------------------------------------------------------*/ 00101 00102 /** @defgroup FT5336_Exported_Types 00103 * @{ 00104 */ 00105 00106 /* Exported constants --------------------------------------------------------*/ 00107 00108 /** @defgroup FT5336_Exported_Constants 00109 * @{ 00110 */ 00111 00112 /* I2C Slave address of touchscreen FocalTech FT5336 */ 00113 #define FT5336_I2C_SLAVE_ADDRESS ((uint8_t)0x70) 00114 00115 /* Maximum border values of the touchscreen pad */ 00116 #define FT5336_MAX_WIDTH ((uint16_t)480) /* Touchscreen pad max width */ 00117 #define FT5336_MAX_HEIGHT ((uint16_t)272) /* Touchscreen pad max height */ 00118 00119 /* Possible values of driver functions return status */ 00120 #define FT5336_STATUS_OK ((uint8_t)0x00) 00121 #define FT5336_STATUS_NOT_OK ((uint8_t)0x01) 00122 00123 /* Possible values of global variable 'TS_I2C_Initialized' */ 00124 #define FT5336_I2C_NOT_INITIALIZED ((uint8_t)0x00) 00125 #define FT5336_I2C_INITIALIZED ((uint8_t)0x01) 00126 00127 /* Max detectable simultaneous touches */ 00128 #define FT5336_MAX_DETECTABLE_TOUCH ((uint8_t)0x05) 00129 00130 /** 00131 * @brief : Definitions for FT5336 I2C register addresses on 8 bit 00132 **/ 00133 00134 /* Current mode register of the FT5336 (R/W) */ 00135 #define FT5336_DEV_MODE_REG ((uint8_t)0x00) 00136 00137 /* Possible values of FT5336_DEV_MODE_REG */ 00138 #define FT5336_DEV_MODE_WORKING ((uint8_t)0x00) 00139 #define FT5336_DEV_MODE_FACTORY ((uint8_t)0x04) 00140 00141 #define FT5336_DEV_MODE_MASK ((uint8_t)0x07) 00142 #define FT5336_DEV_MODE_SHIFT ((uint8_t)0x04) 00143 00144 /* Gesture ID register */ 00145 #define FT5336_GEST_ID_REG ((uint8_t)0x01) 00146 00147 /* Possible values of FT5336_GEST_ID_REG */ 00148 #define FT5336_GEST_ID_NO_GESTURE ((uint8_t)0x00) 00149 #define FT5336_GEST_ID_MOVE_UP ((uint8_t)0x10) 00150 #define FT5336_GEST_ID_MOVE_RIGHT ((uint8_t)0x14) 00151 #define FT5336_GEST_ID_MOVE_DOWN ((uint8_t)0x18) 00152 #define FT5336_GEST_ID_MOVE_LEFT ((uint8_t)0x1C) 00153 #define FT5336_GEST_ID_SINGLE_CLICK ((uint8_t)0x20) 00154 #define FT5336_GEST_ID_DOUBLE_CLICK ((uint8_t)0x22) 00155 #define FT5336_GEST_ID_ROTATE_CLOCKWISE ((uint8_t)0x28) 00156 #define FT5336_GEST_ID_ROTATE_C_CLOCKWISE ((uint8_t)0x29) 00157 #define FT5336_GEST_ID_ZOOM_IN ((uint8_t)0x40) 00158 #define FT5336_GEST_ID_ZOOM_OUT ((uint8_t)0x49) 00159 00160 /* Touch Data Status register : gives number of active touch points (0..5) */ 00161 #define FT5336_TD_STAT_REG ((uint8_t)0x02) 00162 00163 /* Values related to FT5336_TD_STAT_REG */ 00164 #define FT5336_TD_STAT_MASK ((uint8_t)0x0F) 00165 #define FT5336_TD_STAT_SHIFT ((uint8_t)0x00) 00166 00167 /* Values Pn_XH and Pn_YH related */ 00168 #define FT5336_TOUCH_EVT_FLAG_PRESS_DOWN ((uint8_t)0x00) 00169 #define FT5336_TOUCH_EVT_FLAG_LIFT_UP ((uint8_t)0x01) 00170 #define FT5336_TOUCH_EVT_FLAG_CONTACT ((uint8_t)0x02) 00171 #define FT5336_TOUCH_EVT_FLAG_NO_EVENT ((uint8_t)0x03) 00172 00173 #define FT5336_TOUCH_EVT_FLAG_SHIFT ((uint8_t)0x06) 00174 #define FT5336_TOUCH_EVT_FLAG_MASK ((uint8_t)(3 << FT5336_TOUCH_EVT_FLAG_SHIFT)) 00175 00176 #define FT5336_TOUCH_POS_MSB_MASK ((uint8_t)0x0F) 00177 #define FT5336_TOUCH_POS_MSB_SHIFT ((uint8_t)0x00) 00178 00179 /* Values Pn_XL and Pn_YL related */ 00180 #define FT5336_TOUCH_POS_LSB_MASK ((uint8_t)0xFF) 00181 #define FT5336_TOUCH_POS_LSB_SHIFT ((uint8_t)0x00) 00182 00183 #define FT5336_P1_XH_REG ((uint8_t)0x03) 00184 #define FT5336_P1_XL_REG ((uint8_t)0x04) 00185 #define FT5336_P1_YH_REG ((uint8_t)0x05) 00186 #define FT5336_P1_YL_REG ((uint8_t)0x06) 00187 00188 /* Touch Pressure register value (R) */ 00189 #define FT5336_P1_WEIGHT_REG ((uint8_t)0x07) 00190 00191 /* Values Pn_WEIGHT related */ 00192 #define FT5336_TOUCH_WEIGHT_MASK ((uint8_t)0xFF) 00193 #define FT5336_TOUCH_WEIGHT_SHIFT ((uint8_t)0x00) 00194 00195 /* Touch area register */ 00196 #define FT5336_P1_MISC_REG ((uint8_t)0x08) 00197 00198 /* Values related to FT5336_Pn_MISC_REG */ 00199 #define FT5336_TOUCH_AREA_MASK ((uint8_t)(0x04 << 4)) 00200 #define FT5336_TOUCH_AREA_SHIFT ((uint8_t)0x04) 00201 00202 #define FT5336_P2_XH_REG ((uint8_t)0x09) 00203 #define FT5336_P2_XL_REG ((uint8_t)0x0A) 00204 #define FT5336_P2_YH_REG ((uint8_t)0x0B) 00205 #define FT5336_P2_YL_REG ((uint8_t)0x0C) 00206 #define FT5336_P2_WEIGHT_REG ((uint8_t)0x0D) 00207 #define FT5336_P2_MISC_REG ((uint8_t)0x0E) 00208 00209 #define FT5336_P3_XH_REG ((uint8_t)0x0F) 00210 #define FT5336_P3_XL_REG ((uint8_t)0x10) 00211 #define FT5336_P3_YH_REG ((uint8_t)0x11) 00212 #define FT5336_P3_YL_REG ((uint8_t)0x12) 00213 #define FT5336_P3_WEIGHT_REG ((uint8_t)0x13) 00214 #define FT5336_P3_MISC_REG ((uint8_t)0x14) 00215 00216 #define FT5336_P4_XH_REG ((uint8_t)0x15) 00217 #define FT5336_P4_XL_REG ((uint8_t)0x16) 00218 #define FT5336_P4_YH_REG ((uint8_t)0x17) 00219 #define FT5336_P4_YL_REG ((uint8_t)0x18) 00220 #define FT5336_P4_WEIGHT_REG ((uint8_t)0x19) 00221 #define FT5336_P4_MISC_REG ((uint8_t)0x1A) 00222 00223 #define FT5336_P5_XH_REG ((uint8_t)0x1B) 00224 #define FT5336_P5_XL_REG ((uint8_t)0x1C) 00225 #define FT5336_P5_YH_REG ((uint8_t)0x1D) 00226 #define FT5336_P5_YL_REG ((uint8_t)0x1E) 00227 #define FT5336_P5_WEIGHT_REG ((uint8_t)0x1F) 00228 #define FT5336_P5_MISC_REG ((uint8_t)0x20) 00229 00230 #define FT5336_P6_XH_REG ((uint8_t)0x21) 00231 #define FT5336_P6_XL_REG ((uint8_t)0x22) 00232 #define FT5336_P6_YH_REG ((uint8_t)0x23) 00233 #define FT5336_P6_YL_REG ((uint8_t)0x24) 00234 #define FT5336_P6_WEIGHT_REG ((uint8_t)0x25) 00235 #define FT5336_P6_MISC_REG ((uint8_t)0x26) 00236 00237 #define FT5336_P7_XH_REG ((uint8_t)0x27) 00238 #define FT5336_P7_XL_REG ((uint8_t)0x28) 00239 #define FT5336_P7_YH_REG ((uint8_t)0x29) 00240 #define FT5336_P7_YL_REG ((uint8_t)0x2A) 00241 #define FT5336_P7_WEIGHT_REG ((uint8_t)0x2B) 00242 #define FT5336_P7_MISC_REG ((uint8_t)0x2C) 00243 00244 #define FT5336_P8_XH_REG ((uint8_t)0x2D) 00245 #define FT5336_P8_XL_REG ((uint8_t)0x2E) 00246 #define FT5336_P8_YH_REG ((uint8_t)0x2F) 00247 #define FT5336_P8_YL_REG ((uint8_t)0x30) 00248 #define FT5336_P8_WEIGHT_REG ((uint8_t)0x31) 00249 #define FT5336_P8_MISC_REG ((uint8_t)0x32) 00250 00251 #define FT5336_P9_XH_REG ((uint8_t)0x33) 00252 #define FT5336_P9_XL_REG ((uint8_t)0x34) 00253 #define FT5336_P9_YH_REG ((uint8_t)0x35) 00254 #define FT5336_P9_YL_REG ((uint8_t)0x36) 00255 #define FT5336_P9_WEIGHT_REG ((uint8_t)0x37) 00256 #define FT5336_P9_MISC_REG ((uint8_t)0x38) 00257 00258 #define FT5336_P10_XH_REG ((uint8_t)0x39) 00259 #define FT5336_P10_XL_REG ((uint8_t)0x3A) 00260 #define FT5336_P10_YH_REG ((uint8_t)0x3B) 00261 #define FT5336_P10_YL_REG ((uint8_t)0x3C) 00262 #define FT5336_P10_WEIGHT_REG ((uint8_t)0x3D) 00263 #define FT5336_P10_MISC_REG ((uint8_t)0x3E) 00264 00265 /* Threshold for touch detection */ 00266 #define FT5336_TH_GROUP_REG ((uint8_t)0x80) 00267 00268 /* Values FT5336_TH_GROUP_REG : threshold related */ 00269 #define FT5336_THRESHOLD_MASK ((uint8_t)0xFF) 00270 #define FT5336_THRESHOLD_SHIFT ((uint8_t)0x00) 00271 00272 /* Filter function coefficients */ 00273 #define FT5336_TH_DIFF_REG ((uint8_t)0x85) 00274 00275 /* Control register */ 00276 #define FT5336_CTRL_REG ((uint8_t)0x86) 00277 00278 /* Values related to FT5336_CTRL_REG */ 00279 00280 /* Will keep the Active mode when there is no touching */ 00281 #define FT5336_CTRL_KEEP_ACTIVE_MODE ((uint8_t)0x00) 00282 00283 /* Switching from Active mode to Monitor mode automatically when there is no touching */ 00284 #define FT5336_CTRL_KEEP_AUTO_SWITCH_MONITOR_MODE ((uint8_t)0x01 00285 00286 /* The time period of switching from Active mode to Monitor mode when there is no touching */ 00287 #define FT5336_TIMEENTERMONITOR_REG ((uint8_t)0x87) 00288 00289 /* Report rate in Active mode */ 00290 #define FT5336_PERIODACTIVE_REG ((uint8_t)0x88) 00291 00292 /* Report rate in Monitor mode */ 00293 #define FT5336_PERIODMONITOR_REG ((uint8_t)0x89) 00294 00295 /* The value of the minimum allowed angle while Rotating gesture mode */ 00296 #define FT5336_RADIAN_VALUE_REG ((uint8_t)0x91) 00297 00298 /* Maximum offset while Moving Left and Moving Right gesture */ 00299 #define FT5336_OFFSET_LEFT_RIGHT_REG ((uint8_t)0x92) 00300 00301 /* Maximum offset while Moving Up and Moving Down gesture */ 00302 #define FT5336_OFFSET_UP_DOWN_REG ((uint8_t)0x93) 00303 00304 /* Minimum distance while Moving Left and Moving Right gesture */ 00305 #define FT5336_DISTANCE_LEFT_RIGHT_REG ((uint8_t)0x94) 00306 00307 /* Minimum distance while Moving Up and Moving Down gesture */ 00308 #define FT5336_DISTANCE_UP_DOWN_REG ((uint8_t)0x95) 00309 00310 /* Maximum distance while Zoom In and Zoom Out gesture */ 00311 #define FT5336_DISTANCE_ZOOM_REG ((uint8_t)0x96) 00312 00313 /* High 8-bit of LIB Version info */ 00314 #define FT5336_LIB_VER_H_REG ((uint8_t)0xA1) 00315 00316 /* Low 8-bit of LIB Version info */ 00317 #define FT5336_LIB_VER_L_REG ((uint8_t)0xA2) 00318 00319 /* Chip Selecting */ 00320 #define FT5336_CIPHER_REG ((uint8_t)0xA3) 00321 00322 /* Interrupt mode register (used when in interrupt mode) */ 00323 #define FT5336_GMODE_REG ((uint8_t)0xA4) 00324 00325 #define FT5336_G_MODE_INTERRUPT_MASK ((uint8_t)0x03) 00326 #define FT5336_G_MODE_INTERRUPT_SHIFT ((uint8_t)0x00) 00327 00328 /* Possible values of FT5336_GMODE_REG */ 00329 #define FT5336_G_MODE_INTERRUPT_POLLING ((uint8_t)0x00) 00330 #define FT5336_G_MODE_INTERRUPT_TRIGGER ((uint8_t)0x01) 00331 00332 /* Current power mode the FT5336 system is in (R) */ 00333 #define FT5336_PWR_MODE_REG ((uint8_t)0xA5) 00334 00335 /* FT5336 firmware version */ 00336 #define FT5336_FIRMID_REG ((uint8_t)0xA6) 00337 00338 /* FT5336 Chip identification register */ 00339 #define FT5336_CHIP_ID_REG ((uint8_t)0xA8) 00340 00341 /* Possible values of FT5336_CHIP_ID_REG */ 00342 #define FT5336_ID_VALUE ((uint8_t)0x51) 00343 00344 /* Release code version */ 00345 #define FT5336_RELEASE_CODE_ID_REG ((uint8_t)0xAF) 00346 00347 /* Current operating mode the FT5336 system is in (R) */ 00348 #define FT5336_STATE_REG ((uint8_t)0xBC) 00349 00350 /** 00351 * @} 00352 */ 00353 00354 /* Exported macro ------------------------------------------------------------*/ 00355 00356 /** @defgroup ft5336_Exported_Macros 00357 * @{ 00358 */ 00359 00360 /* Exported functions --------------------------------------------------------*/ 00361 00362 /** @defgroup ft5336_Exported_Functions 00363 * @{ 00364 */ 00365 00366 /** 00367 * @brief ft5336 Control functions 00368 */ 00369 00370 00371 /** 00372 * @brief Initialize the ft5336 communication bus 00373 * from MCU to FT5336 : ie I2C channel initialization (if required). 00374 * @param DeviceAddr: Device address on communication Bus (I2C slave address of FT5336). 00375 * @retval None 00376 */ 00377 void ft5336_Init(uint16_t DeviceAddr); 00378 00379 /** 00380 * @brief Software Reset the ft5336. 00381 * @param DeviceAddr: Device address on communication Bus (I2C slave address of FT5336). 00382 * @retval None 00383 */ 00384 void ft5336_Reset(uint16_t DeviceAddr); 00385 00386 /** 00387 * @brief Read the ft5336 device ID, pre initialize I2C in case of need to be 00388 * able to read the FT5336 device ID, and verify this is a FT5336. 00389 * @param DeviceAddr: I2C FT5336 Slave address. 00390 * @retval The Device ID (two bytes). 00391 */ 00392 uint16_t ft5336_ReadID(uint16_t DeviceAddr); 00393 00394 /** 00395 * @brief Configures the touch Screen IC device to start detecting touches 00396 * @param DeviceAddr: Device address on communication Bus (I2C slave address). 00397 * @retval None. 00398 */ 00399 void ft5336_TS_Start(uint16_t DeviceAddr); 00400 00401 /** 00402 * @brief Return if there is touches detected or not. 00403 * Try to detect new touches and forget the old ones (reset internal global 00404 * variables). 00405 * @param DeviceAddr: Device address on communication Bus. 00406 * @retval : Number of active touches detected (can be 0, 1 or 2). 00407 */ 00408 uint8_t ft5336_TS_DetectTouch(uint16_t DeviceAddr); 00409 00410 /** 00411 * @brief Get the touch screen X and Y positions values 00412 * Manage multi touch thanks to touch Index global 00413 * variable 'ft5336_handle.currActiveTouchIdx'. 00414 * @param DeviceAddr: Device address on communication Bus. 00415 * @param X: Pointer to X position value 00416 * @param Y: Pointer to Y position value 00417 * @retval None. 00418 */ 00419 void ft5336_TS_GetXY(uint16_t DeviceAddr, uint16_t *X, uint16_t *Y); 00420 00421 /** 00422 * @brief Configure the FT5336 device to generate IT on given INT pin 00423 * connected to MCU as EXTI. 00424 * @param DeviceAddr: Device address on communication Bus (Slave I2C address of FT5336). 00425 * @retval None 00426 */ 00427 void ft5336_TS_EnableIT(uint16_t DeviceAddr); 00428 00429 /** 00430 * @brief Configure the FT5336 device to stop generating IT on the given INT pin 00431 * connected to MCU as EXTI. 00432 * @param DeviceAddr: Device address on communication Bus (Slave I2C address of FT5336). 00433 * @retval None 00434 */ 00435 void ft5336_TS_DisableIT(uint16_t DeviceAddr); 00436 00437 /** 00438 * @brief Get IT status from FT5336 interrupt status registers 00439 * Should be called Following an EXTI coming to the MCU to know the detailed 00440 * reason of the interrupt. 00441 * @param DeviceAddr: Device address on communication Bus (I2C slave address of FT5336). 00442 * @retval TS interrupts status 00443 */ 00444 uint8_t ft5336_TS_ITStatus (uint16_t DeviceAddr); 00445 00446 /** 00447 * @brief Clear IT status in FT5336 interrupt status clear registers 00448 * Should be called Following an EXTI coming to the MCU. 00449 * @param DeviceAddr: Device address on communication Bus (I2C slave address of FT5336). 00450 * @retval TS interrupts status 00451 */ 00452 void ft5336_TS_ClearIT (uint16_t DeviceAddr); 00453 00454 /**** NEW FEATURES enabled when Multi-touch support is enabled ****/ 00455 00456 #if (TS_MULTI_TOUCH_SUPPORTED == 1) 00457 00458 /** 00459 * @brief Get the last touch gesture identification (zoom, move up/down...). 00460 * @param DeviceAddr: Device address on communication Bus (I2C slave address of FT5336). 00461 * @param pGestureId : Pointer to get last touch gesture Identification. 00462 * @retval None. 00463 */ 00464 void ft5336_TS_GetGestureID(uint16_t DeviceAddr, uint32_t * pGestureId); 00465 00466 /** 00467 * @brief Get the touch detailed informations on touch number 'touchIdx' (0..1) 00468 * This touch detailed information contains : 00469 * - weight that was applied to this touch 00470 * - sub-area of the touch in the touch panel 00471 * - event of linked to the touch (press down, lift up, ...) 00472 * @param DeviceAddr: Device address on communication Bus (I2C slave address of FT5336). 00473 * @param touchIdx : Passed index of the touch (0..1) on which we want to get the 00474 * detailed information. 00475 * @param pWeight : Pointer to to get the weight information of 'touchIdx'. 00476 * @param pArea : Pointer to to get the sub-area information of 'touchIdx'. 00477 * @param pEvent : Pointer to to get the event information of 'touchIdx'. 00478 00479 * @retval None. 00480 */ 00481 void ft5336_TS_GetTouchInfo(uint16_t DeviceAddr, 00482 uint32_t touchIdx, 00483 uint32_t * pWeight, 00484 uint32_t * pArea, 00485 uint32_t * pEvent); 00486 00487 #endif /* TS_MULTI_TOUCH_SUPPORTED == 1 */ 00488 00489 /* Imported TS IO functions --------------------------------------------------------*/ 00490 00491 /** @defgroup ft5336_Imported_Functions 00492 * @{ 00493 */ 00494 00495 /* TouchScreen (TS) external IO functions */ 00496 extern void TS_IO_Init(void); 00497 extern void TS_IO_Write(uint8_t Addr, uint8_t Reg, uint8_t Value); 00498 extern uint8_t TS_IO_Read(uint8_t Addr, uint8_t Reg); 00499 extern void TS_IO_Delay(uint32_t Delay); 00500 00501 /** 00502 * @} 00503 */ 00504 00505 /* Imported global variables --------------------------------------------------------*/ 00506 00507 /** @defgroup ft5336_Imported_Globals 00508 * @{ 00509 */ 00510 00511 00512 /* Touch screen driver structure */ 00513 extern TS_DrvTypeDef ft5336_ts_drv; 00514 00515 /** 00516 * @} 00517 */ 00518 00519 #ifdef __cplusplus 00520 } 00521 #endif 00522 #endif /* __FT5336_H */ 00523 00524 00525 /** 00526 * @} 00527 */ 00528 00529 /** 00530 * @} 00531 */ 00532 00533 /** 00534 * @} 00535 */ 00536 00537 /** 00538 * @} 00539 */ 00540 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Generated on Tue Jul 12 2022 18:43:04 by 1.7.2