Skip to content

Commit 755817c

Browse files
Update src/AdvancedADC.cpp
Co-authored-by: Ibrahim Abdelkader <[email protected]>
1 parent cef326b commit 755817c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/AdvancedADC.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,9 @@ int AdvancedADC::begin(uint32_t resolution, uint32_t sample_rate, size_t n_sampl
205205

206206
// Init, config and start the ADC timer.
207207
hal_tim_config(&descr->tim, sample_rate);
208-
if (HAL_TIM_Base_Start(&descr->tim) != HAL_OK) return 0;
208+
if (HAL_TIM_Base_Start(&descr->tim) != HAL_OK) {
209+
return 0;
210+
}
209211

210212
return 1;
211213
}

0 commit comments

Comments
 (0)