Skip to content

Commit a9fd4b7

Browse files
committed
Updated stm32l4xx_hal_conf.h in variant
Follow STM32L4xx HAL Drivers to v1.8.3 Signed-off-by: Frederic Pillon <[email protected]>
1 parent 3f025d1 commit a9fd4b7

File tree

3 files changed

+168
-36
lines changed

3 files changed

+168
-36
lines changed

variants/DISCO_L475VG_IOT/stm32l4xx_hal_conf.h

+56-12
Original file line numberDiff line numberDiff line change
@@ -107,19 +107,19 @@
107107
* (when HSE is used as system clock source, directly or through the PLL).
108108
*/
109109
#if !defined (HSE_VALUE)
110-
#define HSE_VALUE ((uint32_t)8000000U) /*!< Value of the External oscillator in Hz */
110+
#define HSE_VALUE 8000000U /*!< Value of the External oscillator in Hz */
111111
#endif /* HSE_VALUE */
112112

113113
#if !defined (HSE_STARTUP_TIMEOUT)
114-
#define HSE_STARTUP_TIMEOUT ((uint32_t)100U) /*!< Time out for HSE start up, in ms */
114+
#define HSE_STARTUP_TIMEOUT 100U /*!< Time out for HSE start up, in ms */
115115
#endif /* HSE_STARTUP_TIMEOUT */
116116

117117
/**
118118
* @brief Internal Multiple Speed oscillator (MSI) default value.
119119
* This value is the default MSI range value after Reset.
120120
*/
121121
#if !defined (MSI_VALUE)
122-
#define MSI_VALUE ((uint32_t)4000000U) /*!< Value of the Internal oscillator in Hz*/
122+
#define MSI_VALUE 4000000U /*!< Value of the Internal oscillator in Hz*/
123123
#endif /* MSI_VALUE */
124124

125125
/**
@@ -128,7 +128,7 @@
128128
* (when HSI is used as system clock source, directly or through the PLL).
129129
*/
130130
#if !defined (HSI_VALUE)
131-
#define HSI_VALUE ((uint32_t)16000000U) /*!< Value of the Internal oscillator in Hz*/
131+
#define HSI_VALUE 16000000U /*!< Value of the Internal oscillator in Hz*/
132132
#endif /* HSI_VALUE */
133133

134134
/**
@@ -139,15 +139,15 @@
139139
* which is subject to manufacturing process variations.
140140
*/
141141
#if !defined (HSI48_VALUE)
142-
#define HSI48_VALUE ((uint32_t)48000000U) /*!< Value of the Internal High Speed oscillator for USB FS/SDMMC/RNG in Hz.
142+
#define HSI48_VALUE 48000000U /*!< Value of the Internal High Speed oscillator for USB FS/SDMMC/RNG in Hz.
143143
The real value my vary depending on manufacturing process variations.*/
144144
#endif /* HSI48_VALUE */
145145

146146
/**
147147
* @brief Internal Low Speed oscillator (LSI) value.
148148
*/
149149
#if !defined (LSI_VALUE)
150-
#define LSI_VALUE ((uint32_t)32000U) /*!< LSI Typical Value in Hz*/
150+
#define LSI_VALUE 32000U /*!< LSI Typical Value in Hz*/
151151
#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz
152152
The real value may vary depending on the variations
153153
in voltage and temperature.*/
@@ -156,11 +156,11 @@
156156
* This value is used by the UART, RTC HAL module to compute the system frequency
157157
*/
158158
#if !defined (LSE_VALUE)
159-
#define LSE_VALUE ((uint32_t)32768U) /*!< Value of the External oscillator in Hz*/
159+
#define LSE_VALUE 32768U /*!< Value of the External oscillator in Hz*/
160160
#endif /* LSE_VALUE */
161161

162162
#if !defined (LSE_STARTUP_TIMEOUT)
163-
#define LSE_STARTUP_TIMEOUT ((uint32_t)5000U) /*!< Time out for LSE start up, in ms */
163+
#define LSE_STARTUP_TIMEOUT 5000U /*!< Time out for LSE start up, in ms */
164164
#endif /* HSE_STARTUP_TIMEOUT */
165165

166166
/**
@@ -169,7 +169,7 @@
169169
* frequency.
170170
*/
171171
#if !defined (EXTERNAL_SAI1_CLOCK_VALUE)
172-
#define EXTERNAL_SAI1_CLOCK_VALUE ((uint32_t)48000U) /*!< Value of the SAI1 External clock source in Hz*/
172+
#define EXTERNAL_SAI1_CLOCK_VALUE 48000U /*!< Value of the SAI1 External clock source in Hz*/
173173
#endif /* EXTERNAL_SAI1_CLOCK_VALUE */
174174

