Skip to content

Commit bc5b920

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

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
@@ -158,7 +158,9 @@ int AdvancedADC::begin(uint32_t resolution, uint32_t sample_rate, size_t n_sampl
158158
// Calculate alternate function pin.
159159
PinName pin = (PinName) (adc_pins[i] | pin_alt[j]);
160160
// Check if pin is mapped.
161-
if (pinmap_find_peripheral(pin, PinMap_ADC) == NC) break;
161+
if (pinmap_find_peripheral(pin, PinMap_ADC) == NC) {
162+
break;
163+
}
162164
// Check if pin is connected to the selected ADC.
163165
if (instance == pinmap_peripheral(pin, PinMap_ADC)) {
164166
pinmap_pinout(pin, PinMap_ADC);

0 commit comments

Comments
 (0)