@@ -133,31 +133,31 @@ uint32_t _getADCChannel(PinName pin)
133
133
134
134
// timer to injected TRGO
135
135
// 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)
138
138
return ADC_EXTERNALTRIGINJEC_T1_TRGO;
139
139
#ifdef TIM2 // if defined timer 2
140
- else if (timer->getHandle ()-> Instance == TIM2)
140
+ else if (timer->Instance == TIM2)
141
141
return ADC_EXTERNALTRIGINJEC_T2_TRGO;
142
142
#endif
143
143
#ifdef TIM3 // if defined timer 3
144
- else if (timer->getHandle ()-> Instance == TIM3)
144
+ else if (timer->Instance == TIM3)
145
145
return ADC_EXTERNALTRIGINJEC_T3_TRGO;
146
146
#endif
147
147
#ifdef TIM4 // if defined timer 4
148
- else if (timer->getHandle ()-> Instance == TIM4)
148
+ else if (timer->Instance == TIM4)
149
149
return ADC_EXTERNALTRIGINJEC_T4_TRGO;
150
150
#endif
151
151
#ifdef TIM6 // if defined timer 6
152
- else if (timer->getHandle ()-> Instance == TIM6)
152
+ else if (timer->Instance == TIM6)
153
153
return ADC_EXTERNALTRIGINJEC_T6_TRGO;
154
154
#endif
155
155
#ifdef TIM8 // if defined timer 8
156
- else if (timer->getHandle ()-> Instance == TIM8)
156
+ else if (timer->Instance == TIM8)
157
157
return ADC_EXTERNALTRIGINJEC_T8_TRGO;
158
158
#endif
159
159
#ifdef TIM15 // if defined timer 15
160
- else if (timer->getHandle ()-> Instance == TIM15)
160
+ else if (timer->Instance == TIM15)
161
161
return ADC_EXTERNALTRIGINJEC_T15_TRGO;
162
162
#endif
163
163
else
@@ -166,31 +166,31 @@ uint32_t _timerToInjectedTRGO(HardwareTimer* timer){
166
166
167
167
// timer to regular TRGO
168
168
// 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)
171
171
return ADC_EXTERNALTRIG_T1_TRGO;
172
172
#ifdef TIM2 // if defined timer 2
173
- else if (timer->getHandle ()-> Instance == TIM2)
173
+ else if (timer->Instance == TIM2)
174
174
return ADC_EXTERNALTRIG_T2_TRGO;
175
175
#endif
176
176
#ifdef TIM3 // if defined timer 3
177
- else if (timer->getHandle ()-> Instance == TIM3)
177
+ else if (timer->Instance == TIM3)
178
178
return ADC_EXTERNALTRIG_T3_TRGO;
179
179
#endif
180
180
#ifdef TIM4 // if defined timer 4
181
- else if (timer->getHandle ()-> Instance == TIM4)
181
+ else if (timer->Instance == TIM4)
182
182
return ADC_EXTERNALTRIG_T4_TRGO;
183
183
#endif
184
184
#ifdef TIM6 // if defined timer 6
185
- else if (timer->getHandle ()-> Instance == TIM6)
185
+ else if (timer->Instance == TIM6)
186
186
return ADC_EXTERNALTRIG_T6_TRGO;
187
187
#endif
188
188
#ifdef TIM8 // if defined timer 8
189
- else if (timer->getHandle ()-> Instance == TIM8)
189
+ else if (timer->Instance == TIM8)
190
190
return ADC_EXTERNALTRIG_T8_TRGO;
191
191
#endif
192
192
#ifdef TIM15 // if defined timer 15
193
- else if (timer->getHandle ()-> Instance == TIM15)
193
+ else if (timer->Instance == TIM15)
194
194
return ADC_EXTERNALTRIG_T15_TRGO;
195
195
#endif
196
196
else
0 commit comments