src/eric7/MicroPython/GenericMicroPythonDevices.py

branch
eric7
changeset 9496
05017f795c24
parent 9473
3f23dbf37dbe
child 9624
b47dfa7a137d
diff -r 28ab5f487f71 -r 05017f795c24 src/eric7/MicroPython/GenericMicroPythonDevices.py
--- a/src/eric7/MicroPython/GenericMicroPythonDevices.py	Wed Nov 09 09:42:19 2022 +0100
+++ b/src/eric7/MicroPython/GenericMicroPythonDevices.py	Wed Nov 09 10:37:21 2022 +0100
@@ -200,3 +200,21 @@
                 )
 
             return super().getWorkspace()
+
+
+def createDevice(microPythonWidget, deviceType, vid, pid):
+    """
+    Function to instantiate a MicroPython device object.
+
+    @param microPythonWidget reference to the main MicroPython widget
+    @type MicroPythonWidget
+    @param deviceType device type assigned to this device interface
+    @type str
+    @param vid vendor ID
+    @type int
+    @param pid product ID
+    @type int
+    @return reference to the instantiated device object
+    @rtype GenericMicroPythonDevice
+    """
+    return GenericMicroPythonDevice(microPythonWidget, deviceType, vid, pid)

eric ide

mercurial