@@ -163,28 +163,28 @@ ADC_EXTERNALTRIGINJECCONV_T6_TRGO
163
163
*/
164
164
// timer to injected TRGO
165
165
// https://github.com/stm32duino/Arduino_Core_STM32/blob/e156c32db24d69cb4818208ccc28894e2f427cfa/system/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc_ex.h#L179
166
- uint32_t _timerToInjectedTRGO (HardwareTimer * timer){
166
+ uint32_t _timerToInjectedTRGO (TIM_HandleTypeDef * timer){
167
167
168
- if (timer->getHandle ()-> Instance == TIM1)
168
+ if (timer->Instance == TIM1)
169
169
return ADC_EXTERNALTRIGINJECCONV_T1_TRGO;
170
170
#ifdef TIM2 // if defined timer 2
171
- else if (timer->getHandle ()-> Instance == TIM2)
171
+ else if (timer->Instance == TIM2)
172
172
return ADC_EXTERNALTRIGINJECCONV_T2_TRGO;
173
173
#endif
174
174
#ifdef TIM4 // if defined timer 4
175
- else if (timer->getHandle ()-> Instance == TIM4)
175
+ else if (timer->Instance == TIM4)
176
176
return ADC_EXTERNALTRIGINJECCONV_T4_TRGO;
177
177
#endif
178
178
#ifdef TIM5 // if defined timer 5
179
- else if (timer->getHandle ()-> Instance == TIM5)
179
+ else if (timer->Instance == TIM5)
180
180
return ADC_EXTERNALTRIGINJECCONV_T5_TRGO;
181
181
#endif
182
182
#ifdef TIM6 // if defined timer 6
183
- else if (timer->getHandle ()-> Instance == TIM6)
183
+ else if (timer->Instance == TIM6)
184
184
return ADC_EXTERNALTRIGINJECCONV_T6_TRGO;
185
185
#endif
186
186
#ifdef TIM8 // if defined timer 8
187
- else if (timer->getHandle ()-> Instance == TIM8)
187
+ else if (timer->Instance == TIM8)
188
188
return ADC_EXTERNALTRIGINJECCONV_T8_TRGO;
189
189
#endif
190
190
else
@@ -204,27 +204,27 @@ ADC_EXTERNALTRIGCONV_T6_TRGO
204
204
205
205
// timer to regular TRGO
206
206
// https://github.com/stm32duino/Arduino_Core_STM32/blob/e156c32db24d69cb4818208ccc28894e2f427cfa/system/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc.h#L331
207
- uint32_t _timerToRegularTRGO (HardwareTimer * timer){
208
- if (timer->getHandle ()-> Instance == TIM1)
207
+ uint32_t _timerToRegularTRGO (TIM_HandleTypeDef * timer){
208
+ if (timer->Instance == TIM1)
209
209
return ADC_EXTERNALTRIGCONV_T1_TRGO;
210
210
#ifdef TIM2 // if defined timer 2
211
- else if (timer->getHandle ()-> Instance == TIM2)
211
+ else if (timer->Instance == TIM2)
212
212
return ADC_EXTERNALTRIGCONV_T2_TRGO;
213
213
#endif
214
214
#ifdef TIM4 // if defined timer 4
215
- else if (timer->getHandle ()-> Instance == TIM4)
215
+ else if (timer->Instance == TIM4)
216
216
return ADC_EXTERNALTRIGCONV_T4_TRGO;
217
217
#endif
218
218
#ifdef TIM5 // if defined timer 5
219
- else if (timer->getHandle ()-> Instance == TIM5)
219
+ else if (timer->Instance == TIM5)
220
220
return ADC_EXTERNALTRIGCONV_T5_TRGO;
221
221
#endif
222
222
#ifdef TIM6 // if defined timer 6
223
- else if (timer->getHandle ()-> Instance == TIM6)
223
+ else if (timer->Instance == TIM6)
224
224
return ADC_EXTERNALTRIGCONV_T6_TRGO;
225
225
#endif
226
226
#ifdef TIM8 // if defined timer 8
227
- else if (timer->getHandle ()-> Instance == TIM8)
227
+ else if (timer->Instance == TIM8)
228
228
return ADC_EXTERNALTRIGCONV_T8_TRGO;
229
229
#endif
230
230
else
0 commit comments