395 except Exception: |
395 except Exception: |
396 pass |
396 pass |
397 """ |
397 """ |
398 |
398 |
399 |
399 |
400 def createDevice( |
400 def createDevice(microPythonWidget, deviceType, vid, pid, _boardName, _serialNumber): |
401 microPythonWidget, deviceType, vid, pid, boardName, serialNumber # noqa: U100 |
|
402 ): |
|
403 """ |
401 """ |
404 Function to instantiate a MicroPython device object. |
402 Function to instantiate a MicroPython device object. |
405 |
403 |
406 @param microPythonWidget reference to the main MicroPython widget |
404 @param microPythonWidget reference to the main MicroPython widget |
407 @type MicroPythonWidget |
405 @type MicroPythonWidget |
409 @type str |
407 @type str |
410 @param vid vendor ID |
408 @param vid vendor ID |
411 @type int |
409 @type int |
412 @param pid product ID |
410 @param pid product ID |
413 @type int |
411 @type int |
414 @param boardName name of the board |
412 @param _boardName name of the board (unused) |
415 @type str |
413 @type str |
416 @param serialNumber serial number of the board |
414 @param _serialNumber serial number of the board (unused) |
417 @type str |
415 @type str |
418 @return reference to the instantiated device object |
416 @return reference to the instantiated device object |
419 @rtype GenericMicroPythonDevice |
417 @rtype GenericMicroPythonDevice |
420 """ |
418 """ |
421 return GenericMicroPythonDevice(microPythonWidget, deviceType, vid, pid) |
419 return GenericMicroPythonDevice(microPythonWidget, deviceType, vid, pid) |