Skip to content

Commit d599a82

Browse files
committed
Release v1.26.0
1 parent b955779 commit d599a82

16,917 files changed

Lines changed: 167042 additions & 386529 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Drivers/BSP/Components/ft6x06/Release_Notes.html

Lines changed: 88 additions & 176 deletions
Large diffs are not rendered by default.

Drivers/BSP/Components/ft6x06/_htmresc/mini-st.css

Lines changed: 1700 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
18.2 KB
Loading

Drivers/BSP/Components/ft6x06/ft6x06.c

Lines changed: 46 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,18 @@
22
******************************************************************************
33
* @file ft6x06.c
44
* @author MCD Application Team
5-
* @version V1.0.1
6-
* @date 03-May-2016
75
* @brief This file provides a set of functions needed to manage the FT6X06
86
* IO Expander devices.
97
******************************************************************************
108
* @attention
119
*
12-
* <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
10+
* <h2><center>&copy; Copyright (c) 2016 STMicroelectronics.
11+
* All rights reserved.</center></h2>
1312
*
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.
13+
* This software component is licensed by ST under BSD 3-Clause license,
14+
* the "License"; You may not use this file except in compliance with the
15+
* License. You may obtain a copy of the License at:
16+
* opensource.org/licenses/BSD-3-Clause
3517
*
3618
******************************************************************************
3719
*/
@@ -47,13 +29,13 @@
4729
* @{
4830
*/
4931

50-
/** @defgroup FT6X06
32+
/** @defgroup FT6XX6
5133
* @{
5234
*/
5335

5436
/* Private typedef -----------------------------------------------------------*/
5537

56-
/** @defgroup FT6X06_Private_Defines FT6X06 Private Defines
38+
/** @defgroup FT6XX6_Private_Defines FT6XX6 Private Defines
5739
* @{
5840
*/
5941
#define FT6x06_MAX_INSTANCE 2
@@ -63,7 +45,7 @@
6345

6446
/* Private macro -------------------------------------------------------------*/
6547

66-
/** @defgroup FT6X06_Private_Variables FT6X06 Private Variables
48+
/** @defgroup FT6XX6_Private_Variables FT6XX6 Private Variables
6749
* @{
6850
*/
6951

@@ -84,33 +66,33 @@ TS_DrvTypeDef ft6x06_ts_drv =
8466
ft6x06_TS_DisableIT
8567
};
8668

87-
/* ft6x06 instances by address */
69+
/* ft6xx6 instances by address */
8870
uint8_t ft6x06[FT6x06_MAX_INSTANCE] = {0};
8971

90-
/* Global ft6x06 handle */
72+
/* Global ft6xx6 handle */
9173
static ft6x06_handle_TypeDef ft6x06_handle = { FT6206_I2C_NOT_INITIALIZED, 0, 0};
9274

9375
/**
9476
* @}
9577
*/
9678

97-
/** @defgroup ft6x06_Private_Function_Prototypes ft6x06 Private Function Prototypes
79+
/** @defgroup ft6xx6_Private_Function_Prototypes ft6xx6 Private Function Prototypes
9880
* @{
9981
*/
10082
static uint8_t ft6x06_GetInstance(uint16_t DeviceAddr);
10183
/* Private functions prototypes-----------------------------------------------*/
10284
#if (TS_AUTO_CALIBRATION_SUPPORTED == 1)
10385
/**
10486
* @brief Start TouchScreen calibration phase
105-
* @param DeviceAddr: FT6206 Device address for communication on I2C Bus.
87+
* @param DeviceAddr: FT6xx6 Device address for communication on I2C Bus.
10688
* @retval Status FT6206_STATUS_OK or FT6206_STATUS_NOT_OK.
10789
*/
10890
static uint32_t ft6x06_TS_Calibration(uint16_t DeviceAddr);
10991
#endif /* TS_AUTO_CALIBRATION_SUPPORTED == 1 */
11092

11193
/**
11294
* @brief Basic static configuration of TouchScreen
113-
* @param DeviceAddr: FT6206 Device address for communication on I2C Bus.
95+
* @param DeviceAddr: FT6xx6 Device address for communication on I2C Bus.
11496
* @retval Status FT6206_STATUS_OK or FT6206_STATUS_NOT_OK.
11597
*/
11698
static uint32_t ft6x06_TS_Configure(uint16_t DeviceAddr);
@@ -119,14 +101,14 @@ static uint32_t ft6x06_TS_Configure(uint16_t DeviceAddr);
119101
* @}
120102
*/
121103

122-
/** @defgroup ft6x06_Private_Functions ft6x06 Private Functions
104+
/** @defgroup ft6xx6_Private_Functions ft6xx6 Private Functions
123105
* @{
124106
*/
125107