175175
/**
@@ -178,7 +178,7 @@
178178
* frequency.
179179
*/
180180
#if !defined (EXTERNAL_SAI2_CLOCK_VALUE)
181-
#define EXTERNAL_SAI2_CLOCK_VALUE ((uint32_t)48000U) /*!< Value of the SAI2 External clock source in Hz*/
181+
#define EXTERNAL_SAI2_CLOCK_VALUE 48000U /*!< Value of the SAI2 External clock source in Hz*/
182182
#endif /* EXTERNAL_SAI2_CLOCK_VALUE */
183183

184184
/* Tip: To avoid modifying this file each time you need to use different HSE,
@@ -188,8 +188,8 @@
188188
/**
189189
* @brief This is the HAL system configuration section
190190
*/
191-
#define VDD_VALUE ((uint32_t)3300U) /*!< Value of VDD in mv */
192-
#define TICK_INT_PRIORITY ((uint32_t)0x0FU) /*!< tick interrupt priority */
191+
#define VDD_VALUE 3300U /*!< Value of VDD in mv */
192+
#define TICK_INT_PRIORITY 0x0FU /*!< tick interrupt priority */
193193
#define USE_RTOS 0U
194194
#define PREFETCH_ENABLE 0U
195195
#define INSTRUCTION_CACHE_ENABLE 1U
@@ -202,6 +202,50 @@
202202
*/
203203
/* #define USE_FULL_ASSERT 1U */
204204

205+
/* ################## Register callback feature configuration ############### */
206+
/**
207+
* @brief Set below the peripheral configuration to "1U" to add the support
208+
* of HAL callback registration/deregistration feature for the HAL
209+
* driver(s). This allows user application to provide specific callback
210+
* functions thanks to HAL_PPP_RegisterCallback() rather than overwriting
211+
* the default weak callback functions (see each stm32l4xx_hal_ppp.h file
212+
* for possible callback identifiers defined in HAL_PPP_CallbackIDTypeDef
213+
* for each PPP peripheral).
214+
*/
215+
#define USE_HAL_ADC_REGISTER_CALLBACKS 0U
216+
#define USE_HAL_CAN_REGISTER_CALLBACKS 0U
217+
#define USE_HAL_COMP_REGISTER_CALLBACKS 0U
218+
#define USE_HAL_CRYP_REGISTER_CALLBACKS 0U
219+
#define USE_HAL_DAC_REGISTER_CALLBACKS 0U
220+
#define USE_HAL_DCMI_REGISTER_CALLBACKS 0U
221+
#define USE_HAL_DFSDM_REGISTER_CALLBACKS 0U
222+
#define USE_HAL_DMA2D_REGISTER_CALLBACKS 0U
223+
#define USE_HAL_DSI_REGISTER_CALLBACKS 0U
224+
#define USE_HAL_GFXMMU_REGISTER_CALLBACKS 0U
225+
#define USE_HAL_HASH_REGISTER_CALLBACKS 0U
226+
#define USE_HAL_HCD_REGISTER_CALLBACKS 0U
227+
#define USE_HAL_I2C_REGISTER_CALLBACKS 0U
228+
#define USE_HAL_IRDA_REGISTER_CALLBACKS 0U
229+
#define USE_HAL_LPTIM_REGISTER_CALLBACKS 0U
230+
#define USE_HAL_LTDC_REGISTER_CALLBACKS 0U
231+
#define USE_HAL_OPAMP_REGISTER_CALLBACKS 0U
232+
#define USE_HAL_OSPI_REGISTER_CALLBACKS 0U
233+
#define USE_HAL_PCD_REGISTER_CALLBACKS 0U
234+
#define USE_HAL_QSPI_REGISTER_CALLBACKS 0U
235+
#define USE_HAL_RNG_REGISTER_CALLBACKS 0U
236+
#define USE_HAL_RTC_REGISTER_CALLBACKS 0U
237+
#define USE_HAL_SAI_REGISTER_CALLBACKS 0U
238+
#define USE_HAL_SD_REGISTER_CALLBACKS 0U
239+
#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U
240+
#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0U
241+
#define USE_HAL_SPI_REGISTER_CALLBACKS 0U
242+
#define USE_HAL_SWPMI_REGISTER_CALLBACKS 0U
243+
#define USE_HAL_TIM_REGISTER_CALLBACKS 0U
244+
#define USE_HAL_TSC_REGISTER_CALLBACKS 0U
245+
#define USE_HAL_UART_REGISTER_CALLBACKS 0U
246+
#define USE_HAL_USART_REGISTER_CALLBACKS 0U
247+
#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U
248+
205249
/* ################## SPI peripheral configuration ########################## */
206250

