BSP files for STM32H747I-Discovery Copy from ST Cube delivery
Dependents: DISCO_H747I_LCD_demo DISCO_H747I_AUDIO_demo
Components/Common/ts.h@3:bc403474b366, 2019-11-06 (annotated)
- Committer:
- Jerome Coutant
- Date:
- Wed Nov 06 11:32:01 2019 +0100
- Revision:
- 3:bc403474b366
- Parent:
- 0:146cf26a9bbb
Add PDM lib
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Jerome Coutant
0:146cf26a9bbb
|
1
|
/**
|
|
Jerome Coutant
0:146cf26a9bbb
|
2
|
******************************************************************************
|
|
Jerome Coutant
0:146cf26a9bbb
|
3
|
* @file ts.h
|
|
Jerome Coutant
0:146cf26a9bbb
|
4
|
* @author MCD Application Team
|
|
Jerome Coutant
0:146cf26a9bbb
|
5
|
* @version V4.0.1
|
|
Jerome Coutant
0:146cf26a9bbb
|
6
|
* @date 21-July-2015
|
|
Jerome Coutant
0:146cf26a9bbb
|
7
|
* @brief This file contains all the functions prototypes for the Touch Screen driver.
|
|
Jerome Coutant
0:146cf26a9bbb
|
8
|
******************************************************************************
|
|
Jerome Coutant
0:146cf26a9bbb
|
9
|
* @attention
|
|
Jerome Coutant
0:146cf26a9bbb
|
10
|
*
|
|
Jerome Coutant
0:146cf26a9bbb
|
11
|
* <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
|
|
Jerome Coutant
0:146cf26a9bbb
|
12
|
*
|
|
Jerome Coutant
0:146cf26a9bbb
|
13
|
* Redistribution and use in source and binary forms, with or without modification,
|
|
Jerome Coutant
0:146cf26a9bbb
|
14
|
* are permitted provided that the following conditions are met:
|
|
Jerome Coutant
0:146cf26a9bbb
|
15
|
* 1. Redistributions of source code must retain the above copyright notice,
|
|
Jerome Coutant
0:146cf26a9bbb
|
16
|
* this list of conditions and the following disclaimer.
|
|
Jerome Coutant
0:146cf26a9bbb
|
17
|
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
Jerome Coutant
0:146cf26a9bbb
|
18
|
* this list of conditions and the following disclaimer in the documentation
|
|
Jerome Coutant
0:146cf26a9bbb
|
19
|
* and/or other materials provided with the distribution.
|
|
Jerome Coutant
0:146cf26a9bbb
|
20
|
* 3. Neither the name of STMicroelectronics nor the names of its contributors
|
|
Jerome Coutant
0:146cf26a9bbb
|
21
|
* may be used to endorse or promote products derived from this software
|
|
Jerome Coutant
0:146cf26a9bbb
|
22
|
* without specific prior written permission.
|
|
Jerome Coutant
0:146cf26a9bbb
|
23
|
*
|
|
Jerome Coutant
0:146cf26a9bbb
|
24
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
Jerome Coutant
0:146cf26a9bbb
|
25
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
Jerome Coutant
0:146cf26a9bbb
|
26
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
Jerome Coutant
0:146cf26a9bbb
|
27
|
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
Jerome Coutant
0:146cf26a9bbb
|
28
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
Jerome Coutant
0:146cf26a9bbb
|
29
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
Jerome Coutant
0:146cf26a9bbb
|
30
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
Jerome Coutant
0:146cf26a9bbb
|
31
|
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
Jerome Coutant
0:146cf26a9bbb
|
32
|
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
Jerome Coutant
0:146cf26a9bbb
|
33
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
Jerome Coutant
0:146cf26a9bbb
|
34
|
*
|
|
Jerome Coutant
0:146cf26a9bbb
|
35
|
******************************************************************************
|
|
Jerome Coutant
0:146cf26a9bbb
|
36
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
37
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
38
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
39
|
#ifndef __TS_H
|
|
Jerome Coutant
0:146cf26a9bbb
|
40
|
#define __TS_H
|
|
Jerome Coutant
0:146cf26a9bbb
|
41
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
42
|
#ifdef __cplusplus
|
|
Jerome Coutant
0:146cf26a9bbb
|
43
|
extern "C" {
|
|
Jerome Coutant
0:146cf26a9bbb
|
44
|
#endif
|
|
Jerome Coutant
0:146cf26a9bbb
|
45
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
46
|
/* Includes ------------------------------------------------------------------*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
47
|
#include <stdint.h>
|
|
Jerome Coutant
0:146cf26a9bbb
|
48
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
49
|
/** @addtogroup BSP
|
|
Jerome Coutant
0:146cf26a9bbb
|
50
|
* @{
|
|
Jerome Coutant
0:146cf26a9bbb
|
51
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
52
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
53
|
/** @addtogroup Components
|
|
Jerome Coutant
0:146cf26a9bbb
|
54
|
* @{
|
|
Jerome Coutant
0:146cf26a9bbb
|
55
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
56
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
57
|
/** @addtogroup TS
|
|
Jerome Coutant
0:146cf26a9bbb
|
58
|
* @{
|
|
Jerome Coutant
0:146cf26a9bbb
|
59
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
60
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
61
|
/** @defgroup TS_Exported_Types
|
|
Jerome Coutant
0:146cf26a9bbb
|
62
|
* @{
|
|
Jerome Coutant
0:146cf26a9bbb
|
63
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
64
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
65
|
/** @defgroup TS_Driver_structure Touch Sensor Driver structure
|
|
Jerome Coutant
0:146cf26a9bbb
|
66
|
* @{
|
|
Jerome Coutant
0:146cf26a9bbb
|
67
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
68
|
typedef struct
|
|
Jerome Coutant
0:146cf26a9bbb
|
69
|
{
|
|
Jerome Coutant
0:146cf26a9bbb
|
70
|
void (*Init)(uint16_t);
|
|
Jerome Coutant
0:146cf26a9bbb
|
71
|
uint16_t (*ReadID)(uint16_t);
|
|
Jerome Coutant
0:146cf26a9bbb
|
72
|
void (*Reset)(uint16_t);
|
|
Jerome Coutant
0:146cf26a9bbb
|
73
|
void (*Start)(uint16_t);
|
|
Jerome Coutant
0:146cf26a9bbb
|
74
|
uint8_t (*DetectTouch)(uint16_t);
|
|
Jerome Coutant
0:146cf26a9bbb
|
75
|
void (*GetXY)(uint16_t, uint16_t*, uint16_t*);
|
|
Jerome Coutant
0:146cf26a9bbb
|
76
|
void (*EnableIT)(uint16_t);
|
|
Jerome Coutant
0:146cf26a9bbb
|
77
|
void (*ClearIT)(uint16_t);
|
|
Jerome Coutant
0:146cf26a9bbb
|
78
|
uint8_t (*GetITStatus)(uint16_t);
|
|
Jerome Coutant
0:146cf26a9bbb
|
79
|
void (*DisableIT)(uint16_t);
|
|
Jerome Coutant
0:146cf26a9bbb
|
80
|
}TS_DrvTypeDef;
|
|
Jerome Coutant
0:146cf26a9bbb
|
81
|
/**
|
|
Jerome Coutant
0:146cf26a9bbb
|
82
|
* @}
|
|
Jerome Coutant
0:146cf26a9bbb
|
83
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
84
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
85
|
/**
|
|
Jerome Coutant
0:146cf26a9bbb
|
86
|
* @}
|
|
Jerome Coutant
0:146cf26a9bbb
|
87
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
88
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
89
|
/**
|
|
Jerome Coutant
0:146cf26a9bbb
|
90
|
* @}
|
|
Jerome Coutant
0:146cf26a9bbb
|
91
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
92
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
93
|
/**
|
|
Jerome Coutant
0:146cf26a9bbb
|
94
|
* @}
|
|
Jerome Coutant
0:146cf26a9bbb
|
95
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
96
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
97
|
/**
|
|
Jerome Coutant
0:146cf26a9bbb
|
98
|
* @}
|
|
Jerome Coutant
0:146cf26a9bbb
|
99
|
*/
|
|
Jerome Coutant
0:146cf26a9bbb
|
100
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
101
|
#ifdef __cplusplus
|
|
Jerome Coutant
0:146cf26a9bbb
|
102
|
}
|
|
Jerome Coutant
0:146cf26a9bbb
|
103
|
#endif
|
|
Jerome Coutant
0:146cf26a9bbb
|
104
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
105
|
#endif /* __TS_H */
|
|
Jerome Coutant
0:146cf26a9bbb
|
106
|
|
|
Jerome Coutant
0:146cf26a9bbb
|
107
|
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
|