@@ -163,28 +163,28 @@ ADC_EXTERNALTRIGINJECCONV_T6_TRGO
163163*/
164164// timer to injected TRGO
165165// 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){
167167
168- if (timer->getHandle ()-> Instance == TIM1)
168+ if (timer->Instance == TIM1)
169169 return ADC_EXTERNALTRIGINJECCONV_T1_TRGO;
170170#ifdef TIM2 // if defined timer 2
171- else if (timer->getHandle ()-> Instance == TIM2)
171+ else if (timer->Instance == TIM2)
172172 return ADC_EXTERNALTRIGINJECCONV_T2_TRGO;
173173#endif
174174#ifdef TIM4 // if defined timer 4
175- else if (timer->getHandle ()-> Instance == TIM4)
175+ else if (timer->Instance == TIM4)
176176 return ADC_EXTERNALTRIGINJECCONV_T4_TRGO;
177177#endif
178178#ifdef TIM5 // if defined timer 5
179- else if (timer->getHandle ()-> Instance == TIM5)
179+ else if (timer->Instance == TIM5)
180180 return ADC_EXTERNALTRIGINJECCONV_T5_TRGO;
181181#endif
182182#ifdef TIM6 // if defined timer 6
183- else if (timer->getHandle ()-> Instance == TIM6)
183+ else if (timer->Instance == TIM6)
184184 return ADC_EXTERNALTRIGINJECCONV_T6_TRGO;
185185#endif
186186#ifdef TIM8 // if defined timer 8
187- else if (timer->getHandle ()-> Instance == TIM8)
187+ else if (timer->Instance == TIM8)
188188 return ADC_EXTERNALTRIGINJECCONV_T8_TRGO;
189189#endif
190190 else
@@ -204,27 +204,27 @@ ADC_EXTERNALTRIGCONV_T6_TRGO
204204
205205// timer to regular TRGO
206206// 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)
209209 return ADC_EXTERNALTRIGCONV_T1_TRGO;
210210#ifdef TIM2 // if defined timer 2
211- else if (timer->getHandle ()-> Instance == TIM2)
211+ else if (timer->Instance == TIM2)
212212 return ADC_EXTERNALTRIGCONV_T2_TRGO;
213213#endif
214214#ifdef TIM4 // if defined timer 4
215- else if (timer->getHandle ()-> Instance == TIM4)
215+ else if (timer->Instance == TIM4)
216216 return ADC_EXTERNALTRIGCONV_T4_TRGO;
217217#endif
218218#ifdef TIM5 // if defined timer 5
219- else if (timer->getHandle ()-> Instance == TIM5)
219+ else if (timer->Instance == TIM5)
220220 return ADC_EXTERNALTRIGCONV_T5_TRGO;
221221#endif
222222#ifdef TIM6 // if defined timer 6
223- else if (timer->getHandle ()-> Instance == TIM6)
223+ else if (timer->Instance == TIM6)
224224 return ADC_EXTERNALTRIGCONV_T6_TRGO;
225225#endif
226226#ifdef TIM8 // if defined timer 8
227- else if (timer->getHandle ()-> Instance == TIM8)
227+ else if (timer->Instance == TIM8)
228228 return ADC_EXTERNALTRIGCONV_T8_TRGO;
229229#endif
230230 else
0 commit comments