blob: d0e5813325bba1e7e3870fa77cc81644d99791f9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
|
/**
******************************************************************************
* @file tsl_check_config_stm32f3xx.h
* @author MCD Application Team
* @version V1.4.4
* @date 31-March-2014
* @brief This file contains the check of all parameters defined in the
* STM32F3XX configuration file.
******************************************************************************
* @attention
*
* <h2><center>© COPYRIGHT 2014 STMicroelectronics</center></h2>
*
* Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
*
* http://www.st.com/software_license_agreement_liberty_v2
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __TSL_CHECK_CONFIG_STM32F3XX_H
#define __TSL_CHECK_CONFIG_STM32F3XX_H
//------------------------------------------------------------------------------
#if ((TSLPRM_TOTAL_CHANNELS < 1) || (TSLPRM_TOTAL_CHANNELS > 24))
#error "TSLPRM_TOTAL_CHANNELS is out of range (1 .. 24)."
#endif
#if ((TSLPRM_TOTAL_BANKS < 1) || (TSLPRM_TOTAL_BANKS > 8))
#error "TSLPRM_TOTAL_BANKS is out of range (1 .. 8)."
#endif
#if ((TSLPRM_TOTAL_TOUCHKEYS < 0) || (TSLPRM_TOTAL_TOUCHKEYS > 24))
#error "TSLPRM_TOTAL_TOUCHKEYS is out of range (0 .. 24)."
#endif
#if ((TSLPRM_TOTAL_TOUCHKEYS_B < 0) || (TSLPRM_TOTAL_TOUCHKEYS_B > 24))
#error "TSLPRM_TOTAL_TOUCHKEYS_B is out of range (0 .. 24)."
#endif
#if ((TSLPRM_TOTAL_LINROTS < 0) || (TSLPRM_TOTAL_LINROTS > 24))
#error "TSLPRM_TOTAL_LINROTS is out of range (0 .. 24)."
#endif
#if ((TSLPRM_TOTAL_LINROTS_B < 0) || (TSLPRM_TOTAL_LINROTS_B > 24))
#error "TSLPRM_TOTAL_LINROTS_B is out of range (0 .. 24)."
#endif
#if ((TSLPRM_TOTAL_OBJECTS < 1) || (TSLPRM_TOTAL_OBJECTS > 24))
#error "TSLPRM_TOTAL_OBJECTS is out of range (1 .. 24)."
#endif
#if ((TSLPRM_TOTAL_TKEYS + TSLPRM_TOTAL_LNRTS) > 24)
#error "The Sum of TouchKeys and Linear/Rotary sensors exceeds 24."
#endif
//------------------------------------------------------------------------------
#ifndef TSLPRM_TSC_GPIO_CONFIG
#error "TSLPRM_TSC_GPIO_CONFIG is not defined."
#endif
#if ((TSLPRM_TSC_GPIO_CONFIG < 0) || (TSLPRM_TSC_GPIO_CONFIG > 1))
#error "TSLPRM_TSC_GPIO_CONFIG is out of range (0 .. 1)."
#endif
//------------------------------------------------------------------------------
#ifndef TSLPRM_TSC_CTPH
#error "TSLPRM_TSC_CTPH is not defined."
#endif
#if ((TSLPRM_TSC_CTPH < 0) || (TSLPRM_TSC_CTPH > 15))
#error "TSLPRM_TSC_CTPH is out of range (0 .. 15)."
#endif
//------------------------------------------------------------------------------
#ifndef TSLPRM_TSC_CTPL
#error "TSLPRM_TSC_CTPL is not defined."
#endif
#if ((TSLPRM_TSC_CTPL < 0) || (TSLPRM_TSC_CTPL > 15))
#error "TSLPRM_TSC_CTPL is out of range (0 .. 15)."
#endif
//------------------------------------------------------------------------------
#ifndef TSLPRM_TSC_PGPSC
#error "TSLPRM_TSC_PGPSC is not defined."
#endif
#if ((TSLPRM_TSC_PGPSC < 0) || (TSLPRM_TSC_PGPSC > 7))
#error "TSLPRM_TSC_PGPSC is out of range (0 .. 7)."
#endif
//------------------------------------------------------------------------------
#if (TSLPRM_ACQ_MAX > 0) && (TSLPRM_ACQ_MAX < 256)
#define TSLPRM_TSC_MCV 0 // 255
#endif
#if (TSLPRM_ACQ_MAX > 255) && (TSLPRM_ACQ_MAX < 512)
#define TSLPRM_TSC_MCV 1 // 511
#endif
#if (TSLPRM_ACQ_MAX > 511) && (TSLPRM_ACQ_MAX < 1024)
#define TSLPRM_TSC_MCV 2 // 1023
#endif
#if (TSLPRM_ACQ_MAX > 1023) && (TSLPRM_ACQ_MAX < 2048)
#define TSLPRM_TSC_MCV 3 // 2047
#endif
#if (TSLPRM_ACQ_MAX > 2047) && (TSLPRM_ACQ_MAX < 4096)
#define TSLPRM_TSC_MCV 4 // 4095
#endif
#if (TSLPRM_ACQ_MAX > 4095) && (TSLPRM_ACQ_MAX < 8192)
#define TSLPRM_TSC_MCV 5 // 8191
#endif
#if (TSLPRM_ACQ_MAX > 8191)
#define TSLPRM_TSC_MCV 6 // 16383
#endif
#ifndef TSLPRM_TSC_MCV
#error "TSLPRM_TSC_MCV is not defined."
#endif
#if ((TSLPRM_TSC_MCV < 0) || (TSLPRM_TSC_MCV > 6))
#error "TSLPRM_TSC_MCV is out of range (0 .. 6)."
#endif
//------------------------------------------------------------------------------
#ifndef TSLPRM_TSC_IODEF
#error "TSLPRM_TSC_IODEF is not defined."
#endif
#if ((TSLPRM_TSC_IODEF < 0) || (TSLPRM_TSC_IODEF > 1))
#error "TSLPRM_TSC_IODEF is out of range (0 .. 1)."
#endif
//------------------------------------------------------------------------------
#ifndef TSLPRM_TSC_AM
#error "TSLPRM_TSC_AM is not defined."
#endif
#if ((TSLPRM_TSC_AM < 0) || (TSLPRM_TSC_AM > 1))
#error "TSLPRM_TSC_AM is out of range (0 .. 1)."
#endif
//------------------------------------------------------------------------------
#ifndef TSLPRM_TSC_SYNC_PIN
#error "TSLPRM_TSC_SYNC_PIN is not defined."
#endif
#if ((TSLPRM_TSC_SYNC_PIN < 0) || (TSLPRM_TSC_SYNC_PIN > 2))
#error "TSLPRM_TSC_SYNC_PIN is out of range (0 .. 2)."
#endif
//------------------------------------------------------------------------------
#ifndef TSLPRM_TSC_SYNC_POL
#error "TSLPRM_TSC_SYNC_POL is not defined."
#endif
#if ((TSLPRM_TSC_SYNC_POL < 0) || (TSLPRM_TSC_SYNC_POL > 1))
#error "TSLPRM_TSC_SYNC_POL is out of range (0 .. 1)."
#endif
//------------------------------------------------------------------------------
#ifndef TSLPRM_TSC_USE_SS
#error "TSLPRM_TSC_USE_SS is not defined."
#endif
#if ((TSLPRM_TSC_USE_SS < 0) || (TSLPRM_TSC_USE_SS > 1))
#error "TSLPRM_TSC_USE_SS is out of range (0 .. 1)."
#endif
//------------------------------------------------------------------------------
#ifndef TSLPRM_TSC_SSD
#error "TSLPRM_TSC_SSD is not defined."
#endif
#if ((TSLPRM_TSC_SSD < 0) || (TSLPRM_TSC_SSD > 127))
#error "TSLPRM_TSC_SSD is out of range (0 .. 127)."
#endif
//------------------------------------------------------------------------------
#ifndef TSLPRM_TSC_SSPSC
#error "TSLPRM_TSC_SSPSC is not defined."
#endif
#if ((TSLPRM_TSC_SSPSC < 0) || (TSLPRM_TSC_SSPSC > 1))
#error "TSLPRM_TSC_SSPSC is out of range (0 .. 1)."
#endif
//------------------------------------------------------------------------------
#ifndef TSLPRM_DELAY_DISCHARGE_ALL
#error "TSLPRM_DELAY_DISCHARGE_ALL is not defined."
#endif
#if ((TSLPRM_DELAY_DISCHARGE_ALL < 0) || (TSLPRM_DELAY_DISCHARGE_ALL > 65535))
#error "TSLPRM_DELAY_DISCHARGE_ALL is out of range (0 .. 65535)."
#endif
#endif /* __TSL_CHECK_CONFIG_STM32F3XX_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|