STM32F769IDiscovery  1.00
uDANTE Audio Networking with STM32F7 DISCO board
Data Structures | Macros | Functions | Variables
ft6x06.h File Reference

This file contains all the functions prototypes for the ft6x06.c IO expander driver. More...

#include "../Common/ts.h"

Go to the source code of this file.

Data Structures

struct  ft6x06_handle_TypeDef
 

Macros

#define TS_MULTI_TOUCH_SUPPORTED   0
 
#define TS_AUTO_CALIBRATION_SUPPORTED   0
 
#define FT_6206_MAX_WIDTH   ((uint16_t)800) /* Touchscreen pad max width */
 
#define FT_6206_MAX_HEIGHT   ((uint16_t)480) /* Touchscreen pad max height */
 
#define FT6206_STATUS_OK   0
 
#define FT6206_STATUS_NOT_OK   1
 
#define FT6206_I2C_NOT_INITIALIZED   0
 
#define FT6206_I2C_INITIALIZED   1
 
#define FT6206_MAX_DETECTABLE_TOUCH   2
 
#define FT6206_DEV_MODE_REG   0x00
 : Definitions for FT6206 I2C register addresses on 8 bit More...
 
#define FT6206_DEV_MODE_WORKING   0x00
 
#define FT6206_DEV_MODE_FACTORY   0x04
 
#define FT6206_DEV_MODE_MASK   0x7
 
#define FT6206_DEV_MODE_SHIFT   4
 
#define FT6206_GEST_ID_REG   0x01
 
#define FT6206_GEST_ID_NO_GESTURE   0x00
 
#define FT6206_GEST_ID_MOVE_UP   0x10
 
#define FT6206_GEST_ID_MOVE_RIGHT   0x14
 
#define FT6206_GEST_ID_MOVE_DOWN   0x18
 
#define FT6206_GEST_ID_MOVE_LEFT   0x1C
 
#define FT6206_GEST_ID_ZOOM_IN   0x48
 
#define FT6206_GEST_ID_ZOOM_OUT   0x49
 
#define FT6206_TD_STAT_REG   0x02
 
#define FT6206_TD_STAT_MASK   0x0F
 
#define FT6206_TD_STAT_SHIFT   0x00
 
#define FT6206_TOUCH_EVT_FLAG_PRESS_DOWN   0x00
 
#define FT6206_TOUCH_EVT_FLAG_LIFT_UP   0x01
 
#define FT6206_TOUCH_EVT_FLAG_CONTACT   0x02
 
#define FT6206_TOUCH_EVT_FLAG_NO_EVENT   0x03
 
#define FT6206_TOUCH_EVT_FLAG_SHIFT   6
 
#define FT6206_TOUCH_EVT_FLAG_MASK   (3 << FT6206_TOUCH_EVT_FLAG_SHIFT)
 
#define FT6206_MSB_MASK   0x0F
 
#define FT6206_MSB_SHIFT   0
 
#define FT6206_LSB_MASK   0xFF
 
#define FT6206_LSB_SHIFT   0
 
#define FT6206_P1_XH_REG   0x03
 
#define FT6206_P1_XL_REG   0x04
 
#define FT6206_P1_YH_REG   0x05
 
#define FT6206_P1_YL_REG   0x06
 
#define FT6206_P1_WEIGHT_REG   0x07
 
#define FT6206_TOUCH_WEIGHT_MASK   0xFF
 
#define FT6206_TOUCH_WEIGHT_SHIFT   0
 
#define FT6206_P1_MISC_REG   0x08
 
#define FT6206_TOUCH_AREA_MASK   (0x04 << 4)
 
#define FT6206_TOUCH_AREA_SHIFT   0x04
 
#define FT6206_P2_XH_REG   0x09
 
#define FT6206_P2_XL_REG   0x0A
 
#define FT6206_P2_YH_REG   0x0B
 
#define FT6206_P2_YL_REG   0x0C
 
#define FT6206_P2_WEIGHT_REG   0x0D
 
#define FT6206_P2_MISC_REG   0x0E
 
#define FT6206_TH_GROUP_REG   0x80
 
#define FT6206_THRESHOLD_MASK   0xFF
 
#define FT6206_THRESHOLD_SHIFT   0
 
#define FT6206_TH_DIFF_REG   0x85
 
#define FT6206_CTRL_REG   0x86
 
#define FT6206_CTRL_KEEP_ACTIVE_MODE   0x00
 
#define FT6206_CTRL_KEEP_AUTO_SWITCH_MONITOR_MODE   0x01
 
#define FT6206_TIMEENTERMONITOR_REG   0x87
 
