5 <link rel="stylesheet" href="styles.css"> |
5 <link rel="stylesheet" href="styles.css"> |
6 </head> |
6 </head> |
7 <body> |
7 <body> |
8 <a NAME="top" ID="top"></a> |
8 <a NAME="top" ID="top"></a> |
9 <h1>eric7.MicroPython.Devices.TeensyDevices</h1> |
9 <h1>eric7.MicroPython.Devices.TeensyDevices</h1> |
10 |
|
11 <p> |
10 <p> |
12 Module implementing the device interface class for Teensy boards with MicroPython. |
11 Module implementing the device interface class for Teensy boards with MicroPython. |
13 </p> |
12 </p> |
|
13 |
14 <h3>Global Attributes</h3> |
14 <h3>Global Attributes</h3> |
15 |
|
16 <table> |
15 <table> |
17 <tr><td>None</td></tr> |
16 <tr><td>None</td></tr> |
18 </table> |
17 </table> |
|
18 |
19 <h3>Classes</h3> |
19 <h3>Classes</h3> |
20 |
20 <table> |
21 <table> |
|
22 |
|
23 <tr> |
21 <tr> |
24 <td><a href="#TeensyDevice">TeensyDevice</a></td> |
22 <td><a href="#TeensyDevice">TeensyDevice</a></td> |
25 <td>Class implementing the device for Teensy boards with MicroPython.</td> |
23 <td>Class implementing the device for Teensy boards with MicroPython.</td> |
26 </tr> |
24 </tr> |
27 </table> |
25 </table> |
|
26 |
28 <h3>Functions</h3> |
27 <h3>Functions</h3> |
29 |
28 <table> |
30 <table> |
|
31 |
|
32 <tr> |
29 <tr> |
33 <td><a href="#createDevice">createDevice</a></td> |
30 <td><a href="#createDevice">createDevice</a></td> |
34 <td>Function to instantiate a MicroPython device object.</td> |
31 <td>Function to instantiate a MicroPython device object.</td> |
35 </tr> |
32 </tr> |
36 <tr> |
33 <tr> |
40 <tr> |
37 <tr> |
41 <td><a href="#startTeensyLoader">startTeensyLoader</a></td> |
38 <td><a href="#startTeensyLoader">startTeensyLoader</a></td> |
42 <td>Slot to start the 'Teensy Loader' application.</td> |
39 <td>Slot to start the 'Teensy Loader' application.</td> |
43 </tr> |
40 </tr> |
44 </table> |
41 </table> |
|
42 |
45 <hr /> |
43 <hr /> |
46 <hr /> |
44 <hr /> |
47 <a NAME="TeensyDevice" ID="TeensyDevice"></a> |
45 <a NAME="TeensyDevice" ID="TeensyDevice"></a> |
48 <h2>TeensyDevice</h2> |
46 <h2>TeensyDevice</h2> |
49 |
|
50 <p> |
47 <p> |
51 Class implementing the device for Teensy boards with MicroPython. |
48 Class implementing the device for Teensy boards with MicroPython. |
52 </p> |
49 </p> |
|
50 |
53 <h3>Derived from</h3> |
51 <h3>Derived from</h3> |
54 BaseDevice |
52 BaseDevice |
55 <h3>Class Attributes</h3> |
53 <h3>Class Attributes</h3> |
56 |
|
57 <table> |
54 <table> |
58 <tr><td>None</td></tr> |
55 <tr><td>None</td></tr> |
59 </table> |
56 </table> |
|
57 |
60 <h3>Class Methods</h3> |
58 <h3>Class Methods</h3> |
61 |
|
62 <table> |
59 <table> |
63 <tr><td>None</td></tr> |
60 <tr><td>None</td></tr> |
64 </table> |
61 </table> |
|
62 |
65 <h3>Methods</h3> |
63 <h3>Methods</h3> |
66 |
64 <table> |
67 <table> |
|
68 |
|
69 <tr> |
65 <tr> |
70 <td><a href="#TeensyDevice.__init__">TeensyDevice</a></td> |
66 <td><a href="#TeensyDevice.__init__">TeensyDevice</a></td> |
71 <td>Constructor</td> |
67 <td>Constructor</td> |
72 </tr> |
68 </tr> |
73 <tr> |
69 <tr> |
133 <tr> |
129 <tr> |
134 <td><a href="#TeensyDevice.setButtons">setButtons</a></td> |
130 <td><a href="#TeensyDevice.setButtons">setButtons</a></td> |
135 <td>Public method to enable the supported action buttons.</td> |
131 <td>Public method to enable the supported action buttons.</td> |
136 </tr> |
132 </tr> |
137 </table> |
133 </table> |
|
134 |
138 <h3>Static Methods</h3> |
135 <h3>Static Methods</h3> |
139 |
|
140 <table> |
136 <table> |
141 <tr><td>None</td></tr> |
137 <tr><td>None</td></tr> |
142 </table> |
138 </table> |
|
139 |
143 |
140 |
144 <a NAME="TeensyDevice.__init__" ID="TeensyDevice.__init__"></a> |
141 <a NAME="TeensyDevice.__init__" ID="TeensyDevice.__init__"></a> |
145 <h4>TeensyDevice (Constructor)</h4> |
142 <h4>TeensyDevice (Constructor)</h4> |
146 <b>TeensyDevice</b>(<i>microPythonWidget, deviceType, parent=None</i>) |
143 <b>TeensyDevice</b>(<i>microPythonWidget, deviceType, parent=None</i>) |
147 |
|
148 <p> |
144 <p> |
149 Constructor |
145 Constructor |
150 </p> |
146 </p> |
|
147 |
151 <dl> |
148 <dl> |
152 |
149 |
153 <dt><i>microPythonWidget</i> (MicroPythonWidget)</dt> |
150 <dt><i>microPythonWidget</i> (MicroPythonWidget)</dt> |
154 <dd> |
151 <dd> |
155 reference to the main MicroPython widget |
152 reference to the main MicroPython widget |
164 </dd> |
161 </dd> |
165 </dl> |
162 </dl> |
166 <a NAME="TeensyDevice.__createTeensyMenu" ID="TeensyDevice.__createTeensyMenu"></a> |
163 <a NAME="TeensyDevice.__createTeensyMenu" ID="TeensyDevice.__createTeensyMenu"></a> |
167 <h4>TeensyDevice.__createTeensyMenu</h4> |
164 <h4>TeensyDevice.__createTeensyMenu</h4> |
168 <b>__createTeensyMenu</b>(<i></i>) |
165 <b>__createTeensyMenu</b>(<i></i>) |
169 |
|
170 <p> |
166 <p> |
171 Private method to create the microbit submenu. |
167 Private method to create the microbit submenu. |
172 </p> |
168 </p> |
|
169 |
173 <a NAME="TeensyDevice.__firmwareVersionResponse" ID="TeensyDevice.__firmwareVersionResponse"></a> |
170 <a NAME="TeensyDevice.__firmwareVersionResponse" ID="TeensyDevice.__firmwareVersionResponse"></a> |
174 <h4>TeensyDevice.__firmwareVersionResponse</h4> |
171 <h4>TeensyDevice.__firmwareVersionResponse</h4> |
175 <b>__firmwareVersionResponse</b>(<i>reply</i>) |
172 <b>__firmwareVersionResponse</b>(<i>reply</i>) |
176 |
|
177 <p> |
173 <p> |
178 Private slot handling the response of the latest version request. |
174 Private slot handling the response of the latest version request. |
179 </p> |
175 </p> |
|
176 |
180 <dl> |
177 <dl> |
181 |
178 |
182 <dt><i>reply</i> (QNetworkReply)</dt> |
179 <dt><i>reply</i> (QNetworkReply)</dt> |
183 <dd> |
180 <dd> |
184 reference to the reply object |
181 reference to the reply object |
185 </dd> |
182 </dd> |
186 </dl> |
183 </dl> |
187 <a NAME="TeensyDevice.__resetDevice" ID="TeensyDevice.__resetDevice"></a> |
184 <a NAME="TeensyDevice.__resetDevice" ID="TeensyDevice.__resetDevice"></a> |
188 <h4>TeensyDevice.__resetDevice</h4> |
185 <h4>TeensyDevice.__resetDevice</h4> |
189 <b>__resetDevice</b>(<i></i>) |
186 <b>__resetDevice</b>(<i></i>) |
190 |
|
191 <p> |
187 <p> |
192 Private slot to reset the connected device. |
188 Private slot to reset the connected device. |
193 </p> |
189 </p> |
|
190 |
194 <a NAME="TeensyDevice.__showFirmwareVersions" ID="TeensyDevice.__showFirmwareVersions"></a> |
191 <a NAME="TeensyDevice.__showFirmwareVersions" ID="TeensyDevice.__showFirmwareVersions"></a> |
195 <h4>TeensyDevice.__showFirmwareVersions</h4> |
192 <h4>TeensyDevice.__showFirmwareVersions</h4> |
196 <b>__showFirmwareVersions</b>(<i></i>) |
193 <b>__showFirmwareVersions</b>(<i></i>) |
197 |
|
198 <p> |
194 <p> |
199 Private slot to show the firmware version of the connected device and the |
195 Private slot to show the firmware version of the connected device and the |
200 available firmware version. |
196 available firmware version. |
201 </p> |
197 </p> |
|
198 |
202 <a NAME="TeensyDevice._getSetTimeCode" ID="TeensyDevice._getSetTimeCode"></a> |
199 <a NAME="TeensyDevice._getSetTimeCode" ID="TeensyDevice._getSetTimeCode"></a> |
203 <h4>TeensyDevice._getSetTimeCode</h4> |
200 <h4>TeensyDevice._getSetTimeCode</h4> |
204 <b>_getSetTimeCode</b>(<i></i>) |
201 <b>_getSetTimeCode</b>(<i></i>) |
205 |
|
206 <p> |
202 <p> |
207 Protected method to get the device code to set the time. |
203 Protected method to get the device code to set the time. |
208 </p> |
204 </p> |
209 <p> |
205 <p> |
210 Note: This method must be implemented in the various device specific |
206 Note: This method must be implemented in the various device specific |
211 subclasses. |
207 subclasses. |
212 </p> |
208 </p> |
|
209 |
213 <dl> |
210 <dl> |
214 <dt>Return:</dt> |
211 <dt>Return:</dt> |
215 <dd> |
212 <dd> |
216 code to be executed on the connected device to set the time |
213 code to be executed on the connected device to set the time |
217 </dd> |
214 </dd> |
223 </dd> |
220 </dd> |
224 </dl> |
221 </dl> |
225 <a NAME="TeensyDevice.addDeviceMenuEntries" ID="TeensyDevice.addDeviceMenuEntries"></a> |
222 <a NAME="TeensyDevice.addDeviceMenuEntries" ID="TeensyDevice.addDeviceMenuEntries"></a> |
226 <h4>TeensyDevice.addDeviceMenuEntries</h4> |
223 <h4>TeensyDevice.addDeviceMenuEntries</h4> |
227 <b>addDeviceMenuEntries</b>(<i>menu</i>) |
224 <b>addDeviceMenuEntries</b>(<i>menu</i>) |
228 |
|
229 <p> |
225 <p> |
230 Public method to add device specific entries to the given menu. |
226 Public method to add device specific entries to the given menu. |
231 </p> |
227 </p> |
|
228 |
232 <dl> |
229 <dl> |
233 |
230 |
234 <dt><i>menu</i> (QMenu)</dt> |
231 <dt><i>menu</i> (QMenu)</dt> |
235 <dd> |
232 <dd> |
236 reference to the context menu |
233 reference to the context menu |
237 </dd> |
234 </dd> |
238 </dl> |
235 </dl> |
239 <a NAME="TeensyDevice.canRunScript" ID="TeensyDevice.canRunScript"></a> |
236 <a NAME="TeensyDevice.canRunScript" ID="TeensyDevice.canRunScript"></a> |
240 <h4>TeensyDevice.canRunScript</h4> |
237 <h4>TeensyDevice.canRunScript</h4> |
241 <b>canRunScript</b>(<i></i>) |
238 <b>canRunScript</b>(<i></i>) |
242 |
|
243 <p> |
239 <p> |
244 Public method to determine, if a script can be executed. |
240 Public method to determine, if a script can be executed. |
245 </p> |
241 </p> |
|
242 |
246 <dl> |
243 <dl> |
247 <dt>Return:</dt> |
244 <dt>Return:</dt> |
248 <dd> |
245 <dd> |
249 tuple containing a flag indicating it is safe to start a |
246 tuple containing a flag indicating it is safe to start a |
250 Plotter and a reason why it cannot. |
247 Plotter and a reason why it cannot. |
257 </dd> |
254 </dd> |
258 </dl> |
255 </dl> |
259 <a NAME="TeensyDevice.canStartFileManager" ID="TeensyDevice.canStartFileManager"></a> |
256 <a NAME="TeensyDevice.canStartFileManager" ID="TeensyDevice.canStartFileManager"></a> |
260 <h4>TeensyDevice.canStartFileManager</h4> |
257 <h4>TeensyDevice.canStartFileManager</h4> |
261 <b>canStartFileManager</b>(<i></i>) |
258 <b>canStartFileManager</b>(<i></i>) |
262 |
|
263 <p> |
259 <p> |
264 Public method to determine, if a File Manager can be started. |
260 Public method to determine, if a File Manager can be started. |
265 </p> |
261 </p> |
|
262 |
266 <dl> |
263 <dl> |
267 <dt>Return:</dt> |
264 <dt>Return:</dt> |
268 <dd> |
265 <dd> |
269 tuple containing a flag indicating it is safe to start a |
266 tuple containing a flag indicating it is safe to start a |
270 File Manager and a reason why it cannot. |
267 File Manager and a reason why it cannot. |
277 </dd> |
274 </dd> |
278 </dl> |
275 </dl> |
279 <a NAME="TeensyDevice.canStartPlotter" ID="TeensyDevice.canStartPlotter"></a> |
276 <a NAME="TeensyDevice.canStartPlotter" ID="TeensyDevice.canStartPlotter"></a> |
280 <h4>TeensyDevice.canStartPlotter</h4> |
277 <h4>TeensyDevice.canStartPlotter</h4> |
281 <b>canStartPlotter</b>(<i></i>) |
278 <b>canStartPlotter</b>(<i></i>) |
282 |
|
283 <p> |
279 <p> |
284 Public method to determine, if a Plotter can be started. |
280 Public method to determine, if a Plotter can be started. |
285 </p> |
281 </p> |
|
282 |
286 <dl> |
283 <dl> |
287 <dt>Return:</dt> |
284 <dt>Return:</dt> |
288 <dd> |
285 <dd> |
289 tuple containing a flag indicating it is safe to start a |
286 tuple containing a flag indicating it is safe to start a |
290 Plotter and a reason why it cannot. |
287 Plotter and a reason why it cannot. |
297 </dd> |
294 </dd> |
298 </dl> |
295 </dl> |
299 <a NAME="TeensyDevice.canStartRepl" ID="TeensyDevice.canStartRepl"></a> |
296 <a NAME="TeensyDevice.canStartRepl" ID="TeensyDevice.canStartRepl"></a> |
300 <h4>TeensyDevice.canStartRepl</h4> |
297 <h4>TeensyDevice.canStartRepl</h4> |
301 <b>canStartRepl</b>(<i></i>) |
298 <b>canStartRepl</b>(<i></i>) |
302 |
|
303 <p> |
299 <p> |
304 Public method to determine, if a REPL can be started. |
300 Public method to determine, if a REPL can be started. |
305 </p> |
301 </p> |
|
302 |
306 <dl> |
303 <dl> |
307 <dt>Return:</dt> |
304 <dt>Return:</dt> |
308 <dd> |
305 <dd> |
309 tuple containing a flag indicating it is safe to start a REPL |
306 tuple containing a flag indicating it is safe to start a REPL |
310 and a reason why it cannot. |
307 and a reason why it cannot. |
394 </dd> |
391 </dd> |
395 </dl> |
392 </dl> |
396 <a NAME="TeensyDevice.runScript" ID="TeensyDevice.runScript"></a> |
393 <a NAME="TeensyDevice.runScript" ID="TeensyDevice.runScript"></a> |
397 <h4>TeensyDevice.runScript</h4> |
394 <h4>TeensyDevice.runScript</h4> |
398 <b>runScript</b>(<i>script</i>) |
395 <b>runScript</b>(<i>script</i>) |
399 |
|
400 <p> |
396 <p> |
401 Public method to run the given Python script. |
397 Public method to run the given Python script. |
402 </p> |
398 </p> |
|
399 |
403 <dl> |
400 <dl> |
404 |
401 |
405 <dt><i>script</i> (str)</dt> |
402 <dt><i>script</i> (str)</dt> |
406 <dd> |
403 <dd> |
407 script to be executed |
404 script to be executed |
408 </dd> |
405 </dd> |
409 </dl> |
406 </dl> |
410 <a NAME="TeensyDevice.setButtons" ID="TeensyDevice.setButtons"></a> |
407 <a NAME="TeensyDevice.setButtons" ID="TeensyDevice.setButtons"></a> |
411 <h4>TeensyDevice.setButtons</h4> |
408 <h4>TeensyDevice.setButtons</h4> |
412 <b>setButtons</b>(<i></i>) |
409 <b>setButtons</b>(<i></i>) |
413 |
|
414 <p> |
410 <p> |
415 Public method to enable the supported action buttons. |
411 Public method to enable the supported action buttons. |
416 </p> |
412 </p> |
|
413 |
417 <div align="right"><a href="#top">Up</a></div> |
414 <div align="right"><a href="#top">Up</a></div> |
418 <hr /> |
415 <hr /> |
419 <hr /> |
416 <hr /> |
420 <a NAME="createDevice" ID="createDevice"></a> |
417 <a NAME="createDevice" ID="createDevice"></a> |
421 <h2>createDevice</h2> |
418 <h2>createDevice</h2> |
422 <b>createDevice</b>(<i>microPythonWidget, deviceType, vid, pid, boardName, serialNumber</i>) |
419 <b>createDevice</b>(<i>microPythonWidget, deviceType, vid, pid, boardName, serialNumber</i>) |
423 |
|
424 <p> |
420 <p> |
425 Function to instantiate a MicroPython device object. |
421 Function to instantiate a MicroPython device object. |
426 </p> |
422 </p> |
|
423 |
427 <dl> |
424 <dl> |
428 |
425 |
429 <dt><i>microPythonWidget</i> (MicroPythonWidget)</dt> |
426 <dt><i>microPythonWidget</i> (MicroPythonWidget)</dt> |
430 <dd> |
427 <dd> |
431 reference to the main MicroPython widget |
428 reference to the main MicroPython widget |
467 <hr /> |
464 <hr /> |
468 <hr /> |
465 <hr /> |
469 <a NAME="showTeensyFlashInstructions" ID="showTeensyFlashInstructions"></a> |
466 <a NAME="showTeensyFlashInstructions" ID="showTeensyFlashInstructions"></a> |
470 <h2>showTeensyFlashInstructions</h2> |
467 <h2>showTeensyFlashInstructions</h2> |
471 <b>showTeensyFlashInstructions</b>(<i></i>) |
468 <b>showTeensyFlashInstructions</b>(<i></i>) |
472 |
|
473 <p> |
469 <p> |
474 Slot to show a message box with instruction to flash the Teensy. |
470 Slot to show a message box with instruction to flash the Teensy. |
475 </p> |
471 </p> |
|
472 |
476 <div align="right"><a href="#top">Up</a></div> |
473 <div align="right"><a href="#top">Up</a></div> |
477 <hr /> |
474 <hr /> |
478 <hr /> |
475 <hr /> |
479 <a NAME="startTeensyLoader" ID="startTeensyLoader"></a> |
476 <a NAME="startTeensyLoader" ID="startTeensyLoader"></a> |
480 <h2>startTeensyLoader</h2> |
477 <h2>startTeensyLoader</h2> |
481 <b>startTeensyLoader</b>(<i></i>) |
478 <b>startTeensyLoader</b>(<i></i>) |
482 |
|
483 <p> |
479 <p> |
484 Slot to start the 'Teensy Loader' application. |
480 Slot to start the 'Teensy Loader' application. |
485 </p> |
481 </p> |
486 <p> |
482 <p> |
487 Note: The application must be accessible via the application search path. |
483 Note: The application must be accessible via the application search path. |
488 </p> |
484 </p> |
|
485 |
489 <div align="right"><a href="#top">Up</a></div> |
486 <div align="right"><a href="#top">Up</a></div> |
490 <hr /> |
487 <hr /> |
491 </body></html> |
488 </body></html> |