src/eric7/Documentation/Source/eric7.MicroPython.EspDevices.html

branch
eric7
changeset 9209
b99e7fd55fd3
parent 8926
2855492d8ea6
child 9503
ae9232bf4854
equal deleted inserted replaced
9208:3fc8dfeb6ebe 9209:b99e7fd55fd3
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric7.MicroPython.EspDevices</title>
4 <meta charset="UTF-8">
5 <link rel="stylesheet" href="styles.css">
6 </head>
7 <body>
8 <a NAME="top" ID="top"></a>
9 <h1>eric7.MicroPython.EspDevices</h1>
10
11 <p>
12 Module implementing the device interface class for ESP32 and ESP8266 based
13 boards.
14 </p>
15 <h3>Global Attributes</h3>
16
17 <table>
18 <tr><td>None</td></tr>
19 </table>
20 <h3>Classes</h3>
21
22 <table>
23
24 <tr>
25 <td><a href="#EspDevice">EspDevice</a></td>
26 <td>Class implementing the device for ESP32 and ESP8266 based boards.</td>
27 </tr>
28 </table>
29 <h3>Functions</h3>
30
31 <table>
32 <tr><td>None</td></tr>
33 </table>
34 <hr />
35 <hr />
36 <a NAME="EspDevice" ID="EspDevice"></a>
37 <h2>EspDevice</h2>
38
39 <p>
40 Class implementing the device for ESP32 and ESP8266 based boards.
41 </p>
42 <h3>Derived from</h3>
43 MicroPythonDevice
44 <h3>Class Attributes</h3>
45
46 <table>
47 <tr><td>None</td></tr>
48 </table>
49 <h3>Class Methods</h3>
50
51 <table>
52 <tr><td>None</td></tr>
53 </table>
54 <h3>Methods</h3>
55
56 <table>
57
58 <tr>
59 <td><a href="#EspDevice.__init__">EspDevice</a></td>
60 <td>Constructor</td>
61 </tr>
62 <tr>
63 <td><a href="#EspDevice.__backupFlash">__backupFlash</a></td>
64 <td>Private slot to backup the currently flashed firmware.</td>
65 </tr>
66 <tr>
67 <td><a href="#EspDevice.__eraseFlash">__eraseFlash</a></td>
68 <td>Private slot to erase the device flash memory.</td>
69 </tr>
70 <tr>
71 <td><a href="#EspDevice.__flashAddons">__flashAddons</a></td>
72 <td>Private slot to flash some additional firmware images.</td>
73 </tr>
74 <tr>
75 <td><a href="#EspDevice.__flashMicroPython">__flashMicroPython</a></td>
76 <td>Private slot to flash a MicroPython firmware to the device.</td>
77 </tr>
78 <tr>
79 <td><a href="#EspDevice.__installEspTool">__installEspTool</a></td>
80 <td>Private slot to install the esptool package via pip.</td>
81 </tr>
82 <tr>
83 <td><a href="#EspDevice.__resetDevice">__resetDevice</a></td>
84 <td>Private slot to reset the connected device.</td>
85 </tr>
86 <tr>
87 <td><a href="#EspDevice.__restoreFlash">__restoreFlash</a></td>
88 <td>Private slot to restore a previously saved firmware.</td>
89 </tr>
90 <tr>
91 <td><a href="#EspDevice.__showChipID">__showChipID</a></td>
92 <td>Private slot to show the ID of the ESP chip.</td>
93 </tr>
94 <tr>
95 <td><a href="#EspDevice.__showFlashID">__showFlashID</a></td>
96 <td>Private slot to show the ID of the ESP flash chip.</td>
97 </tr>
98 <tr>
99 <td><a href="#EspDevice.__showMACAddress">__showMACAddress</a></td>
100 <td>Private slot to show the MAC address of the ESP chip.</td>
101 </tr>
102 <tr>
103 <td><a href="#EspDevice.addDeviceMenuEntries">addDeviceMenuEntries</a></td>
104 <td>Public method to add device specific entries to the given menu.</td>
105 </tr>
106 <tr>
107 <td><a href="#EspDevice.canRunScript">canRunScript</a></td>
108 <td>Public method to determine, if a script can be executed.</td>
109 </tr>
110 <tr>
111 <td><a href="#EspDevice.canStartFileManager">canStartFileManager</a></td>
112 <td>Public method to determine, if a File Manager can be started.</td>
113 </tr>
114 <tr>
115 <td><a href="#EspDevice.canStartPlotter">canStartPlotter</a></td>
116 <td>Public method to determine, if a Plotter can be started.</td>
117 </tr>
118 <tr>
119 <td><a href="#EspDevice.canStartRepl">canStartRepl</a></td>
120 <td>Public method to determine, if a REPL can be started.</td>
121 </tr>
122 <tr>
123 <td><a href="#EspDevice.deviceName">deviceName</a></td>
124 <td>Public method to get the name of the device.</td>
125 </tr>
126 <tr>
127 <td><a href="#EspDevice.forceInterrupt">forceInterrupt</a></td>
128 <td>Public method to determine the need for an interrupt when opening the serial connection.</td>
129 </tr>
130 <tr>
131 <td><a href="#EspDevice.getDocumentationUrl">getDocumentationUrl</a></td>
132 <td>Public method to get the device documentation URL.</td>
133 </tr>
134 <tr>
135 <td><a href="#EspDevice.getFirmwareUrl">getFirmwareUrl</a></td>
136 <td>Public method to get the device firmware download URL.</td>
137 </tr>
138 <tr>
139 <td><a href="#EspDevice.hasFlashMenuEntry">hasFlashMenuEntry</a></td>
140 <td>Public method to check, if the device has its own flash menu entry.</td>
141 </tr>
142 <tr>
143 <td><a href="#EspDevice.runScript">runScript</a></td>
144 <td>Public method to run the given Python script.</td>
145 </tr>
146 <tr>
147 <td><a href="#EspDevice.setButtons">setButtons</a></td>
148 <td>Public method to enable the supported action buttons.</td>
149 </tr>
150 </table>
151 <h3>Static Methods</h3>
152
153 <table>
154 <tr><td>None</td></tr>
155 </table>
156
157 <a NAME="EspDevice.__init__" ID="EspDevice.__init__"></a>
158 <h4>EspDevice (Constructor)</h4>
159 <b>EspDevice</b>(<i>microPythonWidget, deviceType, parent=None</i>)
160
161 <p>
162 Constructor
163 </p>
164 <dl>
165
166 <dt><i>microPythonWidget</i> (MicroPythonWidget)</dt>
167 <dd>
168 reference to the main MicroPython widget
169 </dd>
170 <dt><i>deviceType</i> (str)</dt>
171 <dd>
172 device type assigned to this device interface
173 </dd>
174 <dt><i>parent</i> (QObject)</dt>
175 <dd>
176 reference to the parent object
177 </dd>
178 </dl>
179 <a NAME="EspDevice.__backupFlash" ID="EspDevice.__backupFlash"></a>
180 <h4>EspDevice.__backupFlash</h4>
181 <b>__backupFlash</b>(<i></i>)
182
183 <p>
184 Private slot to backup the currently flashed firmware.
185 </p>
186 <a NAME="EspDevice.__eraseFlash" ID="EspDevice.__eraseFlash"></a>
187 <h4>EspDevice.__eraseFlash</h4>
188 <b>__eraseFlash</b>(<i></i>)
189
190 <p>
191 Private slot to erase the device flash memory.
192 </p>
193 <a NAME="EspDevice.__flashAddons" ID="EspDevice.__flashAddons"></a>
194 <h4>EspDevice.__flashAddons</h4>
195 <b>__flashAddons</b>(<i></i>)
196
197 <p>
198 Private slot to flash some additional firmware images.
199 </p>
200 <a NAME="EspDevice.__flashMicroPython" ID="EspDevice.__flashMicroPython"></a>
201 <h4>EspDevice.__flashMicroPython</h4>
202 <b>__flashMicroPython</b>(<i></i>)
203
204 <p>
205 Private slot to flash a MicroPython firmware to the device.
206 </p>
207 <a NAME="EspDevice.__installEspTool" ID="EspDevice.__installEspTool"></a>
208 <h4>EspDevice.__installEspTool</h4>
209 <b>__installEspTool</b>(<i></i>)
210
211 <p>
212 Private slot to install the esptool package via pip.
213 </p>
214 <a NAME="EspDevice.__resetDevice" ID="EspDevice.__resetDevice"></a>
215 <h4>EspDevice.__resetDevice</h4>
216 <b>__resetDevice</b>(<i></i>)
217
218 <p>
219 Private slot to reset the connected device.
220 </p>
221 <a NAME="EspDevice.__restoreFlash" ID="EspDevice.__restoreFlash"></a>
222 <h4>EspDevice.__restoreFlash</h4>
223 <b>__restoreFlash</b>(<i></i>)
224
225 <p>
226 Private slot to restore a previously saved firmware.
227 </p>
228 <a NAME="EspDevice.__showChipID" ID="EspDevice.__showChipID"></a>
229 <h4>EspDevice.__showChipID</h4>
230 <b>__showChipID</b>(<i></i>)
231
232 <p>
233 Private slot to show the ID of the ESP chip.
234 </p>
235 <a NAME="EspDevice.__showFlashID" ID="EspDevice.__showFlashID"></a>
236 <h4>EspDevice.__showFlashID</h4>
237 <b>__showFlashID</b>(<i></i>)
238
239 <p>
240 Private slot to show the ID of the ESP flash chip.
241 </p>
242 <a NAME="EspDevice.__showMACAddress" ID="EspDevice.__showMACAddress"></a>
243 <h4>EspDevice.__showMACAddress</h4>
244 <b>__showMACAddress</b>(<i></i>)
245
246 <p>
247 Private slot to show the MAC address of the ESP chip.
248 </p>
249 <a NAME="EspDevice.addDeviceMenuEntries" ID="EspDevice.addDeviceMenuEntries"></a>
250 <h4>EspDevice.addDeviceMenuEntries</h4>
251 <b>addDeviceMenuEntries</b>(<i>menu</i>)
252
253 <p>
254 Public method to add device specific entries to the given menu.
255 </p>
256 <dl>
257
258 <dt><i>menu</i> (QMenu)</dt>
259 <dd>
260 reference to the context menu
261 </dd>
262 </dl>
263 <a NAME="EspDevice.canRunScript" ID="EspDevice.canRunScript"></a>
264 <h4>EspDevice.canRunScript</h4>
265 <b>canRunScript</b>(<i></i>)
266
267 <p>
268 Public method to determine, if a script can be executed.
269 </p>
270 <dl>
271 <dt>Return:</dt>
272 <dd>
273 tuple containing a flag indicating it is safe to start a
274 Plotter and a reason why it cannot.
275 </dd>
276 </dl>
277 <dl>
278 <dt>Return Type:</dt>
279 <dd>
280 tuple of (bool, str)
281 </dd>
282 </dl>
283 <a NAME="EspDevice.canStartFileManager" ID="EspDevice.canStartFileManager"></a>
284 <h4>EspDevice.canStartFileManager</h4>
285 <b>canStartFileManager</b>(<i></i>)
286
287 <p>
288 Public method to determine, if a File Manager can be started.
289 </p>
290 <dl>
291 <dt>Return:</dt>
292 <dd>
293 tuple containing a flag indicating it is safe to start a
294 File Manager and a reason why it cannot.
295 </dd>
296 </dl>
297 <dl>
298 <dt>Return Type:</dt>
299 <dd>
300 tuple of (bool, str)
301 </dd>
302 </dl>
303 <a NAME="EspDevice.canStartPlotter" ID="EspDevice.canStartPlotter"></a>
304 <h4>EspDevice.canStartPlotter</h4>
305 <b>canStartPlotter</b>(<i></i>)
306
307 <p>
308 Public method to determine, if a Plotter can be started.
309 </p>
310 <dl>
311 <dt>Return:</dt>
312 <dd>
313 tuple containing a flag indicating it is safe to start a
314 Plotter and a reason why it cannot.
315 </dd>
316 </dl>
317 <dl>
318 <dt>Return Type:</dt>
319 <dd>
320 tuple of (bool, str)
321 </dd>
322 </dl>
323 <a NAME="EspDevice.canStartRepl" ID="EspDevice.canStartRepl"></a>
324 <h4>EspDevice.canStartRepl</h4>
325 <b>canStartRepl</b>(<i></i>)
326
327 <p>
328 Public method to determine, if a REPL can be started.
329 </p>
330 <dl>
331 <dt>Return:</dt>
332 <dd>
333 tuple containing a flag indicating it is safe to start a REPL
334 and a reason why it cannot.
335 </dd>
336 </dl>
337 <dl>
338 <dt>Return Type:</dt>
339 <dd>
340 tuple of (bool, str)
341 </dd>
342 </dl>
343 <a NAME="EspDevice.deviceName" ID="EspDevice.deviceName"></a>
344 <h4>EspDevice.deviceName</h4>
345 <b>deviceName</b>(<i></i>)
346
347 <p>
348 Public method to get the name of the device.
349 </p>
350 <dl>
351 <dt>Return:</dt>
352 <dd>
353 name of the device
354 </dd>
355 </dl>
356 <dl>
357 <dt>Return Type:</dt>
358 <dd>
359 str
360 </dd>
361 </dl>
362 <a NAME="EspDevice.forceInterrupt" ID="EspDevice.forceInterrupt"></a>
363 <h4>EspDevice.forceInterrupt</h4>
364 <b>forceInterrupt</b>(<i></i>)
365
366 <p>
367 Public method to determine the need for an interrupt when opening the
368 serial connection.
369 </p>
370 <dl>
371 <dt>Return:</dt>
372 <dd>
373 flag indicating an interrupt is needed
374 </dd>
375 </dl>
376 <dl>
377 <dt>Return Type:</dt>
378 <dd>
379 bool
380 </dd>
381 </dl>
382 <a NAME="EspDevice.getDocumentationUrl" ID="EspDevice.getDocumentationUrl"></a>
383 <h4>EspDevice.getDocumentationUrl</h4>
384 <b>getDocumentationUrl</b>(<i></i>)
385
386 <p>
387 Public method to get the device documentation URL.
388 </p>
389 <dl>
390 <dt>Return:</dt>
391 <dd>
392 documentation URL of the device
393 </dd>
394 </dl>
395 <dl>
396 <dt>Return Type:</dt>
397 <dd>
398 str
399 </dd>
400 </dl>
401 <a NAME="EspDevice.getFirmwareUrl" ID="EspDevice.getFirmwareUrl"></a>
402 <h4>EspDevice.getFirmwareUrl</h4>
403 <b>getFirmwareUrl</b>(<i></i>)
404
405 <p>
406 Public method to get the device firmware download URL.
407 </p>
408 <dl>
409 <dt>Return:</dt>
410 <dd>
411 firmware download URL of the device
412 </dd>
413 </dl>
414 <dl>
415 <dt>Return Type:</dt>
416 <dd>
417 str
418 </dd>
419 </dl>
420 <a NAME="EspDevice.hasFlashMenuEntry" ID="EspDevice.hasFlashMenuEntry"></a>
421 <h4>EspDevice.hasFlashMenuEntry</h4>
422 <b>hasFlashMenuEntry</b>(<i></i>)
423
424 <p>
425 Public method to check, if the device has its own flash menu entry.
426 </p>
427 <dl>
428 <dt>Return:</dt>
429 <dd>
430 flag indicating a specific flash menu entry
431 </dd>
432 </dl>
433 <dl>
434 <dt>Return Type:</dt>
435 <dd>
436 bool
437 </dd>
438 </dl>
439 <a NAME="EspDevice.runScript" ID="EspDevice.runScript"></a>
440 <h4>EspDevice.runScript</h4>
441 <b>runScript</b>(<i>script</i>)
442
443 <p>
444 Public method to run the given Python script.
445 </p>
446 <dl>
447
448 <dt><i>script</i> (str)</dt>
449 <dd>
450 script to be executed
451 </dd>
452 </dl>
453 <a NAME="EspDevice.setButtons" ID="EspDevice.setButtons"></a>
454 <h4>EspDevice.setButtons</h4>
455 <b>setButtons</b>(<i></i>)
456
457 <p>
458 Public method to enable the supported action buttons.
459 </p>
460 <div align="right"><a href="#top">Up</a></div>
461 <hr />
462 </body></html>

eric ide

mercurial