207251
/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver

variants/NUCLEO_L432KC/stm32l4xx_hal_conf.h

+56-12
Original file line numberDiff line numberDiff line change
@@ -107,19 +107,19 @@
107107
* (when HSE is used as system clock source, directly or through the PLL).
108108
*/
109109
#if !defined (HSE_VALUE)
110-
#define HSE_VALUE ((uint32_t)8000000U) /*!< Value of the External oscillator in Hz */
110+
#define HSE_VALUE 8000000U /*!< Value of the External oscillator in Hz */
111111
#endif /* HSE_VALUE */
112112

113113
#if !defined (HSE_STARTUP_TIMEOUT)
114-
#define HSE_STARTUP_TIMEOUT ((uint32_t)100U) /*!< Time out for HSE start up, in ms */
114+
#define HSE_STARTUP_TIMEOUT 100U /*!< Time out for HSE start up, in ms */
115115
#endif /* HSE_STARTUP_TIMEOUT */
116116

117117
/**
118118
* @brief Internal Multiple Speed oscillator (MSI) default value.
119119
* This value is the default MSI range value after Reset.
120120
*/
121121
#if !defined (MSI_VALUE)
122-
#define MSI_VALUE ((uint32_t)4000000U) /*!< Value of the Internal oscillator in Hz*/
122+
#define MSI_VALUE 4000000U /*!< Value of the Internal oscillator in Hz*/
123123
#endif /* MSI_VALUE */
124124

125125
/**
@@ -128,7 +128,7 @@
128128
* (when HSI is used as system clock source, directly or through the PLL).
129129
*/
130130
#if !defined (HSI_VALUE)
131-
#define HSI_VALUE ((uint32_t)16000000U) /*!< Value of the Internal oscillator in Hz*/
131+
#define HSI_VALUE 16000000U /*!< Value of the Internal oscillator in Hz*/
132132
#endif /* HSI_VALUE */
133133

134134
/**
@@ -139,15 +139,15 @@
139139
* which is subject to manufacturing process variations.
140140
*/
141141
#if !defined (HSI48_VALUE)
142-
#define HSI48_VALUE ((uint32_t)48000000U) /*!< Value of the Internal High Speed oscillator for USB FS/SDMMC/RNG in Hz.
142+
#define HSI48_VALUE 48000000U /*!< Value of the Internal High Speed oscillator for USB FS/SDMMC/RNG in Hz.
143143
The real value my vary depending on manufacturing process variations.*/
144144
#endif /* HSI48_VALUE */
145145

146146
/**
147147
* @brief Internal Low Speed oscillator (LSI) value.
148148
*/
149149
#if !defined (LSI_VALUE)
150-
#define LSI_VALUE ((uint32_t)32000U) /*!< LSI Typical Value in Hz*/
150+
#define LSI_VALUE 32000U /*!< LSI Typical Value in Hz*/
151151
#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz
152152
The real value may vary depending on the variations
153153
in voltage and temperature.*/
@@ -156,11 +156,11 @@
156156
* This value is used by the UART, RTC HAL module to compute the system frequency
157157
*/
158158
#if !defined (LSE_VALUE)
159-
#define LSE_VALUE ((uint32_t)32768U) /*!< Value of the External oscillator in Hz*/
159+
#define LSE_VALUE 32768U /*!< Value of the External oscillator in Hz*/
160160
#endif /* LSE_VALUE */
161161

162162
#if !defined (LSE_STARTUP_TIMEOUT)
163-
#define LSE_STARTUP_TIMEOUT ((uint32_t)5000U) /*!< Time out for LSE start up, in ms */
163+
#define LSE_STARTUP_TIMEOUT 5000U /*!< Time out for LSE start up, in ms */
164164
#endif /* HSE_STARTUP_TIMEOUT */
165165

166166
/**
@@ -169,7 +169,7 @@
169169
* frequency.
170170
*/
171171
#if !defined (EXTERNAL_SAI1_CLOCK_VALUE)
172-
#define EXTERNAL_SAI1_CLOCK_VALUE ((uint32_t)48000U) /*!< Value of the SAI1 External clock source in Hz*/
172+
#define EXTERNAL_SAI1_CLOCK_VALUE 48000U /*!< Value of the SAI1 External clock source in Hz*/
173173
#endif /* EXTERNAL_SAI1_CLOCK_VALUE */
174174