#define FT6206_PERIODACTIVE_REG   0x88
 
#define FT6206_PERIODMONITOR_REG   0x89
 
#define FT6206_RADIAN_VALUE_REG   0x91
 
#define FT6206_OFFSET_LEFT_RIGHT_REG   0x92
 
#define FT6206_OFFSET_UP_DOWN_REG   0x93
 
#define FT6206_DISTANCE_LEFT_RIGHT_REG   0x94
 
#define FT6206_DISTANCE_UP_DOWN_REG   0x95
 
#define FT6206_DISTANCE_ZOOM_REG   0x96
 
#define FT6206_LIB_VER_H_REG   0xA1
 
#define FT6206_LIB_VER_L_REG   0xA2
 
#define FT6206_CIPHER_REG   0xA3
 
#define FT6206_GMODE_REG   0xA4
 
#define FT6206_G_MODE_INTERRUPT_MASK   0x03
 
#define FT6206_G_MODE_INTERRUPT_SHIFT   0x00
 
#define FT6206_G_MODE_INTERRUPT_POLLING   0x00
 
#define FT6206_G_MODE_INTERRUPT_TRIGGER   0x01
 
#define FT6206_PWR_MODE_REG   0xA5
 
#define FT6206_FIRMID_REG   0xA6
 
#define FT6206_CHIP_ID_REG   0xA8
 
#define FT6206_ID_VALUE   0x11
 
#define FT6206_RELEASE_CODE_ID_REG   0xAF
 
#define FT6206_STATE_REG   0xBC
 

Functions

void ft6x06_Init (uint16_t DeviceAddr)
 ft6x06 Control functions More...
 
void ft6x06_Reset (uint16_t DeviceAddr)
 Software Reset the ft6x06. More...
 
uint16_t ft6x06_ReadID (uint16_t DeviceAddr)
 Read the ft6x06 device ID, pre intitalize I2C in case of need to be able to read the FT6206 device ID, and verify this is a FT6206. More...
 
void ft6x06_TS_Start (uint16_t DeviceAddr)
 Configures the touch Screen IC device to start detecting touches. More...
 
uint8_t ft6x06_TS_DetectTouch (uint16_t DeviceAddr)
 Return if there is touches detected or not. Try to detect new touches and forget the old ones (reset internal global variables). More...
 
void ft6x06_TS_GetXY (uint16_t DeviceAddr, uint16_t *X, uint16_t *Y)
 Get the touch screen X and Y positions values Manage multi touch thanks to touch Index global variable 'ft6x06_handle.currActiveTouchIdx'. More...
 
void ft6x06_TS_EnableIT (uint16_t DeviceAddr)
 Configure the FT6206 device to generate IT on given INT pin connected to MCU as EXTI. More...
 
void ft6x06_TS_DisableIT (uint16_t DeviceAddr)
 Configure the FT6206 device to stop generating IT on the given INT pin connected to MCU as EXTI. More...
 
uint8_t ft6x06_TS_ITStatus (uint16_t DeviceAddr)
 Get IT status from FT6206 interrupt status registers Should be called Following an EXTI coming to the MCU to know the detailed reason of the interrupt. More...
 
void ft6x06_TS_ClearIT (uint16_t DeviceAddr)
 Clear IT status in FT6206 interrupt status clear registers Should be called Following an EXTI coming to the MCU. More...
 
void TS_IO_Init (void)
 Initializes Touchscreen low level. More...
 
void TS_IO_Write (uint8_t Addr, uint8_t Reg, uint8_t Value)
 Writes a single data. More...
 
uint8_t TS_IO_Read (uint8_t Addr, uint8_t Reg)
 Reads a single data. More...
 
uint16_t TS_IO_ReadMultiple (uint8_t Addr, uint8_t Reg, uint8_t *Buffer, uint16_t Length)
 Reads multiple data with I2C communication channel from TouchScreen. More...
 
void TS_IO_Delay (uint32_t Delay)
 Delay function used in TouchScreen low level driver. More...
 

Variables

TS_DrvTypeDef ft6x06_ts_drv
 

Detailed Description

This file contains all the functions prototypes for the ft6x06.c IO expander driver.

Author
MCD Application Team
Version
V1.0.0
Date
03-August-2015
Attention

© COPYRIGHT(c) 2015 STMicroelectronics

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of STMicroelectronics nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file ft6x06.h.

Macro Definition Documentation

#define TS_AUTO_CALIBRATION_SUPPORTED   0

Definition at line 54 of file ft6x06.h.

#define TS_MULTI_TOUCH_SUPPORTED   0

Definition at line 49 of file ft6x06.h.