src/eric7/MicroPython/Devices/STLinkDevices.py

branch
eric7
changeset 10683
779cda568acb
parent 10439
21c28b0f9e41
child 10806
2f6df822e3b9
equal deleted inserted replaced
10682:47be220abdaf 10683:779cda568acb
472 self.executeCommands( 472 self.executeCommands(
473 "import machine\nmachine.reset()\n", mode=self._submitMode 473 "import machine\nmachine.reset()\n", mode=self._submitMode
474 ) 474 )
475 475
476 476
477 def createDevice( 477 def createDevice(microPythonWidget, deviceType, _vid, _pid, _boardName, _serialNumber):
478 microPythonWidget, deviceType, vid, pid, boardName, serialNumber # noqa: U100
479 ):
480 """ 478 """
481 Function to instantiate a MicroPython device object. 479 Function to instantiate a MicroPython device object.
482 480
483 @param microPythonWidget reference to the main MicroPython widget 481 @param microPythonWidget reference to the main MicroPython widget
484 @type MicroPythonWidget 482 @type MicroPythonWidget
485 @param deviceType device type assigned to this device interface 483 @param deviceType device type assigned to this device interface
486 @type str 484 @type str
487 @param vid vendor ID 485 @param _vid vendor ID (unused)
488 @type int 486 @type int
489 @param pid product ID 487 @param _pid product ID (unused)
490 @type int 488 @type int
491 @param boardName name of the board 489 @param _boardName name of the board (unused)
492 @type str 490 @type str
493 @param serialNumber serial number of the board 491 @param _serialNumber serial number of the board (unused)
494 @type str 492 @type str
495 @return reference to the instantiated device object 493 @return reference to the instantiated device object
496 @rtype PyBoardDevice 494 @rtype PyBoardDevice
497 """ 495 """
498 return STLinkDevice(microPythonWidget, deviceType) 496 return STLinkDevice(microPythonWidget, deviceType)

eric ide

mercurial