eric6/MicroPython/MicroPythonDevices.py

branch
maintenance
changeset 8576
fe1957c69854
parent 8509
df6e76de4cd0
diff -r d0123f020daa -r fe1957c69854 eric6/MicroPython/MicroPythonDevices.py
--- a/eric6/MicroPython/MicroPythonDevices.py	Sat Jul 03 11:47:48 2021 +0200
+++ b/eric6/MicroPython/MicroPythonDevices.py	Sat Sep 04 11:34:54 2021 +0200
@@ -40,6 +40,7 @@
     
     "circuitpython": {
         "ids": [
+            (0x04D8, 0xEA2A),       # BHDynamics DynaLoRa_USB
             (0x04D8, 0xEAD1),       # BH Dynamics DynOSSAT-EDU-EPS-v1.0
             (0x04D8, 0xEAD2),       # BH Dynamics DynOSSAT-EDU-OBC-v1.0
             (0x04D8, 0xEC44),       # maholli PyCubed
@@ -55,6 +56,7 @@
             (0x04D8, 0xEE8D),       # J&J Studios LLC datum-IMU
             (0x04D8, 0xEE8E),       # J&J Studios LLC datum-Light
             (0x04D8, 0xEE8F),       # J&J Studios LLC datum-Weather
+            (0x04D8, 0xEF67),       # senseBox MCU
             (0x054C, 0x0BC2),       # Sony Spresense
             (0x1209, 0x2017),       # Benjamin Shockley Mini SAM M4
             (0x1209, 0x3252),       # Targett Module Clip w/Wroom
@@ -62,7 +64,9 @@
             (0x1209, 0x4D43),       # Robotics Masters Robo HAT MM1 M4
             (0x1209, 0x4DDD),       # ODT CP Sapling
             (0x1209, 0x4DDE),       # ODT CP Sapling M0 w/ SPI Flash
+            (0x1209, 0x4DDF),       # ODT CP Sapling Rev B
             (0x1209, 0x5BF0),       # Foosn Fomu
+            (0x1209, 0x7150),       # Electronic Cats Hunter Cat NFC
             (0x1209, 0x805A),       # Electronic Cats BastBLE
             (0x1209, 0xBAB0),       # Electronic Cats Bast WiFi
             (0x1209, 0xBAB1),       # Electronic Cats Meow Meow
@@ -73,10 +77,18 @@
             (0x1209, 0xC051),       # Betrusted Simmel
             (0x1209, 0xE3E3),       # StackRduino M0 PRO
             (0x1209, 0xF500),       # Silicognition LLC M4-Shim
+            (0x16D0, 0x08C6),       # Pimoroni Keybow 2040
+            (0x16D0, 0x08C7),       # Pimoroni Tiny 2040
+            (0x16D0, 0x08C8),       # Pimoroni PicoSystem
             (0x1915, 0xB001),       # Makerdiary Pitaya Go
             (0x1B4F, 0x0015),       # SparkFun RedBoard Turbo Board
             (0x1B4F, 0x0016),       # SparkFun SAMD51 Thing+
             (0x1B4F, 0x0017),       # SparkFun LUMIDrive Board
+            (0x1B4F, 0x0020),       # SparkFun MicroMod SAMD51
+            (0x1B4F, 0x0021),       # SparkFun SFE_nRF52840_MicroMod
+            (0x1B4F, 0x0024),       # SparkFun MicroMod RP2040
+            (0x1B4F, 0x0025),       # SparkFun Thing Plus RP2040
+            (0x1B4F, 0x0026),       # SparkFun Pro Micro RP2040
             (0x1B4F, 0x5289),       # SparkFun SFE_nRF52840_Mini
             (0x1B4F, 0x8D22),       # SparkFun SAMD21 Mini Breakout
             (0x1B4F, 0x8D23),       # SparkFun SAMD21 Dev Breakout
@@ -94,10 +106,20 @@
             (0x2B04, 0xC00C),       # Particle Argon
             (0x2B04, 0xC00D),       # Particle Boron
             (0x2B04, 0xC00E),       # Particle Xenon
+            (0x2E8A, 0x1000),       # Cytron Maker Pi RP2040
+            (0x2E8A, 0x1002),       # Pimoroni Pico LiPo (4MB)
+            (0x2E8A, 0x1003),       # Pimoroni Pico LiPo (16MB)
+            (0x2E8A, 0x1008),       # Pimoroni PGA2040
+            (0x303A, 0x8002),       # UnexpectedMaker TinyS2
             (0x303A, 0x8007),       # LILYGO TTGO T8 ESP32-S2
-            (0x3171, 0x0101),       # 8086 Consultancy Commander
+            (0x303A, 0x80AA),       # Espressif Franzininho WIFI w/Wroom
+            (0x303A, 0x80AD),       # Espressif Franzininho WIFI w/Wrover
+            (0x303A, 0x80AF),       # Artisense Reference Design RD00
+            (0x303A, 0x80B2),       # Muselab nanoESP32-S2  w/Wrover
+            (0x3171, 0x0101),       # 8086.net Commander
             (0x31E2, 0x2001),       # BDMICRO LLC VINA-D21
             (0x31E2, 0x2011),       # BDMICRO LLC VINA-D51
+            (0x31E2, 0x2021),       # BDMICRO LLC VINA-D51
             (0x32BD, 0x3001),       # Alorium Tech. AloriumTech Evo M51
             (0x4097, 0x0001),       # TG-Boards Datalore IP M4
             
@@ -201,27 +223,36 @@
     
     availablePorts = QSerialPortInfo.availablePorts()
     for port in availablePorts:
-        supported = False
-        vid = port.vendorIdentifier()
-        pid = port.productIdentifier()
-        
-        if not port.isValid():
-            # no device detected at port
-            continue
-        
-        for board in SupportedBoards:
-            if (
-                (vid, pid) in SupportedBoards[board]["ids"] or
-                (vid, None) in SupportedBoards[board]["ids"]
-            ):
+        if port.hasVendorIdentifier() and port.hasProductIdentifier():
+            supported = False
+            vid = port.vendorIdentifier()
+            pid = port.productIdentifier()
+            
+            for board in SupportedBoards:
                 if (
-                    board in ("bbc_microbit", "calliope") and
-                    (port.description().strip() !=
-                     SupportedBoards[board]["port_description"])
+                    (vid, pid) in SupportedBoards[board]["ids"] or
+                    (vid, None) in SupportedBoards[board]["ids"]
                 ):
-                    # both boards have the same VID and PID
-                    # try to differentiate based on port description
-                    continue
+                    if (
+                        board in ("bbc_microbit", "calliope") and
+                        (port.description().strip() !=
+                         SupportedBoards[board]["port_description"])
+                    ):
+                        # both boards have the same VID and PID
+                        # try to differentiate based on port description
+                        continue
+                    foundDevices.append((
+                        board,
+                        port.description(),
+                        SupportedBoards[board]["description"],
+                        port.portName(),
+                        vid,
+                        pid,
+                    ))
+                    supported = True
+            if not supported and (vid, pid) in manualDevices:
+                # check the locally added ones next
+                board = manualDevices[(vid, pid)]["type"]
                 foundDevices.append((
                     board,
                     port.description(),
@@ -231,31 +262,19 @@
                     pid,
                 ))
                 supported = True
-        if not supported and (vid, pid) in manualDevices:
-            # check the locally added ones next
-            board = manualDevices[(vid, pid)]["type"]
-            foundDevices.append((
-                board,
-                port.description(),
-                SupportedBoards[board]["description"],
-                port.portName(),
-                vid,
-                pid,
-            ))
-            supported = True
-        if not supported:
-            if vid and pid:
-                if (vid, pid) not in IgnoredBoards:
-                    unknownDevices.append((vid, pid, port.description()))
-                    logging.debug("Unknown device: (0x%04x:0x%04x %s)",
-                                  vid, pid, port.description())
-            else:
-                # either VID or PID or both not detected
-                desc = port.description()
-                if not desc:
-                    desc = QCoreApplication.translate("MicroPythonDevice",
-                                                      "Unknown Device")
-                unknownPorts.append((vid, pid, desc, port.portName()))
+            if not supported:
+                if vid and pid:
+                    if (vid, pid) not in IgnoredBoards:
+                        unknownDevices.append((vid, pid, port.description()))
+                        logging.debug("Unknown device: (0x%04x:0x%04x %s)",
+                                      vid, pid, port.description())
+                else:
+                    # either VID or PID or both not detected
+                    desc = port.description()
+                    if not desc:
+                        desc = QCoreApplication.translate("MicroPythonDevice",
+                                                          "Unknown Device")
+                    unknownPorts.append((vid, pid, desc, port.portName()))
     
     return foundDevices, unknownDevices, unknownPorts
 

eric ide

mercurial