src/eric7/MicroPython/MicroPythonDevices.py

branch
eric7
changeset 9755
1a09700229e7
parent 9751
606ac0e26533
--- a/src/eric7/MicroPython/MicroPythonDevices.py	Sun Feb 12 15:14:28 2023 +0100
+++ b/src/eric7/MicroPython/MicroPythonDevices.py	Sun Feb 12 18:11:20 2023 +0100
@@ -262,7 +262,7 @@
         ],
         "description": "PyBoard",
         "icon": "micropython48",
-        "port_description": "",
+        "port_description": "Pyboard",
     },
     "rp2040": {
         "ids": [
@@ -272,6 +272,14 @@
         "icon": "rp2040Device",
         "port_description": "",
     },
+    "teensy": {
+        "ids": [
+            (0xF055, 0x9802),  # Pyboard in CDC+MSC mode
+        ],
+        "description": "Teensy",
+        "icon": "micropython48",
+        "port_description": "Teensy",
+    },
     "generic": {
         # only manually configured devices use this
         "ids": [],
@@ -350,6 +358,14 @@
                         # both boards have the same VID and PID
                         # try to differentiate based on port description
                         continue
+                    elif board in ("pyboard", "teensy") and (
+                        not port.description().startswith(
+                            SupportedBoards[board]["port_description"]
+                        )
+                    ):
+                        # both boards have the same VID and PID
+                        # try to differentiate based on port description
+                        continue
                     foundDevices.append(
                         (
                             board,
@@ -464,6 +480,7 @@
         "generic": ".GenericMicroPythonDevices",
         "pyboard": ".PyBoardDevices",
         "rp2040": ".RP2040Devices",
+        "teensy": ".TeensyDevices",
     }
 
     with contextlib.suppress(KeyError):

eric ide

mercurial