126108
/**
127-
* @brief Initialize the ft6x06 communication bus
128-
* from MCU to FT6206 : ie I2C channel initialization (if required).
129-
* @param DeviceAddr: Device address on communication Bus (I2C slave address of FT6206).
109+
* @brief Initialize the ft6xx6 communication bus
110+
* from MCU to FT6xx6 : ie I2C channel initialization (if required).
111+
* @param DeviceAddr: Device address on communication Bus (I2C slave address of FT6xx6).
130112
* @retval None
131113
*/
132114
void ft6x06_Init(uint16_t DeviceAddr)
@@ -155,21 +137,21 @@ void ft6x06_Init(uint16_t DeviceAddr)
155137
}
156138

157139
/**
158-
* @brief Software Reset the ft6x06.
159-
* @note : Not applicable to FT6206.
160-
* @param DeviceAddr: Device address on communication Bus (I2C slave address of FT6206).
140+
* @brief Software Reset the ft6xx6.
141+
* @note : Not applicable to FT6xx6.
142+
* @param DeviceAddr: Device address on communication Bus (I2C slave address of FT6xx6).
161143
* @retval None
162144
*/
163145
void ft6x06_Reset(uint16_t DeviceAddr)
164146
{
165147
/* Do nothing */
166-
/* No software reset sequence available in FT6206 IC */
148+
/* No software reset sequence available in FT6xx6 IC */
167149
}
168150

169151
/**
170-
* @brief Read the ft6x06 device ID, pre initialize I2C in case of need to be
171-
* able to read the FT6206 device ID, and verify this is a FT6206.
172-
* @param DeviceAddr: I2C FT6x06 Slave address.
152+
* @brief Read the ft6xx6 device ID, pre initialize I2C in case of need to be
153+
* able to read the FT6xx6 device ID, and verify this is a FT6xx6.
154+
* @param DeviceAddr: I2C FT6xx6 Slave address.
173155
* @retval The Device ID (two bytes).
174156
*/
175157
uint16_t ft6x06_ReadID(uint16_t DeviceAddr)
@@ -195,10 +177,10 @@ void ft6x06_TS_Start(uint16_t DeviceAddr)
195177
/* This is called internal calibration of the touch screen */
196178
ft6x06_TS_Calibration(DeviceAddr);
197179
#endif
198-
/* Minimum static configuration of FT6206 */
180+
/* Minimum static configuration of FT6xx6 */
199181
ft6x06_TS_Configure(DeviceAddr);
200182

201-
/* By default set FT6206 IC in Polling mode : no INT generation on FT6206 for new touch available */
183+
/* By default set FT6xx6 IC in Polling mode : no INT generation on FT6xx6 for new touch available */
202184
/* Note TS_INT is active low */
203185
ft6x06_TS_DisableIT(DeviceAddr);
204186
}
@@ -224,7 +206,7 @@ uint8_t ft6x06_TS_DetectTouch(uint16_t DeviceAddr)
224206
nbTouch = 0;
225207
}
226208

227-
/* Update ft6x06 driver internal global : current number of active touches */
209+
/* Update ft6xx6 driver internal global : current number of active touches */
228210
ft6x06_handle.currActiveTouchNb = nbTouch;
229211

230212
/* Reset current active touch index on which to work on */
@@ -276,9 +258,9 @@ void ft6x06_TS_GetXY(uint16_t DeviceAddr, uint16_t *X, uint16_t *Y)
276258
}
277259

278260
/**
279-
* @brief Configure the FT6206 device to generate IT on given INT pin
261+
* @brief Configure the FT6xx6 device to generate IT on given INT pin
280262
* connected to MCU as EXTI.
281-
* @param DeviceAddr: Device address on communication Bus (Slave I2C address of FT6206).
263+
* @param DeviceAddr: Device address on communication Bus (Slave I2C address of FT6xx6).
282264
* @retval None
283265
*/
284266
void ft6x06_TS_EnableIT(uint16_t DeviceAddr)
@@ -291,9 +273,9 @@ void ft6x06_TS_EnableIT(uint16_t DeviceAddr)
291273
}
292274

293275
/**
294-
* @brief Configure the FT6206 device to stop generating IT on the given INT pin
276+
* @brief Configure the FT6xx6 device to stop generating IT on the given INT pin
295277
* connected to MCU as EXTI.
296-
* @param DeviceAddr: Device address on communication Bus (Slave I2C address of FT6206).
278+
* @param DeviceAddr: Device address on communication Bus (Slave I2C address of FT6xx6).
297279
* @retval None
298280
*/
299281
void ft6x06_TS_DisableIT(uint16_t DeviceAddr)
@@ -306,37 +288,37 @@ void ft6x06_TS_DisableIT(uint16_t DeviceAddr)
306288
}
307289

