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

changeset 7145
ceb3e8b242c1
child 7161
728018c32b09
equal deleted inserted replaced
7143:9eb66bad154d 7145:ceb3e8b242c1
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric6.MicroPython.EspDevices</title>
4 <meta charset="UTF-8">
5 <style>
6 body {
7 background: #EDECE6;
8 margin: 0em 1em 10em 1em;
9 color: black;
10 }
11
12 h1 { color: white; background: #85774A; }
13 h2 { color: white; background: #85774A; }
14 h3 { color: white; background: #9D936E; }
15 h4 { color: white; background: #9D936E; }
16
17 a { color: #BA6D36; }
18
19 </style>
20 </head>
21 <body><a NAME="top" ID="top"></a>
22 <h1>eric6.MicroPython.EspDevices</h1>
23 <p>
24 Module implementing some utility functions and the MicroPythonDevice base
25 class.
26 </p>
27 <h3>Global Attributes</h3>
28 <table>
29 <tr><td>None</td></tr>
30 </table>
31 <h3>Classes</h3>
32 <table>
33 <tr>
34 <td><a href="#EspDevice">EspDevice</a></td>
35 <td>Class implementing the device for ESP32 and ESP8266 based boards.</td>
36 </tr>
37 </table>
38 <h3>Functions</h3>
39 <table>
40 <tr><td>None</td></tr>
41 </table>
42 <hr /><hr />
43 <a NAME="EspDevice" ID="EspDevice"></a>
44 <h2>EspDevice</h2>
45 <p>
46 Class implementing the device for ESP32 and ESP8266 based boards.
47 </p>
48 <h3>Derived from</h3>
49 MicroPythonDevice
50 <h3>Class Attributes</h3>
51 <table>
52 <tr><td>None</td></tr>
53 </table>
54 <h3>Class Methods</h3>
55 <table>
56 <tr><td>None</td></tr>
57 </table>
58 <h3>Methods</h3>
59 <table>
60 <tr>
61 <td><a href="#EspDevice.__init__">EspDevice</a></td>
62 <td>Constructor</td>
63 </tr><tr>
64 <td><a href="#EspDevice.__eraseFlash">__eraseFlash</a></td>
65 <td>Private slot to erase the device flash memory.</td>
66 </tr><tr>
67 <td><a href="#EspDevice.__flashAddons">__flashAddons</a></td>
68 <td>Private slot to flash some additional firmware images.</td>
69 </tr><tr>
70 <td><a href="#EspDevice.__flashMicroPython">__flashMicroPython</a></td>
71 <td>Private slot to flash a MicroPython firmware to the device.</td>
72 </tr><tr>
73 <td><a href="#EspDevice.__installEspTool">__installEspTool</a></td>
74 <td>Private slot to install the esptool package via pip.</td>
75 </tr><tr>
76 <td><a href="#EspDevice.addDeviceMenuEntries">addDeviceMenuEntries</a></td>
77 <td>Public method to add device specific entries to the given menu.</td>
78 </tr><tr>
79 <td><a href="#EspDevice.canRunScript">canRunScript</a></td>
80 <td>Public method to determine, if a script can be executed.</td>
81 </tr><tr>
82 <td><a href="#EspDevice.canStartFileManager">canStartFileManager</a></td>
83 <td>Public method to determine, if a File Manager can be started.</td>
84 </tr><tr>
85 <td><a href="#EspDevice.canStartPlotter">canStartPlotter</a></td>
86 <td>Public method to determine, if a Plotter can be started.</td>
87 </tr><tr>
88 <td><a href="#EspDevice.canStartRepl">canStartRepl</a></td>
89 <td>Public method to determine, if a REPL can be started.</td>
90 </tr><tr>
91 <td><a href="#EspDevice.deviceName">deviceName</a></td>
92 <td>Public method to get the name of the device.</td>
93 </tr><tr>
94 <td><a href="#EspDevice.forceInterrupt">forceInterrupt</a></td>
95 <td>Public method to determine the need for an interrupt when opening the serial connection.</td>
96 </tr><tr>
97 <td><a href="#EspDevice.runScript">runScript</a></td>
98 <td>Public method to run the given Python script.</td>
99 </tr><tr>
100 <td><a href="#EspDevice.setButtons">setButtons</a></td>
101 <td>Public method to enable the supported action buttons.</td>
102 </tr>
103 </table>
104 <h3>Static Methods</h3>
105 <table>
106 <tr><td>None</td></tr>
107 </table>
108 <a NAME="EspDevice.__init__" ID="EspDevice.__init__"></a>
109 <h4>EspDevice (Constructor)</h4>
110 <b>EspDevice</b>(<i>microPythonWidget, parent=None</i>)
111 <p>
112 Constructor
113 </p><dl>
114 <dt><i>microPythonWidget</i> (MicroPythonWidget)</dt>
115 <dd>
116 reference to the main MicroPython widget
117 </dd><dt><i>parent</i> (QObject)</dt>
118 <dd>
119 reference to the parent object
120 </dd>
121 </dl><a NAME="EspDevice.__eraseFlash" ID="EspDevice.__eraseFlash"></a>
122 <h4>EspDevice.__eraseFlash</h4>
123 <b>__eraseFlash</b>(<i></i>)
124 <p>
125 Private slot to erase the device flash memory.
126 </p><a NAME="EspDevice.__flashAddons" ID="EspDevice.__flashAddons"></a>
127 <h4>EspDevice.__flashAddons</h4>
128 <b>__flashAddons</b>(<i></i>)
129 <p>
130 Private slot to flash some additional firmware images.
131 </p><a NAME="EspDevice.__flashMicroPython" ID="EspDevice.__flashMicroPython"></a>
132 <h4>EspDevice.__flashMicroPython</h4>
133 <b>__flashMicroPython</b>(<i></i>)
134 <p>
135 Private slot to flash a MicroPython firmware to the device.
136 </p><dl>
137 <dt>Raises <b>ValueError</b>:</dt>
138 <dd>
139 raised to indicate an unsupported chip type
140 </dd>
141 </dl><a NAME="EspDevice.__installEspTool" ID="EspDevice.__installEspTool"></a>
142 <h4>EspDevice.__installEspTool</h4>
143 <b>__installEspTool</b>(<i></i>)
144 <p>
145 Private slot to install the esptool package via pip.
146 </p><a NAME="EspDevice.addDeviceMenuEntries" ID="EspDevice.addDeviceMenuEntries"></a>
147 <h4>EspDevice.addDeviceMenuEntries</h4>
148 <b>addDeviceMenuEntries</b>(<i>menu</i>)
149 <p>
150 Public method to add device specific entries to the given menu.
151 </p><dl>
152 <dt><i>menu</i> (QMenu)</dt>
153 <dd>
154 reference to the context menu
155 </dd>
156 </dl><a NAME="EspDevice.canRunScript" ID="EspDevice.canRunScript"></a>
157 <h4>EspDevice.canRunScript</h4>
158 <b>canRunScript</b>(<i></i>)
159 <p>
160 Public method to determine, if a script can be executed.
161 </p><dl>
162 <dt>Returns:</dt>
163 <dd>
164 tuple containing a flag indicating it is safe to start a
165 Plotter and a reason why it cannot.
166 </dd>
167 </dl><dl>
168 <dt>Return Type:</dt>
169 <dd>
170 tuple of (bool, str)
171 </dd>
172 </dl><a NAME="EspDevice.canStartFileManager" ID="EspDevice.canStartFileManager"></a>
173 <h4>EspDevice.canStartFileManager</h4>
174 <b>canStartFileManager</b>(<i></i>)
175 <p>
176 Public method to determine, if a File Manager can be started.
177 </p><dl>
178 <dt>Returns:</dt>
179 <dd>
180 tuple containing a flag indicating it is safe to start a
181 File Manager and a reason why it cannot.
182 </dd>
183 </dl><dl>
184 <dt>Return Type:</dt>
185 <dd>
186 tuple of (bool, str)
187 </dd>
188 </dl><a NAME="EspDevice.canStartPlotter" ID="EspDevice.canStartPlotter"></a>
189 <h4>EspDevice.canStartPlotter</h4>
190 <b>canStartPlotter</b>(<i></i>)
191 <p>
192 Public method to determine, if a Plotter can be started.
193 </p><dl>
194 <dt>Returns:</dt>
195 <dd>
196 tuple containing a flag indicating it is safe to start a
197 Plotter and a reason why it cannot.
198 </dd>
199 </dl><dl>
200 <dt>Return Type:</dt>
201 <dd>
202 tuple of (bool, str)
203 </dd>
204 </dl><a NAME="EspDevice.canStartRepl" ID="EspDevice.canStartRepl"></a>
205 <h4>EspDevice.canStartRepl</h4>
206 <b>canStartRepl</b>(<i></i>)
207 <p>
208 Public method to determine, if a REPL can be started.
209 </p><dl>
210 <dt>Returns:</dt>
211 <dd>
212 tuple containing a flag indicating it is safe to start a REPL
213 and a reason why it cannot.
214 </dd>
215 </dl><dl>
216 <dt>Return Type:</dt>
217 <dd>
218 tuple of (bool, str)
219 </dd>
220 </dl><a NAME="EspDevice.deviceName" ID="EspDevice.deviceName"></a>
221 <h4>EspDevice.deviceName</h4>
222 <b>deviceName</b>(<i></i>)
223 <p>
224 Public method to get the name of the device.
225 </p><dl>
226 <dt>Returns:</dt>
227 <dd>
228 name of the device
229 </dd>
230 </dl><dl>
231 <dt>Return Type:</dt>
232 <dd>
233 str
234 </dd>
235 </dl><a NAME="EspDevice.forceInterrupt" ID="EspDevice.forceInterrupt"></a>
236 <h4>EspDevice.forceInterrupt</h4>
237 <b>forceInterrupt</b>(<i></i>)
238 <p>
239 Public method to determine the need for an interrupt when opening the
240 serial connection.
241 </p><dl>
242 <dt>Returns:</dt>
243 <dd>
244 flag indicating an interrupt is needed
245 </dd>
246 </dl><dl>
247 <dt>Return Type:</dt>
248 <dd>
249 bool
250 </dd>
251 </dl><a NAME="EspDevice.runScript" ID="EspDevice.runScript"></a>
252 <h4>EspDevice.runScript</h4>
253 <b>runScript</b>(<i>script</i>)
254 <p>
255 Public method to run the given Python script.
256 </p><dl>
257 <dt><i>script</i> (str)</dt>
258 <dd>
259 script to be executed
260 </dd>
261 </dl><a NAME="EspDevice.setButtons" ID="EspDevice.setButtons"></a>
262 <h4>EspDevice.setButtons</h4>
263 <b>setButtons</b>(<i></i>)
264 <p>
265 Public method to enable the supported action buttons.
266 </p>
267 <div align="right"><a href="#top">Up</a></div>
268 <hr />
269 </body></html>

eric ide

mercurial