Skip to content

Commit 09457e2

Browse files
committed
STM32G0 - Add if defined check for USE_HAL_XXX_REGISTER_CALLBACKS
1 parent 758d4c4 commit 09457e2

File tree

1 file changed

+71
-18
lines changed

1 file changed

+71
-18
lines changed

targets/TARGET_STM/TARGET_STM32G0/STM32Cube_FW/stm32g0xx_hal_conf.h

Lines changed: 71 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -67,23 +67,73 @@ extern "C" {
6767
/**
6868
* @brief This is the list of modules where register callback can be used
6969
*/
70-
#define USE_HAL_ADC_REGISTER_CALLBACKS 0u
71-
#define USE_HAL_CEC_REGISTER_CALLBACKS 0u
72-
#define USE_HAL_COMP_REGISTER_CALLBACKS 0u
73-
#define USE_HAL_CRYP_REGISTER_CALLBACKS 0u
74-
#define USE_HAL_DAC_REGISTER_CALLBACKS 0u
75-
#define USE_HAL_I2C_REGISTER_CALLBACKS 0u
76-
#define USE_HAL_I2S_REGISTER_CALLBACKS 0u
77-
#define USE_HAL_IRDA_REGISTER_CALLBACKS 0u
78-
#define USE_HAL_LPTIM_REGISTER_CALLBACKS 0u
79-
#define USE_HAL_RNG_REGISTER_CALLBACKS 0u
80-
#define USE_HAL_RTC_REGISTER_CALLBACKS 0u
81-
#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0u
82-
#define USE_HAL_SPI_REGISTER_CALLBACKS 0u
83-
#define USE_HAL_TIM_REGISTER_CALLBACKS 0u
84-
#define USE_HAL_UART_REGISTER_CALLBACKS 0u
85-
#define USE_HAL_USART_REGISTER_CALLBACKS 0u
86-
#define USE_HAL_WWDG_REGISTER_CALLBACKS 0u
70+
#if !defined (USE_HAL_ADC_REGISTER_CALLBACKS)
71+
#define USE_HAL_ADC_REGISTER_CALLBACKS 0u
72+
#endif
73+
74+
#if !defined (USE_HAL_CEC_REGISTER_CALLBACKS)
75+
#define USE_HAL_CEC_REGISTER_CALLBACKS 0u
76+
#endif
77+
78+
#if !defined (USE_HAL_COMP_REGISTER_CALLBACKS)
79+
#define USE_HAL_COMP_REGISTER_CALLBACKS 0u
80+
#endif
81+
82+
#if !defined (USE_HAL_CRYP_REGISTER_CALLBACKS)
83+
#define USE_HAL_CRYP_REGISTER_CALLBACKS 0u
84+
#endif
85+
86+
#if !defined (USE_HAL_DAC_REGISTER_CALLBACKS)
87+
#define USE_HAL_DAC_REGISTER_CALLBACKS 0u
88+
#endif
89+
90+
#if !defined (USE_HAL_I2C_REGISTER_CALLBACKS)
91+
#define USE_HAL_I2C_REGISTER_CALLBACKS 0u
92+
#endif
93+
94+
#if !defined (USE_HAL_I2S_REGISTER_CALLBACKS)
95+
#define USE_HAL_I2S_REGISTER_CALLBACKS 0u
96+
#endif
97+
98+
#if !defined (USE_HAL_IRDA_REGISTER_CALLBACKS)
99+
#define USE_HAL_IRDA_REGISTER_CALLBACKS 0u
100+
#endif
101+
102+
#if !defined (USE_HAL_LPTIM_REGISTER_CALLBACKS)
103+
#define USE_HAL_LPTIM_REGISTER_CALLBACKS 0u
104+
#endif
105+
106+
#if !defined (USE_HAL_RNG_REGISTER_CALLBACKS)
107+
#define USE_HAL_RNG_REGISTER_CALLBACKS 0u
108+
#endif
109+
110+
#if !defined (USE_HAL_RTC_REGISTER_CALLBACKS)
111+
#define USE_HAL_RTC_REGISTER_CALLBACKS 0u
112+
#endif
113+
114+
#if !defined (USE_HAL_SMBUS_REGISTER_CALLBACKS)
115+
#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0u
116+
#endif
117+
118+
#if !defined (USE_HAL_SPI_REGISTER_CALLBACKS)
119+
#define USE_HAL_SPI_REGISTER_CALLBACKS 0u
120+
#endif
121+
122+
#if !defined (USE_HAL_TIM_REGISTER_CALLBACKS)
123+
#define USE_HAL_TIM_REGISTER_CALLBACKS 0u
124+
#endif
125+
126+
#if !defined (USE_HAL_UART_REGISTER_CALLBACKS)
127+
#define USE_HAL_UART_REGISTER_CALLBACKS 0u
128+
#endif
129+
130+
#if !defined (USE_HAL_USART_REGISTER_CALLBACKS)
131+
#define USE_HAL_USART_REGISTER_CALLBACKS 0u
132+
#endif
133+
134+
#if !defined (USE_HAL_WWDG_REGISTER_CALLBACKS)
135+
#define USE_HAL_WWDG_REGISTER_CALLBACKS 0u
136+
#endif
87137

88138
/* ########################## Oscillator Values adaptation ####################*/
89139
/**
@@ -163,7 +213,10 @@ in voltage and temperature.*/
163213

164214
/* ################## CRYP peripheral configuration ########################## */
165215

166-
#define USE_HAL_CRYP_SUSPEND_RESUME 1U
216+
#if !defined (USE_HAL_CRYP_SUSPEND_RESUME)
217+
#define USE_HAL_CRYP_SUSPEND_RESUME 1U
218+
#endif
219+
167220

168221

169222
/* ########################## Assert Selection ############################## */

0 commit comments

Comments
 (0)