554 rtc = pyb.RTC() |
554 rtc = pyb.RTC() |
555 rtc.datetime(rtc_time[:7] + (0,)) |
555 rtc.datetime(rtc_time[:7] + (0,)) |
556 """ |
556 """ |
557 |
557 |
558 |
558 |
559 def createDevice( |
559 def createDevice(microPythonWidget, deviceType, _vid, _pid, _boardName, _serialNumber): |
560 microPythonWidget, deviceType, vid, pid, boardName, serialNumber # noqa: U100 |
|
561 ): |
|
562 """ |
560 """ |
563 Function to instantiate a MicroPython device object. |
561 Function to instantiate a MicroPython device object. |
564 |
562 |
565 @param microPythonWidget reference to the main MicroPython widget |
563 @param microPythonWidget reference to the main MicroPython widget |
566 @type MicroPythonWidget |
564 @type MicroPythonWidget |
567 @param deviceType device type assigned to this device interface |
565 @param deviceType device type assigned to this device interface |
568 @type str |
566 @type str |
569 @param vid vendor ID |
567 @param _vid vendor ID (unused) |
570 @type int |
568 @type int |
571 @param pid product ID |
569 @param _pid product ID (unused) |
572 @type int |
570 @type int |
573 @param boardName name of the board |
571 @param _boardName name of the board (unused) |
574 @type str |
572 @type str |
575 @param serialNumber serial number of the board |
573 @param _serialNumber serial number of the board (unused) |
576 @type str |
574 @type str |
577 @return reference to the instantiated device object |
575 @return reference to the instantiated device object |
578 @rtype PyBoardDevice |
576 @rtype PyBoardDevice |
579 """ |
577 """ |
580 return PyBoardDevice(microPythonWidget, deviceType) |
578 return PyBoardDevice(microPythonWidget, deviceType) |