Skip to content

Commit 922ac7f

Browse files
committed
ci(stm32variant): update ADC signal match
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent 96efad4 commit 922ac7f

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

CI/update/stm32variant.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -461,10 +461,13 @@ def store_pin(pin, name, dest_list):
461461

462462
# Store ADC list
463463
def store_adc(pin, name, signal):
464-
# Skip Negative input analog channels (INN)
464+
# Skip Negative input analog channels (INN, INM)
465465
# Differential is currently not managed
466-
if "IN" in signal and "INN" not in signal:
467-
adclist.append([pin, name, signal])
466+
# And skip PGA
467+
if "IN" in signal:
468+
skip_signal = re.search(r"IN[N|M]|PGA", signal)
469+
if not skip_signal:
470+
adclist.append([pin, name, signal])
468471

469472

470473
# Store DAC list
@@ -625,14 +628,15 @@ def adc_pinmap():
625628
inst += "1" # single ADC for this product
626629
winst.append(len(inst))
627630
wpin.append(len(p[0]))
628-
if "INN" in a[1]:
631+
negative = re.search(r"IN[N|M]", a[1])
632+
if negative:
629633
# Negative input analog channels
630634
inv = "1"
631635
else:
632636
# Positive input analog channels
633637
inv = "0"
634638
# chan
635-
chan = re.sub(r"^IN[N|P]?|\D*$", "", a[1])
639+
chan = re.sub(r"^V?IN[N|P|M]?|\D*$", "", a[1])
636640
if a[1].endswith("b"):
637641
mode = "STM_MODE_ANALOG_ADC_CHANNEL_BANK_B"
638642
else:

0 commit comments

Comments
 (0)