eric6/Documentation/Source/eric6.MicroPython.EspDevices.html

changeset 7273
391d6b7b1eff
parent 7174
de8175253dfc
child 7336
0095e231ddaf
equal deleted inserted replaced
7272:1779dc278077 7273:391d6b7b1eff
16 16
17 a { color: #BA6D36; } 17 a { color: #BA6D36; }
18 18
19 </style> 19 </style>
20 </head> 20 </head>
21 <body><a NAME="top" ID="top"></a> 21 <body>
22 <a NAME="top" ID="top"></a>
22 <h1>eric6.MicroPython.EspDevices</h1> 23 <h1>eric6.MicroPython.EspDevices</h1>
24
23 <p> 25 <p>
24 Module implementing some utility functions and the MicroPythonDevice base 26 Module implementing some utility functions and the MicroPythonDevice base
25 class. 27 class.
26 </p> 28 </p>
27 <h3>Global Attributes</h3> 29 <h3>Global Attributes</h3>
30
28 <table> 31 <table>
29 <tr><td>None</td></tr> 32 <tr><td>None</td></tr>
30 </table> 33 </table>
31 <h3>Classes</h3> 34 <h3>Classes</h3>
32 <table> 35
36 <table>
37
33 <tr> 38 <tr>
34 <td><a href="#EspDevice">EspDevice</a></td> 39 <td><a href="#EspDevice">EspDevice</a></td>
35 <td>Class implementing the device for ESP32 and ESP8266 based boards.</td> 40 <td>Class implementing the device for ESP32 and ESP8266 based boards.</td>
36 </tr> 41 </tr>
37 </table> 42 </table>
38 <h3>Functions</h3> 43 <h3>Functions</h3>
39 <table> 44
40 <tr><td>None</td></tr> 45 <table>
41 </table> 46 <tr><td>None</td></tr>
42 <hr /><hr /> 47 </table>
48 <hr />
49 <hr />
43 <a NAME="EspDevice" ID="EspDevice"></a> 50 <a NAME="EspDevice" ID="EspDevice"></a>
44 <h2>EspDevice</h2> 51 <h2>EspDevice</h2>
52
45 <p> 53 <p>
46 Class implementing the device for ESP32 and ESP8266 based boards. 54 Class implementing the device for ESP32 and ESP8266 based boards.
47 </p> 55 </p>
48 <h3>Derived from</h3> 56 <h3>Derived from</h3>
49 MicroPythonDevice 57 MicroPythonDevice
50 <h3>Class Attributes</h3> 58 <h3>Class Attributes</h3>
59
51 <table> 60 <table>
52 <tr><td>None</td></tr> 61 <tr><td>None</td></tr>
53 </table> 62 </table>
54 <h3>Class Methods</h3> 63 <h3>Class Methods</h3>
64
55 <table> 65 <table>
56 <tr><td>None</td></tr> 66 <tr><td>None</td></tr>
57 </table> 67 </table>
58 <h3>Methods</h3> 68 <h3>Methods</h3>
59 <table> 69
70 <table>
71
60 <tr> 72 <tr>
61 <td><a href="#EspDevice.__init__">EspDevice</a></td> 73 <td><a href="#EspDevice.__init__">EspDevice</a></td>
62 <td>Constructor</td> 74 <td>Constructor</td>
63 </tr><tr> 75 </tr>
76 <tr>
64 <td><a href="#EspDevice.__eraseFlash">__eraseFlash</a></td> 77 <td><a href="#EspDevice.__eraseFlash">__eraseFlash</a></td>
65 <td>Private slot to erase the device flash memory.</td> 78 <td>Private slot to erase the device flash memory.</td>
66 </tr><tr> 79 </tr>
80 <tr>
67 <td><a href="#EspDevice.__flashAddons">__flashAddons</a></td> 81 <td><a href="#EspDevice.__flashAddons">__flashAddons</a></td>
68 <td>Private slot to flash some additional firmware images.</td> 82 <td>Private slot to flash some additional firmware images.</td>
69 </tr><tr> 83 </tr>
84 <tr>
70 <td><a href="#EspDevice.__flashMicroPython">__flashMicroPython</a></td> 85 <td><a href="#EspDevice.__flashMicroPython">__flashMicroPython</a></td>
71 <td>Private slot to flash a MicroPython firmware to the device.</td> 86 <td>Private slot to flash a MicroPython firmware to the device.</td>
72 </tr><tr> 87 </tr>
88 <tr>
73 <td><a href="#EspDevice.__installEspTool">__installEspTool</a></td> 89 <td><a href="#EspDevice.__installEspTool">__installEspTool</a></td>
74 <td>Private slot to install the esptool package via pip.</td> 90 <td>Private slot to install the esptool package via pip.</td>
75 </tr><tr> 91 </tr>
92 <tr>
76 <td><a href="#EspDevice.__resetDevice">__resetDevice</a></td> 93 <td><a href="#EspDevice.__resetDevice">__resetDevice</a></td>
77 <td>Private slot to reset the connected device.</td> 94 <td>Private slot to reset the connected device.</td>
78 </tr><tr> 95 </tr>
96 <tr>
79 <td><a href="#EspDevice.addDeviceMenuEntries">addDeviceMenuEntries</a></td> 97 <td><a href="#EspDevice.addDeviceMenuEntries">addDeviceMenuEntries</a></td>
80 <td>Public method to add device specific entries to the given menu.</td> 98 <td>Public method to add device specific entries to the given menu.</td>
81 </tr><tr> 99 </tr>
100 <tr>
82 <td><a href="#EspDevice.canRunScript">canRunScript</a></td> 101 <td><a href="#EspDevice.canRunScript">canRunScript</a></td>
83 <td>Public method to determine, if a script can be executed.</td> 102 <td>Public method to determine, if a script can be executed.</td>
84 </tr><tr> 103 </tr>
104 <tr>
85 <td><a href="#EspDevice.canStartFileManager">canStartFileManager</a></td> 105 <td><a href="#EspDevice.canStartFileManager">canStartFileManager</a></td>
86 <td>Public method to determine, if a File Manager can be started.</td> 106 <td>Public method to determine, if a File Manager can be started.</td>
87 </tr><tr> 107 </tr>
108 <tr>
88 <td><a href="#EspDevice.canStartPlotter">canStartPlotter</a></td> 109 <td><a href="#EspDevice.canStartPlotter">canStartPlotter</a></td>
89 <td>Public method to determine, if a Plotter can be started.</td> 110 <td>Public method to determine, if a Plotter can be started.</td>
90 </tr><tr> 111 </tr>
112 <tr>
91 <td><a href="#EspDevice.canStartRepl">canStartRepl</a></td> 113 <td><a href="#EspDevice.canStartRepl">canStartRepl</a></td>
92 <td>Public method to determine, if a REPL can be started.</td> 114 <td>Public method to determine, if a REPL can be started.</td>
93 </tr><tr> 115 </tr>
116 <tr>
94 <td><a href="#EspDevice.deviceName">deviceName</a></td> 117 <td><a href="#EspDevice.deviceName">deviceName</a></td>
95 <td>Public method to get the name of the device.</td> 118 <td>Public method to get the name of the device.</td>
96 </tr><tr> 119 </tr>
120 <tr>
97 <td><a href="#EspDevice.forceInterrupt">forceInterrupt</a></td> 121 <td><a href="#EspDevice.forceInterrupt">forceInterrupt</a></td>
98 <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>
99 </tr><tr> 123 </tr>
124 <tr>
100 <td><a href="#EspDevice.getDocumentationUrl">getDocumentationUrl</a></td> 125 <td><a href="#EspDevice.getDocumentationUrl">getDocumentationUrl</a></td>
101 <td>Public method to get the device documentation URL.</td> 126 <td>Public method to get the device documentation URL.</td>
102 </tr><tr> 127 </tr>
128 <tr>
103 <td><a href="#EspDevice.runScript">runScript</a></td> 129 <td><a href="#EspDevice.runScript">runScript</a></td>
104 <td>Public method to run the given Python script.</td> 130 <td>Public method to run the given Python script.</td>
105 </tr><tr> 131 </tr>
132 <tr>
106 <td><a href="#EspDevice.setButtons">setButtons</a></td> 133 <td><a href="#EspDevice.setButtons">setButtons</a></td>
107 <td>Public method to enable the supported action buttons.</td> 134 <td>Public method to enable the supported action buttons.</td>
108 </tr> 135 </tr>
109 </table> 136 </table>
110 <h3>Static Methods</h3> 137 <h3>Static Methods</h3>
111 <table> 138
112 <tr><td>None</td></tr> 139 <table>
113 </table> 140 <tr><td>None</td></tr>
141 </table>
142
114 <a NAME="EspDevice.__init__" ID="EspDevice.__init__"></a> 143 <a NAME="EspDevice.__init__" ID="EspDevice.__init__"></a>
115 <h4>EspDevice (Constructor)</h4> 144 <h4>EspDevice (Constructor)</h4>
116 <b>EspDevice</b>(<i>microPythonWidget, parent=None</i>) 145 <b>EspDevice</b>(<i>microPythonWidget, parent=None</i>)
146
117 <p> 147 <p>
118 Constructor 148 Constructor
119 </p><dl> 149 </p>
150 <dl>
151
120 <dt><i>microPythonWidget</i> (MicroPythonWidget)</dt> 152 <dt><i>microPythonWidget</i> (MicroPythonWidget)</dt>
121 <dd> 153 <dd>
122 reference to the main MicroPython widget 154 reference to the main MicroPython widget
123 </dd><dt><i>parent</i> (QObject)</dt> 155 </dd>
156 <dt><i>parent</i> (QObject)</dt>
124 <dd> 157 <dd>
125 reference to the parent object 158 reference to the parent object
126 </dd> 159 </dd>
127 </dl><a NAME="EspDevice.__eraseFlash" ID="EspDevice.__eraseFlash"></a> 160 </dl>
161 <a NAME="EspDevice.__eraseFlash" ID="EspDevice.__eraseFlash"></a>
128 <h4>EspDevice.__eraseFlash</h4> 162 <h4>EspDevice.__eraseFlash</h4>
129 <b>__eraseFlash</b>(<i></i>) 163 <b>__eraseFlash</b>(<i></i>)
164
130 <p> 165 <p>
131 Private slot to erase the device flash memory. 166 Private slot to erase the device flash memory.
132 </p><a NAME="EspDevice.__flashAddons" ID="EspDevice.__flashAddons"></a> 167 </p>
168 <a NAME="EspDevice.__flashAddons" ID="EspDevice.__flashAddons"></a>
133 <h4>EspDevice.__flashAddons</h4> 169 <h4>EspDevice.__flashAddons</h4>
134 <b>__flashAddons</b>(<i></i>) 170 <b>__flashAddons</b>(<i></i>)
171
135 <p> 172 <p>
136 Private slot to flash some additional firmware images. 173 Private slot to flash some additional firmware images.
137 </p><a NAME="EspDevice.__flashMicroPython" ID="EspDevice.__flashMicroPython"></a> 174 </p>
175 <a NAME="EspDevice.__flashMicroPython" ID="EspDevice.__flashMicroPython"></a>
138 <h4>EspDevice.__flashMicroPython</h4> 176 <h4>EspDevice.__flashMicroPython</h4>
139 <b>__flashMicroPython</b>(<i></i>) 177 <b>__flashMicroPython</b>(<i></i>)
178
140 <p> 179 <p>
141 Private slot to flash a MicroPython firmware to the device. 180 Private slot to flash a MicroPython firmware to the device.
142 </p><dl> 181 </p>
182 <dl>
183
143 <dt>Raises <b>ValueError</b>:</dt> 184 <dt>Raises <b>ValueError</b>:</dt>
144 <dd> 185 <dd>
145 raised to indicate an unsupported chip type 186 raised to indicate an unsupported chip type
146 </dd> 187 </dd>
147 </dl><a NAME="EspDevice.__installEspTool" ID="EspDevice.__installEspTool"></a> 188 </dl>
189 <a NAME="EspDevice.__installEspTool" ID="EspDevice.__installEspTool"></a>
148 <h4>EspDevice.__installEspTool</h4> 190 <h4>EspDevice.__installEspTool</h4>
149 <b>__installEspTool</b>(<i></i>) 191 <b>__installEspTool</b>(<i></i>)
192
150 <p> 193 <p>
151 Private slot to install the esptool package via pip. 194 Private slot to install the esptool package via pip.
152 </p><a NAME="EspDevice.__resetDevice" ID="EspDevice.__resetDevice"></a> 195 </p>
196 <a NAME="EspDevice.__resetDevice" ID="EspDevice.__resetDevice"></a>
153 <h4>EspDevice.__resetDevice</h4> 197 <h4>EspDevice.__resetDevice</h4>
154 <b>__resetDevice</b>(<i></i>) 198 <b>__resetDevice</b>(<i></i>)
199
155 <p> 200 <p>
156 Private slot to reset the connected device. 201 Private slot to reset the connected device.
157 </p><a NAME="EspDevice.addDeviceMenuEntries" ID="EspDevice.addDeviceMenuEntries"></a> 202 </p>
203 <a NAME="EspDevice.addDeviceMenuEntries" ID="EspDevice.addDeviceMenuEntries"></a>
158 <h4>EspDevice.addDeviceMenuEntries</h4> 204 <h4>EspDevice.addDeviceMenuEntries</h4>
159 <b>addDeviceMenuEntries</b>(<i>menu</i>) 205 <b>addDeviceMenuEntries</b>(<i>menu</i>)
206
160 <p> 207 <p>
161 Public method to add device specific entries to the given menu. 208 Public method to add device specific entries to the given menu.
162 </p><dl> 209 </p>
210 <dl>
211
163 <dt><i>menu</i> (QMenu)</dt> 212 <dt><i>menu</i> (QMenu)</dt>
164 <dd> 213 <dd>
165 reference to the context menu 214 reference to the context menu
166 </dd> 215 </dd>
167 </dl><a NAME="EspDevice.canRunScript" ID="EspDevice.canRunScript"></a> 216 </dl>
217 <a NAME="EspDevice.canRunScript" ID="EspDevice.canRunScript"></a>
168 <h4>EspDevice.canRunScript</h4> 218 <h4>EspDevice.canRunScript</h4>
169 <b>canRunScript</b>(<i></i>) 219 <b>canRunScript</b>(<i></i>)
220
170 <p> 221 <p>
171 Public method to determine, if a script can be executed. 222 Public method to determine, if a script can be executed.
172 </p><dl> 223 </p>
224 <dl>
173 <dt>Returns:</dt> 225 <dt>Returns:</dt>
174 <dd> 226 <dd>
175 tuple containing a flag indicating it is safe to start a 227 tuple containing a flag indicating it is safe to start a
176 Plotter and a reason why it cannot. 228 Plotter and a reason why it cannot.
177 </dd> 229 </dd>
178 </dl><dl> 230 </dl>
231 <dl>
179 <dt>Return Type:</dt> 232 <dt>Return Type:</dt>
180 <dd> 233 <dd>
181 tuple of (bool, str) 234 tuple of (bool, str)
182 </dd> 235 </dd>
183 </dl><a NAME="EspDevice.canStartFileManager" ID="EspDevice.canStartFileManager"></a> 236 </dl>
237 <a NAME="EspDevice.canStartFileManager" ID="EspDevice.canStartFileManager"></a>
184 <h4>EspDevice.canStartFileManager</h4> 238 <h4>EspDevice.canStartFileManager</h4>
185 <b>canStartFileManager</b>(<i></i>) 239 <b>canStartFileManager</b>(<i></i>)
240
186 <p> 241 <p>
187 Public method to determine, if a File Manager can be started. 242 Public method to determine, if a File Manager can be started.
188 </p><dl> 243 </p>
244 <dl>
189 <dt>Returns:</dt> 245 <dt>Returns:</dt>
190 <dd> 246 <dd>
191 tuple containing a flag indicating it is safe to start a 247 tuple containing a flag indicating it is safe to start a
192 File Manager and a reason why it cannot. 248 File Manager and a reason why it cannot.
193 </dd> 249 </dd>
194 </dl><dl> 250 </dl>
251 <dl>
195 <dt>Return Type:</dt> 252 <dt>Return Type:</dt>
196 <dd> 253 <dd>
197 tuple of (bool, str) 254 tuple of (bool, str)
198 </dd> 255 </dd>
199 </dl><a NAME="EspDevice.canStartPlotter" ID="EspDevice.canStartPlotter"></a> 256 </dl>
257 <a NAME="EspDevice.canStartPlotter" ID="EspDevice.canStartPlotter"></a>
200 <h4>EspDevice.canStartPlotter</h4> 258 <h4>EspDevice.canStartPlotter</h4>
201 <b>canStartPlotter</b>(<i></i>) 259 <b>canStartPlotter</b>(<i></i>)
260
202 <p> 261 <p>
203 Public method to determine, if a Plotter can be started. 262 Public method to determine, if a Plotter can be started.
204 </p><dl> 263 </p>
264 <dl>
205 <dt>Returns:</dt> 265 <dt>Returns:</dt>
206 <dd> 266 <dd>
207 tuple containing a flag indicating it is safe to start a 267 tuple containing a flag indicating it is safe to start a
208 Plotter and a reason why it cannot. 268 Plotter and a reason why it cannot.
209 </dd> 269 </dd>
210 </dl><dl> 270 </dl>
271 <dl>
211 <dt>Return Type:</dt> 272 <dt>Return Type:</dt>
212 <dd> 273 <dd>
213 tuple of (bool, str) 274 tuple of (bool, str)
214 </dd> 275 </dd>
215 </dl><a NAME="EspDevice.canStartRepl" ID="EspDevice.canStartRepl"></a> 276 </dl>
277 <a NAME="EspDevice.canStartRepl" ID="EspDevice.canStartRepl"></a>
216 <h4>EspDevice.canStartRepl</h4> 278 <h4>EspDevice.canStartRepl</h4>
217 <b>canStartRepl</b>(<i></i>) 279 <b>canStartRepl</b>(<i></i>)
280
218 <p> 281 <p>
219 Public method to determine, if a REPL can be started. 282 Public method to determine, if a REPL can be started.
220 </p><dl> 283 </p>
284 <dl>
221 <dt>Returns:</dt> 285 <dt>Returns:</dt>
222 <dd> 286 <dd>
223 tuple containing a flag indicating it is safe to start a REPL 287 tuple containing a flag indicating it is safe to start a REPL
224 and a reason why it cannot. 288 and a reason why it cannot.
225 </dd> 289 </dd>
226 </dl><dl> 290 </dl>
291 <dl>
227 <dt>Return Type:</dt> 292 <dt>Return Type:</dt>
228 <dd> 293 <dd>
229 tuple of (bool, str) 294 tuple of (bool, str)
230 </dd> 295 </dd>
231 </dl><a NAME="EspDevice.deviceName" ID="EspDevice.deviceName"></a> 296 </dl>
297 <a NAME="EspDevice.deviceName" ID="EspDevice.deviceName"></a>
232 <h4>EspDevice.deviceName</h4> 298 <h4>EspDevice.deviceName</h4>
233 <b>deviceName</b>(<i></i>) 299 <b>deviceName</b>(<i></i>)
300
234 <p> 301 <p>
235 Public method to get the name of the device. 302 Public method to get the name of the device.
236 </p><dl> 303 </p>
304 <dl>
237 <dt>Returns:</dt> 305 <dt>Returns:</dt>
238 <dd> 306 <dd>
239 name of the device 307 name of the device
240 </dd> 308 </dd>
241 </dl><dl> 309 </dl>
310 <dl>
242 <dt>Return Type:</dt> 311 <dt>Return Type:</dt>
243 <dd> 312 <dd>
244 str 313 str
245 </dd> 314 </dd>
246 </dl><a NAME="EspDevice.forceInterrupt" ID="EspDevice.forceInterrupt"></a> 315 </dl>
316 <a NAME="EspDevice.forceInterrupt" ID="EspDevice.forceInterrupt"></a>
247 <h4>EspDevice.forceInterrupt</h4> 317 <h4>EspDevice.forceInterrupt</h4>
248 <b>forceInterrupt</b>(<i></i>) 318 <b>forceInterrupt</b>(<i></i>)
319
249 <p> 320 <p>
250 Public method to determine the need for an interrupt when opening the 321 Public method to determine the need for an interrupt when opening the
251 serial connection. 322 serial connection.
252 </p><dl> 323 </p>
324 <dl>
253 <dt>Returns:</dt> 325 <dt>Returns:</dt>
254 <dd> 326 <dd>
255 flag indicating an interrupt is needed 327 flag indicating an interrupt is needed
256 </dd> 328 </dd>
257 </dl><dl> 329 </dl>
330 <dl>
258 <dt>Return Type:</dt> 331 <dt>Return Type:</dt>
259 <dd> 332 <dd>
260 bool 333 bool
261 </dd> 334 </dd>
262 </dl><a NAME="EspDevice.getDocumentationUrl" ID="EspDevice.getDocumentationUrl"></a> 335 </dl>
336 <a NAME="EspDevice.getDocumentationUrl" ID="EspDevice.getDocumentationUrl"></a>
263 <h4>EspDevice.getDocumentationUrl</h4> 337 <h4>EspDevice.getDocumentationUrl</h4>
264 <b>getDocumentationUrl</b>(<i></i>) 338 <b>getDocumentationUrl</b>(<i></i>)
339
265 <p> 340 <p>
266 Public method to get the device documentation URL. 341 Public method to get the device documentation URL.
267 </p><dl> 342 </p>
343 <dl>
268 <dt>Returns:</dt> 344 <dt>Returns:</dt>
269 <dd> 345 <dd>
270 documentation URL of the device 346 documentation URL of the device
271 </dd> 347 </dd>
272 </dl><dl> 348 </dl>
349 <dl>
273 <dt>Return Type:</dt> 350 <dt>Return Type:</dt>
274 <dd> 351 <dd>
275 str 352 str
276 </dd> 353 </dd>
277 </dl><a NAME="EspDevice.runScript" ID="EspDevice.runScript"></a> 354 </dl>
355 <a NAME="EspDevice.runScript" ID="EspDevice.runScript"></a>
278 <h4>EspDevice.runScript</h4> 356 <h4>EspDevice.runScript</h4>
279 <b>runScript</b>(<i>script</i>) 357 <b>runScript</b>(<i>script</i>)
358
280 <p> 359 <p>
281 Public method to run the given Python script. 360 Public method to run the given Python script.
282 </p><dl> 361 </p>
362 <dl>
363
283 <dt><i>script</i> (str)</dt> 364 <dt><i>script</i> (str)</dt>
284 <dd> 365 <dd>
285 script to be executed 366 script to be executed
286 </dd> 367 </dd>
287 </dl><a NAME="EspDevice.setButtons" ID="EspDevice.setButtons"></a> 368 </dl>
369 <a NAME="EspDevice.setButtons" ID="EspDevice.setButtons"></a>
288 <h4>EspDevice.setButtons</h4> 370 <h4>EspDevice.setButtons</h4>
289 <b>setButtons</b>(<i></i>) 371 <b>setButtons</b>(<i></i>)
372
290 <p> 373 <p>
291 Public method to enable the supported action buttons. 374 Public method to enable the supported action buttons.
292 </p> 375 </p>
293 <div align="right"><a href="#top">Up</a></div> 376 <div align="right"><a href="#top">Up</a></div>
294 <hr /> 377 <hr />

eric ide

mercurial