src/eric7/MicroPython/Devices/__init__.py

branch
eric7
changeset 9906
39daf45010c8
parent 9901
d1aea8fcba78
child 9922
6a8cc5957928
equal deleted inserted replaced
9905:189b7a23c3c6 9906:39daf45010c8
258 "port_description": "", 258 "port_description": "",
259 "module": ".EspDevices", 259 "module": ".EspDevices",
260 }, 260 },
261 "generic": { 261 "generic": {
262 # only manually configured devices use this 262 # only manually configured devices use this
263 "ids": [], 263 "ids": [
264 "description": QCoreApplication.translate("MicroPythonDevice", "Generic Board"), 264 (0xF055, 0x9802), # Board in FS mode
265 ],
266 "description": QCoreApplication.translate(
267 "MicroPythonDevice", "Generic MicroPython Board"
268 ),
265 "icon": "micropython48", 269 "icon": "micropython48",
266 "port_description": "", 270 "port_description": "Board",
267 "module": ".GenericMicroPythonDevices", 271 "module": ".GenericMicroPythonDevices",
268 }, 272 },
269 "pyboard": { 273 "pyboard": {
270 "ids": [ 274 "ids": [
271 (0xF055, 0x9800), # Pyboard in CDC+MSC mode 275 (0xF055, 0x9800), # Pyboard in CDC+MSC mode
288 "rp2040": { 292 "rp2040": {
289 "ids": [ 293 "ids": [
290 (0x16D0, 0x08C7), # Pimoroni Tiny 2040 (8MB) 294 (0x16D0, 0x08C7), # Pimoroni Tiny 2040 (8MB)
291 (0x1B4F, 0x0025), # SparkFun Thing Plus RP2040 295 (0x1B4F, 0x0025), # SparkFun Thing Plus RP2040
292 (0x1B4F, 0x0026), # SparkFun Pro Micro RP2040 296 (0x1B4F, 0x0026), # SparkFun Pro Micro RP2040
293 (0x2341, 0x025e), # Arduino Nano RP2040 Connect 297 (0x2341, 0x025E), # Arduino Nano RP2040 Connect
294 (0x239A, 0x80F2), # Adafruit Feather RP2040 298 (0x239A, 0x80F2), # Adafruit Feather RP2040
295 (0x239A, 0x80F8), # Adafruit QT Py RP2040 299 (0x239A, 0x80F8), # Adafruit QT Py RP2040
296 (0x239A, 0x80FE), # Adafruit ItsyBitsy RP2040 300 (0x239A, 0x80FE), # Adafruit ItsyBitsy RP2040
297 (0x2E8A, 0x0005), # Raspberry Pi Pico 301 (0x2E8A, 0x0005), # Raspberry Pi Pico
298 (0x2E8A, 0x000C), # Raspberry Pi Pico 302 (0x2E8A, 0x000C), # Raspberry Pi Pico
382 != SupportedBoards[board]["port_description"] 386 != SupportedBoards[board]["port_description"]
383 ): 387 ):
384 # both boards have the same VID and PID 388 # both boards have the same VID and PID
385 # try to differentiate based on port description 389 # try to differentiate based on port description
386 continue 390 continue
387 elif board in ("pyboard", "teensy") and ( 391 elif board in ("generic", "pyboard", "teensy") and (
388 not port.description().startswith( 392 not port.description().startswith(
389 SupportedBoards[board]["port_description"] 393 SupportedBoards[board]["port_description"]
390 ) 394 )
391 ): 395 ):
392 # both boards have the same VID and PID 396 # These boards have the same VID and PID.
393 # try to differentiate based on port description 397 # Try to differentiate based on port description
394 continue 398 continue
395 foundDevices.append( 399 foundDevices.append(
396 ( 400 (
397 board, 401 board,
398 port.description(), 402 port.description(),

eric ide

mercurial