308290
/**
309-
* @brief Get IT status from FT6206 interrupt status registers
291+
* @brief Get IT status from FT6xx6 interrupt status registers
310292
* Should be called Following an EXTI coming to the MCU to know the detailed
311293
* reason of the interrupt.
312-
* @note : This feature is not applicable to FT6206.
313-
* @param DeviceAddr: Device address on communication Bus (I2C slave address of FT6206).
294+
* @note : This feature is not applicable to FT6xx6.
295+
* @param DeviceAddr: Device address on communication Bus (I2C slave address of FT6xx6).
314296
* @retval TS interrupts status : always return 0 here
315297
*/
316298
uint8_t ft6x06_TS_ITStatus(uint16_t DeviceAddr)
317299
{
318-
/* Always return 0 as feature not applicable to FT6206 */
300+
/* Always return 0 as feature not applicable to FT6xx6 */
319301
return 0;
320302
}
321303

322304
/**
323-
* @brief Clear IT status in FT6206 interrupt status clear registers
305+
* @brief Clear IT status in FT6xx6 interrupt status clear registers
324306
* Should be called Following an EXTI coming to the MCU.
325-
* @note : This feature is not applicable to FT6206.
326-
* @param DeviceAddr: Device address on communication Bus (I2C slave address of FT6206).
307+
* @note : This feature is not applicable to FT6xx6.
308+
* @param DeviceAddr: Device address on communication Bus (I2C slave address of FT6xx6).
327309
* @retval None
328310
*/
329311
void ft6x06_TS_ClearIT(uint16_t DeviceAddr)
330312
{
331-
/* Nothing to be done here for FT6206 */
313+
/* Nothing to be done here for FT6xx6 */
332314
}
333315

334316
/**** NEW FEATURES enabled when Multi-touch support is enabled ****/
335317

336318
#if (TS_MULTI_TOUCH_SUPPORTED == 1)
337319
/**
338320
* @brief Get the last touch gesture identification (zoom, move up/down...).
339-
* @param DeviceAddr: Device address on communication Bus (I2C slave address of FT6x06).
321+
* @param DeviceAddr: Device address on communication Bus (I2C slave address of FT6xx6).
340322
* @param pGestureId : Pointer to get last touch gesture Identification.
341323
* @retval None.
342324
*/
@@ -355,7 +337,7 @@ void ft6x06_TS_GetGestureID(uint16_t DeviceAddr, uint32_t * pGestureId)
355337
* - weight that was applied to this touch
356338
* - sub-area of the touch in the touch panel
357339
* - event of linked to the touch (press down, lift up, ...)
358-
* @param DeviceAddr: Device address on communication Bus (I2C slave address of FT6x06).
340+
* @param DeviceAddr: Device address on communication Bus (I2C slave address of FT6xx6).
359341
* @param touchIdx : Passed index of the touch (0..1) on which we want to get the
360342
* detailed information.
361343
* @param pWeight : Pointer to to get the weight information of 'touchIdx'.
@@ -408,7 +390,7 @@ void ft6x06_TS_GetTouchInfo(uint16_t DeviceAddr,
408390
#if (TS_AUTO_CALIBRATION_SUPPORTED == 1)
409391
/**
410392
* @brief Start TouchScreen calibration phase
411-
* @param DeviceAddr: FT6206 Device address for communication on I2C Bus.
393+
* @param DeviceAddr: FT6xx6 Device address for communication on I2C Bus.
412394
* @retval Status FT6206_STATUS_OK or FT6206_STATUS_NOT_OK.
413395
*/
414396
static uint32_t ft6x06_TS_Calibration(uint16_t DeviceAddr)
@@ -421,7 +403,7 @@ static uint32_t ft6x06_TS_Calibration(uint16_t DeviceAddr)
421403

422404
/* >> Calibration sequence start */
423405

424-
/* Switch FT6206 back to factory mode to calibrate */
406+
/* Switch FT6xx6 back to factory mode to calibrate */
425407
regValue = (FT6206_DEV_MODE_FACTORY & FT6206_DEV_MODE_MASK) << FT6206_DEV_MODE_SHIFT;
426408
TS_IO_Write(DeviceAddr, FT6206_DEV_MODE_REG, regValue); /* 0x40 */
427409

@@ -461,14 +443,14 @@ static uint32_t ft6x06_TS_Calibration(uint16_t DeviceAddr)
461443

462444
/**
463445
* @brief Basic static configuration of TouchScreen
464-
* @param DeviceAddr: FT6206 Device address for communication on I2C Bus.
446+
* @param DeviceAddr: FT6xx6 Device address for communication on I2C Bus.
465447
* @retval Status FT6206_STATUS_OK or FT6206_STATUS_NOT_OK.
466448
*/
467449
static uint32_t ft6x06_TS_Configure(uint16_t DeviceAddr)
468450
{
469451
uint32_t status = FT6206_STATUS_OK;
470452

471-
/* Nothing special to be done for FT6206 */
453+
/* Nothing special to be done for FT6xx6 */
472454

473455
return(status);
474456
}

0 commit comments

Comments
 (0)