175175
/**
@@ -178,7 +178,7 @@
178178
* frequency.
179179
*/
180180
#if !defined (EXTERNAL_SAI2_CLOCK_VALUE)
181-
#define EXTERNAL_SAI2_CLOCK_VALUE ((uint32_t)48000U) /*!< Value of the SAI2 External clock source in Hz*/
181+
#define EXTERNAL_SAI2_CLOCK_VALUE 48000U /*!< Value of the SAI2 External clock source in Hz*/
182182
#endif /* EXTERNAL_SAI2_CLOCK_VALUE */
183183

184184
/* Tip: To avoid modifying this file each time you need to use different HSE,
@@ -188,8 +188,8 @@
188188
/**
189189
* @brief This is the HAL system configuration section
190190
*/
191-
#define VDD_VALUE ((uint32_t)3300U) /*!< Value of VDD in mv */
192-
#define TICK_INT_PRIORITY ((uint32_t)0x0FU) /*!< tick interrupt priority */
191+
#define VDD_VALUE 3300U /*!< Value of VDD in mv */
192+
#define TICK_INT_PRIORITY 0x0FU /*!< tick interrupt priority */
193193
#define USE_RTOS 0U
194194
#define PREFETCH_ENABLE 0U
195195
#define INSTRUCTION_CACHE_ENABLE 1U
@@ -202,6 +202,50 @@
202202
*/
203203
/* #define USE_FULL_ASSERT 1U */
204204

205+
/* ################## Register callback feature configuration ############### */
206+
/**
207+
* @brief Set below the peripheral configuration to "1U" to add the support
208+
* of HAL callback registration/deregistration feature for the HAL
209+
* driver(s). This allows user application to provide specific callback
210+
* functions thanks to HAL_PPP_RegisterCallback() rather than overwriting
211+
* the default weak callback functions (see each stm32l4xx_hal_ppp.h file
212+
* for possible callback identifiers defined in HAL_PPP_CallbackIDTypeDef
213+
* for each PPP peripheral).
214+
*/
215+
#define USE_HAL_ADC_REGISTER_CALLBACKS 0U
216+
#define USE_HAL_CAN_REGISTER_CALLBACKS 0U
217+
#define USE_HAL_COMP_REGISTER_CALLBACKS 0U
218+
#define USE_HAL_CRYP_REGISTER_CALLBACKS 0U
219+
#define USE_HAL_DAC_REGISTER_CALLBACKS 0U
220+
#define USE_HAL_DCMI_REGISTER_CALLBACKS 0U
221+
#define USE_HAL_DFSDM_REGISTER_CALLBACKS 0U
222+
#define USE_HAL_DMA2D_REGISTER_CALLBACKS 0U
223+
#define USE_HAL_DSI_REGISTER_CALLBACKS 0U
224+
#define USE_HAL_GFXMMU_REGISTER_CALLBACKS 0U
225+
#define USE_HAL_HASH_REGISTER_CALLBACKS 0U
226+
#define USE_HAL_HCD_REGISTER_CALLBACKS 0U
227+
#define USE_HAL_I2C_REGISTER_CALLBACKS 0U
228+
#define USE_HAL_IRDA_REGISTER_CALLBACKS 0U
229+
#define USE_HAL_LPTIM_REGISTER_CALLBACKS 0U
230+
#define USE_HAL_LTDC_REGISTER_CALLBACKS 0U
231+
#define USE_HAL_OPAMP_REGISTER_CALLBACKS 0U
232+
#define USE_HAL_OSPI_REGISTER_CALLBACKS 0U
233+
#define USE_HAL_PCD_REGISTER_CALLBACKS 0U
234+
#define USE_HAL_QSPI_REGISTER_CALLBACKS 0U
235+
#define USE_HAL_RNG_REGISTER_CALLBACKS 0U
236+
#define USE_HAL_RTC_REGISTER_CALLBACKS 0U
237+
#define USE_HAL_SAI_REGISTER_CALLBACKS 0U
238+
#define USE_HAL_SD_REGISTER_CALLBACKS 0U
239+
#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U
240+
#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0U
241+
#define USE_HAL_SPI_REGISTER_CALLBACKS 0U
242+
#define USE_HAL_SWPMI_REGISTER_CALLBACKS 0U
243+
#define USE_HAL_TIM_REGISTER_CALLBACKS 0U
244+
#define USE_HAL_TSC_REGISTER_CALLBACKS 0U
245+
#define USE_HAL_UART_REGISTER_CALLBACKS 0U
246+
#define USE_HAL_USART_REGISTER_CALLBACKS 0U
247+
#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U
248+
205249
/* ################## SPI peripheral configuration ########################## */
206250

207251
/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver

0 commit comments

Comments
 (0)