Skip to content

Commit a7fb333

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

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/HALConfig.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,9 @@ int hal_adc_config(ADC_HandleTypeDef *adc, uint32_t resolution, uint32_t trigger
211211
uint32_t channel = STM_PIN_CHANNEL(function);
212212
sConfig.Rank = ADC_RANK_LUT[rank];
213213
sConfig.Channel = __HAL_ADC_DECIMAL_NB_TO_CHANNEL(channel);
214-
if (HAL_ADC_ConfigChannel(adc, &sConfig) != HAL_OK) return -1;
214+
if (HAL_ADC_ConfigChannel(adc, &sConfig) != HAL_OK) {
215+
return -1;
216+
}
215217
}
216218

217219
return 0;

0 commit comments

Comments
 (0)