Skip to content

Commit c1e448e

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

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
@@ -132,7 +132,9 @@ int AdvancedADC::begin(uint32_t resolution, uint32_t sample_rate, size_t n_sampl
132132
PinName pin = (PinName) (adc_pins[0] | pin_alt[i]); // First pin decides the ADC.
133133

134134
// Check if pin is mapped.
135-
if (pinmap_find_peripheral(pin, PinMap_ADC) == NC) break;
135+
if (pinmap_find_peripheral(pin, PinMap_ADC) == NC) {
136+
break;
137+
}
136138

137139
// Find the first free ADC according to the available ADCs on pin.
138140
for (size_t j=0; instance == ADC_NP && j<AN_ARRAY_SIZE(adc_descr_all); j++) {

0 commit comments

Comments
 (0)