@@ -133,31 +133,31 @@ uint32_t _getADCChannel(PinName pin)
133133
134134// timer to injected TRGO
135135// https://github.com/stm32duino/Arduino_Core_STM32/blob/e156c32db24d69cb4818208ccc28894e2f427cfa/system/Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_adc_ex.h#L210
136- uint32_t _timerToInjectedTRGO (HardwareTimer * timer){
137- if (timer->getHandle ()-> Instance == TIM1)
136+ uint32_t _timerToInjectedTRGO (TIM_HandleTypeDef * timer){
137+ if (timer->Instance == TIM1)
138138 return ADC_EXTERNALTRIGINJEC_T1_TRGO;
139139#ifdef TIM2 // if defined timer 2
140- else if (timer->getHandle ()-> Instance == TIM2)
140+ else if (timer->Instance == TIM2)
141141 return ADC_EXTERNALTRIGINJEC_T2_TRGO;
142142#endif
143143#ifdef TIM3 // if defined timer 3
144- else if (timer->getHandle ()-> Instance == TIM3)
144+ else if (timer->Instance == TIM3)
145145 return ADC_EXTERNALTRIGINJEC_T3_TRGO;
146146#endif
147147#ifdef TIM4 // if defined timer 4
148- else if (timer->getHandle ()-> Instance == TIM4)
148+ else if (timer->Instance == TIM4)
149149 return ADC_EXTERNALTRIGINJEC_T4_TRGO;
150150#endif
151151#ifdef TIM6 // if defined timer 6
152- else if (timer->getHandle ()-> Instance == TIM6)
152+ else if (timer->Instance == TIM6)
153153 return ADC_EXTERNALTRIGINJEC_T6_TRGO;
154154#endif
155155#ifdef TIM8 // if defined timer 8
156- else if (timer->getHandle ()-> Instance == TIM8)
156+ else if (timer->Instance == TIM8)
157157 return ADC_EXTERNALTRIGINJEC_T8_TRGO;
158158#endif
159159#ifdef TIM15 // if defined timer 15
160- else if (timer->getHandle ()-> Instance == TIM15)
160+ else if (timer->Instance == TIM15)
161161 return ADC_EXTERNALTRIGINJEC_T15_TRGO;
162162#endif
163163 else
@@ -166,31 +166,31 @@ uint32_t _timerToInjectedTRGO(HardwareTimer* timer){
166166
167167// timer to regular TRGO
168168// https://github.com/stm32duino/Arduino_Core_STM32/blob/6588dee03382e73ed42c4a5e473900ab3b79d6e4/system/Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_adc.h#L519
169- uint32_t _timerToRegularTRGO (HardwareTimer * timer){
170- if (timer->getHandle ()-> Instance == TIM1)
169+ uint32_t _timerToRegularTRGO (TIM_HandleTypeDef * timer){
170+ if (timer->Instance == TIM1)
171171 return ADC_EXTERNALTRIG_T1_TRGO;
172172#ifdef TIM2 // if defined timer 2
173- else if (timer->getHandle ()-> Instance == TIM2)
173+ else if (timer->Instance == TIM2)
174174 return ADC_EXTERNALTRIG_T2_TRGO;
175175#endif
176176#ifdef TIM3 // if defined timer 3
177- else if (timer->getHandle ()-> Instance == TIM3)
177+ else if (timer->Instance == TIM3)
178178 return ADC_EXTERNALTRIG_T3_TRGO;
179179#endif
180180#ifdef TIM4 // if defined timer 4
181- else if (timer->getHandle ()-> Instance == TIM4)
181+ else if (timer->Instance == TIM4)
182182 return ADC_EXTERNALTRIG_T4_TRGO;
183183#endif
184184#ifdef TIM6 // if defined timer 6
185- else if (timer->getHandle ()-> Instance == TIM6)
185+ else if (timer->Instance == TIM6)
186186 return ADC_EXTERNALTRIG_T6_TRGO;
187187#endif
188188#ifdef TIM8 // if defined timer 8
189- else if (timer->getHandle ()-> Instance == TIM8)
189+ else if (timer->Instance == TIM8)
190190 return ADC_EXTERNALTRIG_T8_TRGO;
191191#endif
192192#ifdef TIM15 // if defined timer 15
193- else if (timer->getHandle ()-> Instance == TIM15)
193+ else if (timer->Instance == TIM15)
194194 return ADC_EXTERNALTRIG_T15_TRGO;
195195#endif
196196 else
0 commit comments