Skip to content

Commit 4869a3f

Browse files
committed
🧑‍💻 Fix pinsformat.py pin pattern recognition
1 parent c2d0008 commit 4869a3f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

buildroot/share/scripts/pinsformat.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def concat_with_space(s1, s2):
4343
ppad = [ 3, 4, 5, 5 ]
4444

4545
# Match a define line
46-
definePatt = re.compile(rf'^\s*(//)?#define\s+[A-Z_][A-Z0-9_]+\s+({mstr})\s*(//.*)?$')
46+
definePinPatt = re.compile(rf'^\s*(//)?#define\s+[A-Z_][A-Z0-9_]+?_PIN\s+({mstr})\s*(//.*)?$')
4747

4848
def format_pins(argv):
4949
src_file = 'stdin'
@@ -93,7 +93,7 @@ def get_pin_pattern(txt):
9393
# Find the most common matching pattern
9494
match_threshold = 5
9595
for line in txt.split('\n'):
96-
r = definePatt.match(line)
96+
r = definePinPatt.match(line)
9797
if r == None: continue
9898
ind = -1
9999
for p in mexpr:

0 commit comments

Comments
 (0)