1 /**
2   ******************************************************************************
3   * @file    stm32l0xx_hal_conf.h
4   * @author  MCD Application Team
5   * @version V1.1.4
6   * @date    08-January-2018
7   * @brief   HAL configuration file.
8   ******************************************************************************
9   * @attention
10   *
11   * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics International N.V.
12   * All rights reserved.</center></h2>
13   *
14   * Redistribution and use in source and binary forms, with or without
15   * modification, are permitted, provided that the following conditions are met:
16   *
17   * 1. Redistribution of source code must retain the above copyright notice,
18   *    this list of conditions and the following disclaimer.
19   * 2. Redistributions in binary form must reproduce the above copyright notice,
20   *    this list of conditions and the following disclaimer in the documentation
21   *    and/or other materials provided with the distribution.
22   * 3. Neither the name of STMicroelectronics nor the names of other
23   *    contributors to this software may be used to endorse or promote products
24   *    derived from this software without specific written permission.
25   * 4. This software, including modifications and/or derivative works of this
26   *    software, must execute solely and exclusively on microcontroller or
27   *    microprocessor devices manufactured by or for STMicroelectronics.
28   * 5. Redistribution and use of this software other than as permitted under
29   *    this license is void and will automatically terminate your rights under
30   *    this license.
31   *
32   * THIS SOFTWARE IS PROVIDED BY STMICROELECTRONICS AND CONTRIBUTORS "AS IS"
33   * AND ANY EXPRESS, IMPLIED OR STATUTORY WARRANTIES, INCLUDING, BUT NOT
34   * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
35   * PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY
36   * RIGHTS ARE DISCLAIMED TO THE FULLEST EXTENT PERMITTED BY LAW. IN NO EVENT
37   * SHALL STMICROELECTRONICS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
38   * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
39   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
40   * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
41   * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
42   * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
43   * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44   *
45   ******************************************************************************
46   */
47 
48 /* Define to prevent recursive inclusion -------------------------------------*/
49 #ifndef __STM32L0xx_HAL_CONF_H__
50 #define __STM32L0xx_HAL_CONF_H__
51 
52 #ifdef __cplusplus
53  extern "C" {
54 #endif
55 
56 /* Exported types ------------------------------------------------------------*/
57 /* Exported constants --------------------------------------------------------*/
58 
59 /* ########################## Module Selection ############################## */
60 /**
61   * @brief This is the list of modules to be used in the HAL driver
62   */
63 #define HAL_MODULE_ENABLED
64 #define HAL_ADC_MODULE_ENABLED
65 /* #define HAL_COMP_MODULE_ENABLED  */
66 /* #define HAL_CRC_MODULE_ENABLED   */
67 /* #define HAL_CRYP_MODULE_ENABLED   */
68 /* #define HAL_DAC_MODULE_ENABLED    */
69 #define HAL_DMA_MODULE_ENABLED
70 #define HAL_FLASH_MODULE_ENABLED
71 #define HAL_GPIO_MODULE_ENABLED
72 #define HAL_I2C_MODULE_ENABLED
73 /* #define HAL_I2S_MODULE_ENABLED    */
74 #define HAL_IWDG_MODULE_ENABLED
75 /* #define HAL_LCD_MODULE_ENABLED  */
76 /* #define HAL_LPTIM_MODULE_ENABLED */
77 #define HAL_PWR_MODULE_ENABLED
78 #define HAL_RCC_MODULE_ENABLED
79 /* #define HAL_RNG_MODULE_ENABLED    */
80  #define HAL_RTC_MODULE_ENABLED
81  #define HAL_SPI_MODULE_ENABLED
82 #define HAL_TIM_MODULE_ENABLED
83 /* #define HAL_TSC_MODULE_ENABLED    */
84  #define HAL_UART_MODULE_ENABLED
85 /* #define HAL_USART_MODULE_ENABLED  */
86 /* #define HAL_IRDA_MODULE_ENABLED  */
87 /* #define HAL_SMARTCARD_MODULE_ENABLED  */
88 /* #define HAL_SMBUS_MODULE_ENABLED  */
89 /* #define HAL_WWDG_MODULE_ENABLED   */
90 #define HAL_CORTEX_MODULE_ENABLED
91 /* #define HAL_PCD_MODULE_ENABLED  */
92 
93 
94 /* ########################## Oscillator Values adaptation ####################*/
95 /**
96   * @brief Adjust the value of External High Speed oscillator (HSE) used in your application.
97   *        This value is used by the RCC HAL module to compute the system frequency
98   *        (when HSE is used as system clock source, directly or through the PLL).
99   */
100 #if !defined  (HSE_VALUE)
101   #define HSE_VALUE    ((uint32_t)8000000) /*!< Value of the External oscillator in Hz */
102 #endif /* HSE_VALUE */
103 
104 #if !defined  (HSE_STARTUP_TIMEOUT)
105   #define HSE_STARTUP_TIMEOUT    ((uint32_t)5000)   /*!< Time out for HSE start up, in ms */
106 #endif /* HSE_STARTUP_TIMEOUT */
107 
108 /**
109   * @brief Internal Multiple Speed oscillator (MSI) default value.
110   *        This value is the default MSI range value after Reset.
111   */
112 #if !defined  (MSI_VALUE)
113   #define MSI_VALUE    ((uint32_t)2000000) /*!< Value of the Internal oscillator in Hz*/
114 #endif /* MSI_VALUE */
115 /**
116   * @brief Internal High Speed oscillator (HSI) value.
117   *        This value is used by the RCC HAL module to compute the system frequency
118   *        (when HSI is used as system clock source, directly or through the PLL).
119   */
120 #if !defined  (HSI_VALUE)
121   #define HSI_VALUE    ((uint32_t)16000000) /*!< Value of the Internal oscillator in Hz*/
122 #endif /* HSI_VALUE */
123 
124 /**
125   * @brief Internal High Speed oscillator for USB (HSI48) value.
126   */
127 #if !defined  (HSI48_VALUE)
128 #define HSI48_VALUE ((uint32_t)48000000) /*!< Value of the Internal High Speed oscillator for USB in Hz.
129                                              The real value may vary depending on the variations
130                                              in voltage and temperature.  */
131 #endif /* HSI48_VALUE */
132 
133 /**
134   * @brief Internal Low Speed oscillator (LSI) value.
135   */
136 #if !defined  (LSI_VALUE)
137  #define LSI_VALUE  ((uint32_t)37000)       /*!< LSI Typical Value in Hz*/
138 #endif /* LSI_VALUE */                      /*!< Value of the Internal Low Speed oscillator in Hz
139                                              The real value may vary depending on the variations
140                                              in voltage and temperature.*/
141 /**
142   * @brief External Low Speed oscillator (LSE) value.
143   *        This value is used by the UART, RTC HAL module to compute the system frequency
144   */
145 #if !defined  (LSE_VALUE)
146   #define LSE_VALUE    ((uint32_t)32768) /*!< Value of the External oscillator in Hz*/
147 #endif /* LSE_VALUE */
148 
149 
150 #if !defined  (LSE_STARTUP_TIMEOUT)
151   #define LSE_STARTUP_TIMEOUT    ((uint32_t)5000)   /*!< Time out for LSE start up, in ms */
152 #endif /* HSE_STARTUP_TIMEOUT */
153 
154 
155 /* Tip: To avoid modifying this file each time you need to use different HSE,
156    ===  you can define the HSE value in your toolchain compiler preprocessor. */
157 
158 /* ########################### System Configuration ######################### */
159 /**
160   * @brief This is the HAL system configuration section
161   */
162 #define  VDD_VALUE                    ((uint32_t)3300) /*!< Value of VDD in mv */
163 #define  TICK_INT_PRIORITY            (((uint32_t)1<<__NVIC_PRIO_BITS) - 1)    /*!< tick interrupt priority */
164 #define  USE_RTOS                     0
165 #define  PREFETCH_ENABLE              1
166 #define  PREREAD_ENABLE               0
167 #define  BUFFER_CACHE_DISABLE         0
168 
169 /* ########################## Assert Selection ############################## */
170 /**
171   * @brief Uncomment the line below to expanse the "assert_param" macro in the
172   *        HAL drivers code
173   */
174 /* #define USE_FULL_ASSERT    1 */
175 
176 /* Includes ------------------------------------------------------------------*/
177 /**
178   * @brief Include module's header file
179   */
180 
181 #ifdef HAL_RCC_MODULE_ENABLED
182   #include "stm32l0xx_hal_rcc.h"
183 #endif /* HAL_RCC_MODULE_ENABLED */
184 
185 #ifdef HAL_GPIO_MODULE_ENABLED
186   #include "stm32l0xx_hal_gpio.h"
187 #endif /* HAL_GPIO_MODULE_ENABLED */
188 
189 #ifdef HAL_DMA_MODULE_ENABLED
190   #include "stm32l0xx_hal_dma.h"
191 #endif /* HAL_DMA_MODULE_ENABLED */
192 
193 #ifdef HAL_CORTEX_MODULE_ENABLED
194   #include "stm32l0xx_hal_cortex.h"
195 #endif /* HAL_CORTEX_MODULE_ENABLED */
196 
197 #ifdef HAL_ADC_MODULE_ENABLED
198   #include "stm32l0xx_hal_adc.h"
199 #endif /* HAL_ADC_MODULE_ENABLED */
200 
201 #ifdef HAL_COMP_MODULE_ENABLED
202   #include "stm32l0xx_hal_comp.h"
203 #endif /* HAL_COMP_MODULE_ENABLED */
204 
205 #ifdef HAL_CRC_MODULE_ENABLED
206   #include "stm32l0xx_hal_crc.h"
207 #endif /* HAL_CRC_MODULE_ENABLED */
208 
209 #ifdef HAL_CRYP_MODULE_ENABLED
210   #include "stm32l0xx_hal_cryp.h"
211 #endif /* HAL_CRYP_MODULE_ENABLED */
212 
213 #ifdef HAL_DAC_MODULE_ENABLED
214   #include "stm32l0xx_hal_dac.h"
215 #endif /* HAL_DAC_MODULE_ENABLED */
216 
217 #ifdef HAL_FLASH_MODULE_ENABLED
218   #include "stm32l0xx_hal_flash.h"
219 #endif /* HAL_FLASH_MODULE_ENABLED */
220 
221 #ifdef HAL_I2C_MODULE_ENABLED
222  #include "stm32l0xx_hal_i2c.h"
223 #endif /* HAL_I2C_MODULE_ENABLED */
224 
225 #ifdef HAL_I2S_MODULE_ENABLED
226  #include "stm32l0xx_hal_i2s.h"
227 #endif /* HAL_I2S_MODULE_ENABLED */
228 
229 #ifdef HAL_IWDG_MODULE_ENABLED
230  #include "stm32l0xx_hal_iwdg.h"
231 #endif /* HAL_IWDG_MODULE_ENABLED */
232 
233 #ifdef HAL_LCD_MODULE_ENABLED
234  #include "stm32l0xx_hal_lcd.h"
235 #endif /* HAL_LCD_MODULE_ENABLED */
236 
237 #ifdef HAL_LPTIM_MODULE_ENABLED
238 #include "stm32l0xx_hal_lptim.h"
239 #endif /* HAL_LPTIM_MODULE_ENABLED */
240 
241 #ifdef HAL_PWR_MODULE_ENABLED
242  #include "stm32l0xx_hal_pwr.h"
243 #endif /* HAL_PWR_MODULE_ENABLED */
244 
245 #ifdef HAL_RNG_MODULE_ENABLED
246  #include "stm32l0xx_hal_rng.h"
247 #endif /* HAL_RNG_MODULE_ENABLED */
248 
249 #ifdef HAL_RTC_MODULE_ENABLED
250  #include "stm32l0xx_hal_rtc.h"
251 #endif /* HAL_RTC_MODULE_ENABLED */
252 
253 #ifdef HAL_SPI_MODULE_ENABLED
254  #include "stm32l0xx_hal_spi.h"
255 #endif /* HAL_SPI_MODULE_ENABLED */
256 
257 #ifdef HAL_TIM_MODULE_ENABLED
258  #include "stm32l0xx_hal_tim.h"
259 #endif /* HAL_TIM_MODULE_ENABLED */
260 
261 #ifdef HAL_TSC_MODULE_ENABLED
262  #include "stm32l0xx_hal_tsc.h"
263 #endif /* HAL_TSC_MODULE_ENABLED */
264 
265 #ifdef HAL_UART_MODULE_ENABLED
266  #include "stm32l0xx_hal_uart.h"
267 #endif /* HAL_UART_MODULE_ENABLED */
268 
269 #ifdef HAL_USART_MODULE_ENABLED
270  #include "stm32l0xx_hal_usart.h"
271 #endif /* HAL_USART_MODULE_ENABLED */
272 
273 #ifdef HAL_IRDA_MODULE_ENABLED
274  #include "stm32l0xx_hal_irda.h"
275 #endif /* HAL_IRDA_MODULE_ENABLED */
276 
277 #ifdef HAL_SMARTCARD_MODULE_ENABLED
278  #include "stm32l0xx_hal_smartcard.h"
279 #endif /* HAL_SMARTCARD_MODULE_ENABLED */
280 
281 #ifdef HAL_SMBUS_MODULE_ENABLED
282  #include "stm32l0xx_hal_smbus.h"
283 #endif /* HAL_SMBUS_MODULE_ENABLED */
284 
285 #ifdef HAL_WWDG_MODULE_ENABLED
286  #include "stm32l0xx_hal_wwdg.h"
287 #endif /* HAL_WWDG_MODULE_ENABLED */
288 
289 #ifdef HAL_PCD_MODULE_ENABLED
290  #include "stm32l0xx_hal_pcd.h"
291 #endif /* HAL_PCD_MODULE_ENABLED */
292 
293 /* Exported macro ------------------------------------------------------------*/
294 #ifdef  USE_FULL_ASSERT
295 /**
296   * @brief  The assert_param macro is used for function's parameters check.
297   * @param  expr: If expr is false, it calls assert_failed function
298   *         which reports the name of the source file and the source
299   *         line number of the call that failed.
300   *         If expr is true, it returns no value.
301   * @retval None
302   */
303   #define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__))
304 /* Exported functions ------------------------------------------------------- */
305   void assert_failed(uint8_t* file, uint32_t line);
306 #else
307   #define assert_param(expr) ((void)0)
308 #endif /* USE_FULL_ASSERT */
309 
310 #ifdef __cplusplus
311 }
312 #endif
313 
314 #endif /* __STM32L0xx_HAL_CONF_H__ */
315 
316 
317 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
318 
319