189 ( |
189 ( |
190 self.tr("CircuitPython Libraries"), |
190 self.tr("CircuitPython Libraries"), |
191 Preferences.getMicroPython("CircuitPythonLibrariesUrl"), |
191 Preferences.getMicroPython("CircuitPythonLibrariesUrl"), |
192 ), |
192 ), |
193 ] |
193 ] |
|
194 |
|
195 |
|
196 def createDevice(microPythonWidget, deviceType, vid, pid): |
|
197 """ |
|
198 Function to instantiate a MicroPython device object. |
|
199 |
|
200 @param microPythonWidget reference to the main MicroPython widget |
|
201 @type MicroPythonWidget |
|
202 @param deviceType device type assigned to this device interface |
|
203 @type str |
|
204 @param vid vendor ID |
|
205 @type int |
|
206 @param pid product ID |
|
207 @type int |
|
208 @return reference to the instantiated device object |
|
209 @rtype RP2040Device |
|
210 """ |
|
211 return RP2040Device(microPythonWidget, deviceType) |