412 "pyb.bootloader()", |
412 "pyb.bootloader()", |
413 ] |
413 ] |
414 ) |
414 ) |
415 # simulate pressing the disconnect button |
415 # simulate pressing the disconnect button |
416 self.microPython.on_connectButton_clicked() |
416 self.microPython.on_connectButton_clicked() |
|
417 |
|
418 |
|
419 def createDevice(microPythonWidget, deviceType, vid, pid): |
|
420 """ |
|
421 Function to instantiate a MicroPython device object. |
|
422 |
|
423 @param microPythonWidget reference to the main MicroPython widget |
|
424 @type MicroPythonWidget |
|
425 @param deviceType device type assigned to this device interface |
|
426 @type str |
|
427 @param vid vendor ID |
|
428 @type int |
|
429 @param pid product ID |
|
430 @type int |
|
431 @return reference to the instantiated device object |
|
432 @rtype PyBoardDevice |
|
433 """ |
|
434 return PyBoardDevice(microPythonWidget, deviceType) |