VID and PID

This commit is contained in:
2025-07-22 21:01:06 +01:00
parent d7ced2660e
commit 97ec3f77e6
8 changed files with 7 additions and 12 deletions
+5 -10
View File
@@ -43,22 +43,17 @@ class RP2040UploaderApp:
return entry
def find_rp2040_port(self):
ports = serial.tools.list_ports.comports()
if not ports:
return None
target_vid = 0x239A
target_pid = 0x80F2
# Look for common Pico descriptors
ports = serial.tools.list_ports.comports()
for port in ports:
desc = port.description.lower()
if any(keyword in desc for keyword in ["pico", "rp2", "raspberry", "board"]):
if port.vid == target_vid and port.pid == target_pid:
return port.device
# Fall back to the only port found
if len(ports) == 1:
return ports[0].device
return None
def load_config(self):
if os.path.isfile(self.config_path):
try: