2 ******************************************************************************
\r
3 * @file tsl_check_config_stm32f0xx.h
\r
4 * @author MCD Application Team
\r
6 * @date 22-January-2013
\r
7 * @brief This file contains the check of all parameters defined in the
\r
8 * STM32F0XX configuration file.
\r
9 ******************************************************************************
\r
12 * <h2><center>© COPYRIGHT 2013 STMicroelectronics</center></h2>
\r
14 * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
\r
15 * You may not use this file except in compliance with the License.
\r
16 * You may obtain a copy of the License at:
\r
18 * http://www.st.com/software_license_agreement_liberty_v2
\r
20 * Unless required by applicable law or agreed to in writing, software
\r
21 * distributed under the License is distributed on an "AS IS" BASIS,
\r
22 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
23 * See the License for the specific language governing permissions and
\r
24 * limitations under the License.
\r
26 ******************************************************************************
\r
29 /* Define to prevent recursive inclusion -------------------------------------*/
\r
30 #ifndef __TSL_CHECK_CONFIG_STM32F0XX_H
\r
31 #define __TSL_CHECK_CONFIG_STM32F0XX_H
\r
33 //------------------------------------------------------------------------------
\r
35 #if ((TSLPRM_TOTAL_CHANNELS < 1) || (TSLPRM_TOTAL_CHANNELS > 24))
\r
36 #error "TSLPRM_TOTAL_CHANNELS is out of range (1 .. 24)."
\r
39 #if ((TSLPRM_TOTAL_BANKS < 1) || (TSLPRM_TOTAL_BANKS > 8))
\r
40 #error "TSLPRM_TOTAL_BANKS is out of range (1 .. 8)."
\r
43 #if ((TSLPRM_TOTAL_TOUCHKEYS < 0) || (TSLPRM_TOTAL_TOUCHKEYS > 24))
\r
44 #error "TSLPRM_TOTAL_TOUCHKEYS is out of range (0 .. 24)."
\r
47 #if ((TSLPRM_TOTAL_TOUCHKEYS_B < 0) || (TSLPRM_TOTAL_TOUCHKEYS_B > 24))
\r
48 #error "TSLPRM_TOTAL_TOUCHKEYS_B is out of range (0 .. 24)."
\r
51 #if ((TSLPRM_TOTAL_LINROTS < 0) || (TSLPRM_TOTAL_LINROTS > 24))
\r
52 #error "TSLPRM_TOTAL_LINROTS is out of range (0 .. 24)."
\r
55 #if ((TSLPRM_TOTAL_LINROTS_B < 0) || (TSLPRM_TOTAL_LINROTS_B > 24))
\r
56 #error "TSLPRM_TOTAL_LINROTS_B is out of range (0 .. 24)."
\r
59 #if ((TSLPRM_TOTAL_OBJECTS < 1) || (TSLPRM_TOTAL_OBJECTS > 24))
\r
60 #error "TSLPRM_TOTAL_OBJECTS is out of range (1 .. 24)."
\r
63 #if ((TSLPRM_TOTAL_TKEYS + TSLPRM_TOTAL_LNRTS) > 24)
\r
64 #error "The Sum of TouchKeys and Linear/Rotary sensors exceeds 24."
\r
67 //------------------------------------------------------------------------------
\r
69 #ifndef TSLPRM_TSC_GPIO_CONFIG
\r
70 #error "TSLPRM_TSC_GPIO_CONFIG is not defined."
\r
73 #if ((TSLPRM_TSC_GPIO_CONFIG < 0) || (TSLPRM_TSC_GPIO_CONFIG > 1))
\r
74 #error "TSLPRM_TSC_GPIO_CONFIG is out of range (0 .. 1)."
\r
77 //------------------------------------------------------------------------------
\r
79 #ifndef TSLPRM_TSC_CTPH
\r
80 #error "TSLPRM_TSC_CTPH is not defined."
\r
83 #if ((TSLPRM_TSC_CTPH < 0) || (TSLPRM_TSC_CTPH > 15))
\r
84 #error "TSLPRM_TSC_CTPH is out of range (0 .. 15)."
\r
87 //------------------------------------------------------------------------------
\r
89 #ifndef TSLPRM_TSC_CTPL
\r
90 #error "TSLPRM_TSC_CTPL is not defined."
\r
93 #if ((TSLPRM_TSC_CTPL < 0) || (TSLPRM_TSC_CTPL > 15))
\r
94 #error "TSLPRM_TSC_CTPL is out of range (0 .. 15)."
\r
97 //------------------------------------------------------------------------------
\r
99 #ifndef TSLPRM_TSC_PGPSC
\r
100 #error "TSLPRM_TSC_PGPSC is not defined."
\r
103 #if ((TSLPRM_TSC_PGPSC < 0) || (TSLPRM_TSC_PGPSC > 7))
\r
104 #error "TSLPRM_TSC_PGPSC is out of range (0 .. 7)."
\r
107 //------------------------------------------------------------------------------
\r
109 #if (TSLPRM_ACQ_MAX > 0) && (TSLPRM_ACQ_MAX < 256)
\r
110 #define TSLPRM_TSC_MCV 0 // 255
\r
113 #if (TSLPRM_ACQ_MAX > 255) && (TSLPRM_ACQ_MAX < 512)
\r
114 #define TSLPRM_TSC_MCV 1 // 511
\r
117 #if (TSLPRM_ACQ_MAX > 511) && (TSLPRM_ACQ_MAX < 1024)
\r
118 #define TSLPRM_TSC_MCV 2 // 1023
\r
121 #if (TSLPRM_ACQ_MAX > 1023) && (TSLPRM_ACQ_MAX < 2048)
\r
122 #define TSLPRM_TSC_MCV 3 // 2047
\r
125 #if (TSLPRM_ACQ_MAX > 2047) && (TSLPRM_ACQ_MAX < 4096)
\r
126 #define TSLPRM_TSC_MCV 4 // 4095
\r
129 #if (TSLPRM_ACQ_MAX > 4095) && (TSLPRM_ACQ_MAX < 8192)
\r
130 #define TSLPRM_TSC_MCV 5 // 8191
\r
133 #if (TSLPRM_ACQ_MAX > 8191)
\r
134 #define TSLPRM_TSC_MCV 6 // 16383
\r
137 #ifndef TSLPRM_TSC_MCV
\r
138 #error "TSLPRM_TSC_MCV is not defined."
\r
141 #if ((TSLPRM_TSC_MCV < 0) || (TSLPRM_TSC_MCV > 6))
\r
142 #error "TSLPRM_TSC_MCV is out of range (0 .. 6)."
\r
145 //------------------------------------------------------------------------------
\r
147 #ifndef TSLPRM_TSC_IODEF
\r
148 #error "TSLPRM_TSC_IODEF is not defined."
\r
151 #if ((TSLPRM_TSC_IODEF < 0) || (TSLPRM_TSC_IODEF > 1))
\r
152 #error "TSLPRM_TSC_IODEF is out of range (0 .. 1)."
\r
155 //------------------------------------------------------------------------------
\r
157 #ifndef TSLPRM_TSC_AM
\r
158 #error "TSLPRM_TSC_AM is not defined."
\r
161 #if ((TSLPRM_TSC_AM < 0) || (TSLPRM_TSC_AM > 1))
\r
162 #error "TSLPRM_TSC_AM is out of range (0 .. 1)."
\r
165 //------------------------------------------------------------------------------
\r
167 #ifndef TSLPRM_TSC_SYNC_PIN
\r
168 #error "TSLPRM_TSC_SYNC_PIN is not defined."
\r
171 #if ((TSLPRM_TSC_SYNC_PIN < 0) || (TSLPRM_TSC_SYNC_PIN > 1))
\r
172 #error "TSLPRM_TSC_SYNC_PIN is out of range (0 .. 1)."
\r
175 //------------------------------------------------------------------------------
\r
177 #ifndef TSLPRM_TSC_SYNC_POL
\r
178 #error "TSLPRM_TSC_SYNC_POL is not defined."
\r
181 #if ((TSLPRM_TSC_SYNC_POL < 0) || (TSLPRM_TSC_SYNC_POL > 1))
\r
182 #error "TSLPRM_TSC_SYNC_POL is out of range (0 .. 1)."
\r
185 //------------------------------------------------------------------------------
\r
187 #ifndef TSLPRM_TSC_USE_SS
\r
188 #error "TSLPRM_TSC_USE_SS is not defined."
\r
191 #if ((TSLPRM_TSC_USE_SS < 0) || (TSLPRM_TSC_USE_SS > 1))
\r
192 #error "TSLPRM_TSC_USE_SS is out of range (0 .. 1)."
\r
195 //------------------------------------------------------------------------------
\r
197 #ifndef TSLPRM_TSC_SSD
\r
198 #error "TSLPRM_TSC_SSD is not defined."
\r
201 #if ((TSLPRM_TSC_SSD < 0) || (TSLPRM_TSC_SSD > 127))
\r
202 #error "TSLPRM_TSC_SSD is out of range (0 .. 127)."
\r
205 //------------------------------------------------------------------------------
\r
207 #ifndef TSLPRM_TSC_SSPSC
\r
208 #error "TSLPRM_TSC_SSPSC is not defined."
\r
211 #if ((TSLPRM_TSC_SSPSC < 0) || (TSLPRM_TSC_SSPSC > 1))
\r
212 #error "TSLPRM_TSC_SSPSC is out of range (0 .. 1)."
\r
215 #endif /* __TSL_CHECK_CONFIG_STM32F0XX_H */
\r
217 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
\r