282 rtc = machine.RTC() |
282 rtc = machine.RTC() |
283 rtc.init(rtc_time[:7] + (0,)) |
283 rtc.init(rtc_time[:7] + (0,)) |
284 """ |
284 """ |
285 |
285 |
286 |
286 |
287 def createDevice( |
287 def createDevice(microPythonWidget, deviceType, _vid, _pid, _boardName, _serialNumber): |
288 microPythonWidget, deviceType, vid, pid, boardName, serialNumber # noqa: U100 |
|
289 ): |
|
290 """ |
288 """ |
291 Function to instantiate a MicroPython device object. |
289 Function to instantiate a MicroPython device object. |
292 |
290 |
293 @param microPythonWidget reference to the main MicroPython widget |
291 @param microPythonWidget reference to the main MicroPython widget |
294 @type MicroPythonWidget |
292 @type MicroPythonWidget |
295 @param deviceType device type assigned to this device interface |
293 @param deviceType device type assigned to this device interface |
296 @type str |
294 @type str |
297 @param vid vendor ID |
295 @param _vid vendor ID (unused) |
298 @type int |
296 @type int |
299 @param pid product ID |
297 @param _pid product ID (unused) |
300 @type int |
298 @type int |
301 @param boardName name of the board |
299 @param _boardName name of the board (unused) |
302 @type str |
300 @type str |
303 @param serialNumber serial number of the board |
301 @param _serialNumber serial number of the board (unused) |
304 @type str |
302 @type str |
305 @return reference to the instantiated device object |
303 @return reference to the instantiated device object |
306 @rtype PyBoardDevice |
304 @rtype PyBoardDevice |
307 """ |
305 """ |
308 return TeensyDevice(microPythonWidget, deviceType) |
306 return TeensyDevice(microPythonWidget, deviceType) |