Skip to content

Commit a9d4f09

Browse files
committed
Update ci_check_duplicate_usb_vid_pid.py for ESP32
1 parent c316b95 commit a9d4f09

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

tools/ci_check_duplicate_usb_vid_pid.py

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def check_vid_pid(files, clusterlist):
7979

8080
vid_pattern = re.compile(r"^USB_VID\s*=\s*(.*)", flags=re.M)
8181
pid_pattern = re.compile(r"^USB_PID\s*=\s*(.*)", flags=re.M)
82-
usb_pattern = re.compile(r"^CIRCUITPY_USB\s*=\s*0$|^IDF_TARGET = esp32c3$", flags=re.M)
82+
usb_pattern = re.compile(r"^CIRCUITPY_USB\s*=\s*0$|^IDF_TARGET = (esp32|esp32c3)$", flags=re.M)
8383

8484
usb_ids = defaultdict(set)
8585
for board_config in files:
@@ -95,7 +95,7 @@ def check_vid_pid(files, clusterlist):
9595
elif non_usb:
9696
continue
9797
else:
98-
raise SystemExit(f"Could not parse {board_config}")
98+
raise SystemExit(f"Could not find expected settings in {board_config}")
9999

100100
usb_ids[id_group].add(board_name)
101101

@@ -120,6 +120,29 @@ def check_vid_pid(files, clusterlist):
120120
f"Otherwise, companies should pay the USB-IF for a vendor ID: https://www.usb.org/getting-vendor-id"
121121
)
122122
sys.exit(duplicate_message)
123+
124+
125+
126+
127+
128+
129+
130+
131+
132+
133+
134+
135+
136+
137+
138+
139+
140+
141+
142+
143+
144+
145+
123146
else:
124147
print("No USB PID duplicates found.")
125148

0 commit comments

Comments
 (0)