Skip to content

Commit 47faf93

Browse files
committed
fix(stm32variant): remove duplicate ETH line
only comments are different. Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent 586a76b commit 47faf93

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

‎CI/update/stm32variant.py‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -997,9 +997,17 @@ def can_pinmap(lst):
997997

998998
def eth_pinmap():
999999
eth_pins_list = []
1000+
seen_pins = {}
10001001
wpin = [0]
10011002
inst = "ETH"
10021003
for p in eth_list:
1004+
pin = re.sub(r"_ALT\d+$", "", p[0])
1005+
key = (pin, p[1], p[3])
1006+
if key in seen_pins:
1007+
entry = eth_pins_list[seen_pins[key]]
1008+
if p[2] not in entry["cmt"].split(" | "):
1009+
entry["cmt"] += " | " + p[2]
1010+
continue
10031011
# Note: Some pins are duplicated with only a different signal
10041012
# Now considered as an ALTX pins even ifsame AF
10051013
wpin.append(len(p[0]))
@@ -1013,6 +1021,7 @@ def eth_pinmap():
10131021
"cmt": p[2],
10141022
}
10151023
)
1024+
seen_pins[key] = len(eth_pins_list) - 1
10161025
return dict(
10171026
name="ETHERNET",
10181027
hal=(

‎CI/update/stm32variantv2.py‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -800,9 +800,17 @@ def can_pinmap(lst):
800800

801801
def eth_pinmap():
802802
eth_pins_list = []
803+
seen_pins = {}
803804
wpin = [0]
804805
inst = "ETH"
805806
for p in eth_list:
807+
pin = re.sub(r"_ALT\d+$", "", p[0])
808+
key = (pin, p[1], p[3])
809+
if key in seen_pins:
810+
entry = eth_pins_list[seen_pins[key]]
811+
if p[2] not in entry["cmt"].split(" | "):
812+
entry["cmt"] += " | " + p[2]
813+
continue
806814
# Note: Some pins are duplicated with only a different signal
807815
# Now considered as an ALTX pins even ifsame AF
808816
wpin.append(len(p[0]))
@@ -816,6 +824,7 @@ def eth_pinmap():
816824
"cmt": p[2],
817825
}
818826
)
827+
seen_pins[key] = len(eth_pins_list) - 1
819828
return dict(
820829
name="ETHERNET",
821830
hal="ETH",

0 commit comments

Comments
 (0)