diff --git a/ports/stm32/boards/make-pins.py b/ports/stm32/boards/make-pins.py index 31e7bdb0e2f2..9f9950ff1746 100755 --- a/ports/stm32/boards/make-pins.py +++ b/ports/stm32/boards/make-pins.py @@ -135,7 +135,11 @@ def add_adc(self, adc): "Invalid adc '{:s}' for pin '{:s}'".format(adc_name, self.name()) ) adc_units = [int(x) for x in m.group(1)] - _adc_mode = m.group(2) + adc_mode = m.group(2) + if adc_mode == "INN": + # On H7 we have INN/INP, all other parts use IN only. Only use + # IN or INP channels. + continue adc_channel = int(m.group(3)) # Pick the entry with the most ADC units, e.g. "ADC1_INP16/ADC12_INN1/ADC12_INP0" --> "ADC12_INN1". @@ -247,6 +251,8 @@ def print_adcs(self, out_source): ) # Don't include pins that weren't in pins.csv. for pin in self.available_pins(): + if pin._hidden: + continue if adc_unit in pin._adc_units: print( " [{:d}] = {:s},".format(pin._adc_channel, self._cpu_pin_pointer(pin)),