2 ******************************************************************************
\r
3 * @file tsl_check_config_stm32l1xx.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 * STM32L1XX 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_STM32L1XX_H
\r
31 #define __TSL_CHECK_CONFIG_STM32L1XX_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_USE_SHIELD
\r
70 #error "TSLPRM_USE_SHIELD is not defined."
\r
73 #if ((TSLPRM_USE_SHIELD < 0) || (TSLPRM_USE_SHIELD > 1))
\r
74 #error "TSLPRM_USE_SHIELD is out of range (0 .. 1)."
\r
77 //------------------------------------------------------------------------------
\r
79 #ifndef TSLPRM_IODEF
\r
80 #error "TSLPRM_IODEF is not defined."
\r
83 #if ((TSLPRM_IODEF < 0) || (TSLPRM_IODEF > 1))
\r
84 #error "TSLPRM_IODEF is out of range (0 .. 1)."
\r
87 //------------------------------------------------------------------------------
\r
89 #if defined(STM32L1XX_HD) && !defined(TSLPRM_STM32L1XX_HD_SW)
\r
91 #ifndef TSLPRM_TIM_PRESCALER
\r
92 #error "TSLPRM_TIM_PRESCALER is not defined."
\r
95 #if ((TSLPRM_TIM_PRESCALER < 0) || (TSLPRM_TIM_PRESCALER > 65535))
\r
96 #error "TSLPRM_TIM_PRESCALER is out of range (0 .. 65535)."
\r
101 //------------------------------------------------------------------------------
\r
103 #if defined(STM32L1XX_HD) && !defined(TSLPRM_STM32L1XX_HD_SW)
\r
105 #ifndef TSLPRM_TIM_RELOAD
\r
106 #error "TSLPRM_TIM_RELOAD is not defined."
\r
109 #if ((TSLPRM_TIM_RELOAD < 4) || (TSLPRM_TIM_RELOAD > 65534))
\r
110 #error "TSLPRM_TIM_RELOAD is out of range (4 .. 65534)."
\r
113 #if ((TSLPRM_TIM_RELOAD % 2) != (0))
\r
114 #error "TSLPRM_TIM_RELOAD is odd and must be even."
\r
119 //------------------------------------------------------------------------------
\r
121 #if defined(STM32L1XX_HD) && defined(TSLPRM_STM32L1XX_HD_SW)
\r
123 #ifndef TSLPRM_PROTECT_IO_ACCESS
\r
124 #error "TSLPRM_PROTECT_IO_ACCESS is not defined."
\r
127 #if ((TSLPRM_PROTECT_IO_ACCESS < 0) || (TSLPRM_PROTECT_IO_ACCESS > 1))
\r
128 #error "TSLPRM_PROTECT_IO_ACCESS is out of range (0 .. 1)."
\r
133 //------------------------------------------------------------------------------
\r
135 #if defined(STM32L1XX_HD) && defined(TSLPRM_STM32L1XX_HD_SW)
\r
137 #ifndef TSLPRM_USE_GPIOA
\r
138 #error "TSLPRM_USE_GPIOA is not defined."
\r
141 #if ((TSLPRM_USE_GPIOA < 0) || (TSLPRM_USE_GPIOA > 1))
\r
142 #error "TSLPRM_USE_GPIOA is out of range (0 .. 1)."
\r
145 #ifndef TSLPRM_USE_GPIOB
\r
146 #error "TSLPRM_USE_GPIOB is not defined."
\r
149 #if ((TSLPRM_USE_GPIOB < 0) || (TSLPRM_USE_GPIOB > 1))
\r
150 #error "TSLPRM_USE_GPIOB is out of range (0 .. 1)."
\r
153 #ifndef TSLPRM_USE_GPIOC
\r
154 #error "TSLPRM_USE_GPIOC is not defined."
\r
157 #if ((TSLPRM_USE_GPIOC < 0) || (TSLPRM_USE_GPIOC > 1))
\r
158 #error "TSLPRM_USE_GPIOC is out of range (0 .. 1)."
\r
161 #ifndef TSLPRM_USE_GPIOF
\r
162 #error "TSLPRM_USE_GPIOA is not defined."
\r
165 #if ((TSLPRM_USE_GPIOF < 0) || (TSLPRM_USE_GPIOF > 1))
\r
166 #error "TSLPRM_USE_GPIOF is out of range (0 .. 1)."
\r
169 #ifndef TSLPRM_USE_GPIOG
\r
170 #error "TSLPRM_USE_GPIOG is not defined."
\r
173 #if ((TSLPRM_USE_GPIOG < 0) || (TSLPRM_USE_GPIOG > 1))
\r
174 #error "TSLPRM_USE_GPIOG is out of range (0 .. 1)."
\r
179 //------------------------------------------------------------------------------
\r
181 #if defined(STM32L1XX_MD)
\r
183 #ifndef TSLPRM_PROTECT_IO_ACCESS
\r
184 #error "TSLPRM_PROTECT_IO_ACCESS is not defined."
\r
187 #if ((TSLPRM_PROTECT_IO_ACCESS < 0) || (TSLPRM_PROTECT_IO_ACCESS > 1))
\r
188 #error "TSLPRM_PROTECT_IO_ACCESS is out of range (0 .. 1)."
\r
193 //------------------------------------------------------------------------------
\r
195 #if defined(STM32L1XX_MD)
\r
197 #ifndef TSLPRM_USE_GPIOA
\r
198 #error "TSLPRM_USE_GPIOA is not defined."
\r
201 #if ((TSLPRM_USE_GPIOA < 0) || (TSLPRM_USE_GPIOA > 1))
\r
202 #error "TSLPRM_USE_GPIOA is out of range (0 .. 1)."
\r
205 #ifndef TSLPRM_USE_GPIOB
\r
206 #error "TSLPRM_USE_GPIOB is not defined."
\r
209 #if ((TSLPRM_USE_GPIOB < 0) || (TSLPRM_USE_GPIOB > 1))
\r
210 #error "TSLPRM_USE_GPIOB is out of range (0 .. 1)."
\r
213 #ifndef TSLPRM_USE_GPIOC
\r
214 #error "TSLPRM_USE_GPIOC is not defined."
\r
217 #if ((TSLPRM_USE_GPIOC < 0) || (TSLPRM_USE_GPIOC > 1))
\r
218 #error "TSLPRM_USE_GPIOC is out of range (0 .. 1)."
\r
221 #ifndef TSLPRM_USE_GPIOF
\r
222 #error "TSLPRM_USE_GPIOA is not defined."
\r
225 #if ((TSLPRM_USE_GPIOF < 0) || (TSLPRM_USE_GPIOF > 1))
\r
226 #error "TSLPRM_USE_GPIOF is out of range (0 .. 1)."
\r
229 #ifndef TSLPRM_USE_GPIOG
\r
230 #error "TSLPRM_USE_GPIOG is not defined."
\r
233 #if ((TSLPRM_USE_GPIOG < 0) || (TSLPRM_USE_GPIOG > 1))
\r
234 #error "TSLPRM_USE_GPIOG is out of range (0 .. 1)."
\r
239 //------------------------------------------------------------------------------
\r
241 #if defined(STM32L1XX_MDP) && !defined(TSLPRM_STM32L1XX_MDP_SW)
\r
243 #ifndef TSLPRM_TIM_PRESCALER
\r
244 #error "TSLPRM_TIM_PRESCALER is not defined."
\r
247 #if ((TSLPRM_TIM_PRESCALER < 0) || (TSLPRM_TIM_PRESCALER > 65535))
\r
248 #error "TSLPRM_TIM_PRESCALER is out of range (0 .. 65535)."
\r
253 //------------------------------------------------------------------------------
\r
255 #if defined(STM32L1XX_MDP) && !defined(TSLPRM_STM32L1XX_MDP_SW)
\r
257 #ifndef TSLPRM_TIM_RELOAD
\r
258 #error "TSLPRM_TIM_RELOAD is not defined."
\r
261 #if ((TSLPRM_TIM_RELOAD < 4) || (TSLPRM_TIM_RELOAD > 65534))
\r
262 #error "TSLPRM_TIM_RELOAD is out of range (4 .. 65534)."
\r
265 #if ((TSLPRM_TIM_RELOAD % 2) != (0))
\r
266 #error "TSLPRM_TIM_RELOAD is odd and must be even."
\r
271 //------------------------------------------------------------------------------
\r
273 #if defined(STM32L1XX_MDP) && defined(TSLPRM_STM32L1XX_MDP_SW)
\r
275 #ifndef TSLPRM_PROTECT_IO_ACCESS
\r
276 #error "TSLPRM_PROTECT_IO_ACCESS is not defined."
\r
279 #if ((TSLPRM_PROTECT_IO_ACCESS < 0) || (TSLPRM_PROTECT_IO_ACCESS > 1))
\r
280 #error "TSLPRM_PROTECT_IO_ACCESS is out of range (0 .. 1)."
\r
285 //------------------------------------------------------------------------------
\r
287 #if defined(STM32L1XX_MDP) && defined(TSLPRM_STM32L1XX_MDP_SW)
\r
289 #ifndef TSLPRM_USE_GPIOA
\r
290 #error "TSLPRM_USE_GPIOA is not defined."
\r
293 #if ((TSLPRM_USE_GPIOA < 0) || (TSLPRM_USE_GPIOA > 1))
\r
294 #error "TSLPRM_USE_GPIOA is out of range (0 .. 1)."
\r
297 #ifndef TSLPRM_USE_GPIOB
\r
298 #error "TSLPRM_USE_GPIOB is not defined."
\r
301 #if ((TSLPRM_USE_GPIOB < 0) || (TSLPRM_USE_GPIOB > 1))
\r
302 #error "TSLPRM_USE_GPIOB is out of range (0 .. 1)."
\r
305 #ifndef TSLPRM_USE_GPIOC
\r
306 #error "TSLPRM_USE_GPIOC is not defined."
\r
309 #if ((TSLPRM_USE_GPIOC < 0) || (TSLPRM_USE_GPIOC > 1))
\r
310 #error "TSLPRM_USE_GPIOC is out of range (0 .. 1)."
\r
313 #ifndef TSLPRM_USE_GPIOF
\r
314 #error "TSLPRM_USE_GPIOA is not defined."
\r
317 #if ((TSLPRM_USE_GPIOF < 0) || (TSLPRM_USE_GPIOF > 1))
\r
318 #error "TSLPRM_USE_GPIOF is out of range (0 .. 1)."
\r
321 #ifndef TSLPRM_USE_GPIOG
\r
322 #error "TSLPRM_USE_GPIOG is not defined."
\r
325 #if ((TSLPRM_USE_GPIOG < 0) || (TSLPRM_USE_GPIOG > 1))
\r
326 #error "TSLPRM_USE_GPIOG is out of range (0 .. 1)."
\r
331 #endif /* __TSL_CHECK_CONFIG_STM32L1XX_H */
\r
333 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
\r