73 <td><a href="#MicrobitDevice.__init__">MicrobitDevice</a></td> |
73 <td><a href="#MicrobitDevice.__init__">MicrobitDevice</a></td> |
74 <td>Constructor</td> |
74 <td>Constructor</td> |
75 </tr> |
75 </tr> |
76 <tr> |
76 <tr> |
77 <td><a href="#MicrobitDevice.__flashMicroPython">__flashMicroPython</a></td> |
77 <td><a href="#MicrobitDevice.__flashMicroPython">__flashMicroPython</a></td> |
78 <td>Private slot to flash the default MicroPython firmware to the device.</td> |
78 <td>Private slot to flash MicroPython or the DAPLink firmware to the device.</td> |
79 </tr> |
79 </tr> |
80 <tr> |
80 <tr> |
81 <td><a href="#MicrobitDevice.__resetDevice">__resetDevice</a></td> |
81 <td><a href="#MicrobitDevice.__resetDevice">__resetDevice</a></td> |
82 <td>Private slot to reset the connected device.</td> |
82 <td>Private slot to reset the connected device.</td> |
83 </tr> |
83 </tr> |
110 <td>Public method to determine, if a REPL can be started.</td> |
110 <td>Public method to determine, if a REPL can be started.</td> |
111 </tr> |
111 </tr> |
112 <tr> |
112 <tr> |
113 <td><a href="#MicrobitDevice.deviceName">deviceName</a></td> |
113 <td><a href="#MicrobitDevice.deviceName">deviceName</a></td> |
114 <td>Public method to get the name of the device.</td> |
114 <td>Public method to get the name of the device.</td> |
|
115 </tr> |
|
116 <tr> |
|
117 <td><a href="#MicrobitDevice.downloadFirmware">downloadFirmware</a></td> |
|
118 <td>Public method to download the device firmware.</td> |
115 </tr> |
119 </tr> |
116 <tr> |
120 <tr> |
117 <td><a href="#MicrobitDevice.forceInterrupt">forceInterrupt</a></td> |
121 <td><a href="#MicrobitDevice.forceInterrupt">forceInterrupt</a></td> |
118 <td>Public method to determine the need for an interrupt when opening the serial connection.</td> |
122 <td>Public method to determine the need for an interrupt when opening the serial connection.</td> |
119 </tr> |
123 </tr> |
170 reference to the parent object |
174 reference to the parent object |
171 </dd> |
175 </dd> |
172 </dl> |
176 </dl> |
173 <a NAME="MicrobitDevice.__flashMicroPython" ID="MicrobitDevice.__flashMicroPython"></a> |
177 <a NAME="MicrobitDevice.__flashMicroPython" ID="MicrobitDevice.__flashMicroPython"></a> |
174 <h4>MicrobitDevice.__flashMicroPython</h4> |
178 <h4>MicrobitDevice.__flashMicroPython</h4> |
175 <b>__flashMicroPython</b>(<i></i>) |
179 <b>__flashMicroPython</b>(<i>firmware=False</i>) |
176 |
180 |
177 <p> |
181 <p> |
178 Private slot to flash the default MicroPython firmware to the device. |
182 Private slot to flash MicroPython or the DAPLink firmware to the |
179 </p> |
183 device. |
|
184 </p> |
|
185 <dl> |
|
186 |
|
187 <dt><i>firmware</i> (bool)</dt> |
|
188 <dd> |
|
189 flag indicating to flash the DAPLink firmware |
|
190 </dd> |
|
191 </dl> |
180 <a NAME="MicrobitDevice.__resetDevice" ID="MicrobitDevice.__resetDevice"></a> |
192 <a NAME="MicrobitDevice.__resetDevice" ID="MicrobitDevice.__resetDevice"></a> |
181 <h4>MicrobitDevice.__resetDevice</h4> |
193 <h4>MicrobitDevice.__resetDevice</h4> |
182 <b>__resetDevice</b>(<i></i>) |
194 <b>__resetDevice</b>(<i></i>) |
183 |
195 |
184 <p> |
196 <p> |
307 |
319 |
308 <p> |
320 <p> |
309 Public method to get the name of the device. |
321 Public method to get the name of the device. |
310 </p> |
322 </p> |
311 <dl> |
323 <dl> |
312 <dt>Returns:</dt> |
324 <dt>Return:</dt> |
313 <dd> |
325 <dd> |
314 name of the device |
326 name of the device |
315 </dd> |
327 </dd> |
316 </dl> |
328 </dl> |
317 <dl> |
329 <dl> |
318 <dt>Return Type:</dt> |
330 <dt>Return Type:</dt> |
319 <dd> |
331 <dd> |
320 str |
332 str |
321 </dd> |
333 </dd> |
322 </dl> |
334 </dl> |
|
335 <a NAME="MicrobitDevice.downloadFirmware" ID="MicrobitDevice.downloadFirmware"></a> |
|
336 <h4>MicrobitDevice.downloadFirmware</h4> |
|
337 <b>downloadFirmware</b>(<i></i>) |
|
338 |
|
339 <p> |
|
340 Public method to download the device firmware. |
|
341 </p> |
323 <a NAME="MicrobitDevice.forceInterrupt" ID="MicrobitDevice.forceInterrupt"></a> |
342 <a NAME="MicrobitDevice.forceInterrupt" ID="MicrobitDevice.forceInterrupt"></a> |
324 <h4>MicrobitDevice.forceInterrupt</h4> |
343 <h4>MicrobitDevice.forceInterrupt</h4> |
325 <b>forceInterrupt</b>(<i></i>) |
344 <b>forceInterrupt</b>(<i></i>) |
326 |
345 |
327 <p> |
346 <p> |
328 Public method to determine the need for an interrupt when opening the |
347 Public method to determine the need for an interrupt when opening the |
329 serial connection. |
348 serial connection. |
330 </p> |
349 </p> |
331 <dl> |
350 <dl> |
332 <dt>Returns:</dt> |
351 <dt>Return:</dt> |
333 <dd> |
352 <dd> |
334 flag indicating an interrupt is needed |
353 flag indicating an interrupt is needed |
335 </dd> |
354 </dd> |
336 </dl> |
355 </dl> |
337 <dl> |
356 <dl> |
359 str |
378 str |
360 </dd> |
379 </dd> |
361 </dl> |
380 </dl> |
362 <a NAME="MicrobitDevice.getFirmwareUrl" ID="MicrobitDevice.getFirmwareUrl"></a> |
381 <a NAME="MicrobitDevice.getFirmwareUrl" ID="MicrobitDevice.getFirmwareUrl"></a> |
363 <h4>MicrobitDevice.getFirmwareUrl</h4> |
382 <h4>MicrobitDevice.getFirmwareUrl</h4> |
364 <b>getFirmwareUrl</b>(<i></i>) |
383 <b>getFirmwareUrl</b>(<i>fwtype="mpy"</i>) |
365 |
384 |
366 <p> |
385 <p> |
367 Public method to get the device firmware download URL. |
386 Public method to get the device firmware download URL. |
368 </p> |
387 </p> |
369 <dl> |
388 <dl> |
370 <dt>Returns:</dt> |
389 |
|
390 <dt><i>fwtype</i> (str (optional))</dt> |
|
391 <dd> |
|
392 type of firmware to download |
|
393 (valid values are "mpy" and "dap"; defaults to "mpy") |
|
394 </dd> |
|
395 </dl> |
|
396 <dl> |
|
397 <dt>Return:</dt> |
371 <dd> |
398 <dd> |
372 firmware download URL of the device |
399 firmware download URL of the device |
373 </dd> |
400 </dd> |
374 </dl> |
401 </dl> |
375 <dl> |
402 <dl> |