Update ci_check_duplicate_usb_vid_pid.py for ESP32
This commit is contained in:
parent
c316b950c7
commit
a9d4f09360
@ -79,7 +79,7 @@ def check_vid_pid(files, clusterlist):
|
|||||||
|
|
||||||
vid_pattern = re.compile(r"^USB_VID\s*=\s*(.*)", flags=re.M)
|
vid_pattern = re.compile(r"^USB_VID\s*=\s*(.*)", flags=re.M)
|
||||||
pid_pattern = re.compile(r"^USB_PID\s*=\s*(.*)", flags=re.M)
|
pid_pattern = re.compile(r"^USB_PID\s*=\s*(.*)", flags=re.M)
|
||||||
usb_pattern = re.compile(r"^CIRCUITPY_USB\s*=\s*0$|^IDF_TARGET = esp32c3$", flags=re.M)
|
usb_pattern = re.compile(r"^CIRCUITPY_USB\s*=\s*0$|^IDF_TARGET = (esp32|esp32c3)$", flags=re.M)
|
||||||
|
|
||||||
usb_ids = defaultdict(set)
|
usb_ids = defaultdict(set)
|
||||||
for board_config in files:
|
for board_config in files:
|
||||||
@ -95,7 +95,7 @@ def check_vid_pid(files, clusterlist):
|
|||||||
elif non_usb:
|
elif non_usb:
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
raise SystemExit(f"Could not parse {board_config}")
|
raise SystemExit(f"Could not find expected settings in {board_config}")
|
||||||
|
|
||||||
usb_ids[id_group].add(board_name)
|
usb_ids[id_group].add(board_name)
|
||||||
|
|
||||||
@ -120,6 +120,29 @@ def check_vid_pid(files, clusterlist):
|
|||||||
f"Otherwise, companies should pay the USB-IF for a vendor ID: https://www.usb.org/getting-vendor-id"
|
f"Otherwise, companies should pay the USB-IF for a vendor ID: https://www.usb.org/getting-vendor-id"
|
||||||
)
|
)
|
||||||
sys.exit(duplicate_message)
|
sys.exit(duplicate_message)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
print("No USB PID duplicates found.")
|
print("No USB PID duplicates found.")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user