Skip to content

Commit

Permalink
tentative support for RP235x
Browse files Browse the repository at this point in the history
  • Loading branch information
FilipDominec committed Feb 27, 2025
1 parent e5538c2 commit 2284574
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions rp2daq.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,14 @@ def _find_device(self, required_device_id, required_firmware_version=0):
specified, for its particular unique vendor name.
"""

VID, PID = 0x2e8a, 0x000a
port_list = list_ports.comports()

for port_name in port_list:
# filter out ports, without disturbing previously connected devices
if not port_name.hwid.startswith("USB VID:PID=2E8A:000A SER="+required_device_id.upper()):
#VID=0x2e8a; PID = 0x000a for RP2040, but 0x0009 for RP2350
print(port_name.hwid)
if not (port_name.hwid.startswith("USB VID:PID=2E8A:000A SER="+required_device_id.upper()) or
port_name.hwid.startswith("USB VID:PID=2E8A:0009 SER="+required_device_id.upper()) ):
continue
#print(f"port_name.hwid={port_name.hwid}")
try_port = serial.Serial(port=port_name.device, timeout=1)
Expand Down

0 comments on commit 2284574

Please sign in to comment.