eric6/Documentation/Source/eric6.MicroPython.UF2FlashDialog.html

changeset 8098
36d5f6786a9f
child 8167
cdc1b6692766
equal deleted inserted replaced
8097:5af9c426c46b 8098:36d5f6786a9f
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric6.MicroPython.UF2FlashDialog</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>
22 <a NAME="top" ID="top"></a>
23 <h1>eric6.MicroPython.UF2FlashDialog</h1>
24
25 <p>
26 Module implementing a dialog to flash any UF2 capable device.
27 </p>
28 <h3>Global Attributes</h3>
29
30 <table>
31 <tr><td>SupportedUF2Boards</td></tr>
32 </table>
33 <h3>Classes</h3>
34
35 <table>
36
37 <tr>
38 <td><a href="#UF2FlashDialog">UF2FlashDialog</a></td>
39 <td>Class implementing a dialog to flash any UF2 capable device.</td>
40 </tr>
41 </table>
42 <h3>Functions</h3>
43
44 <table>
45
46 <tr>
47 <td><a href="#getFoundDevices">getFoundDevices</a></td>
48 <td>Function to get the list of known serial devices supporting UF2.</td>
49 </tr>
50 </table>
51 <hr />
52 <hr />
53 <a NAME="UF2FlashDialog" ID="UF2FlashDialog"></a>
54 <h2>UF2FlashDialog</h2>
55
56 <p>
57 Class implementing a dialog to flash any UF2 capable device.
58 </p>
59 <h3>Derived from</h3>
60 QDialog, Ui_UF2FlashDialog
61 <h3>Class Attributes</h3>
62
63 <table>
64 <tr><td>DeviceTypeRole</td></tr><tr><td>DeviceVidPidRole</td></tr>
65 </table>
66 <h3>Class Methods</h3>
67
68 <table>
69 <tr><td>None</td></tr>
70 </table>
71 <h3>Methods</h3>
72
73 <table>
74
75 <tr>
76 <td><a href="#UF2FlashDialog.__init__">UF2FlashDialog</a></td>
77 <td>Constructor</td>
78 </tr>
79 <tr>
80 <td><a href="#UF2FlashDialog.__populate">__populate</a></td>
81 <td>Private method to (re-)populate the dialog.</td>
82 </tr>
83 <tr>
84 <td><a href="#UF2FlashDialog.__showAllInstructions">__showAllInstructions</a></td>
85 <td>Private method to show instructions for resetting devices to bootloader mode.</td>
86 </tr>
87 <tr>
88 <td><a href="#UF2FlashDialog.__showManualInstructions">__showManualInstructions</a></td>
89 <td>Private method to show instructions for flashing devices manually.</td>
90 </tr>
91 <tr>
92 <td><a href="#UF2FlashDialog.__showMultipleVolumesInformation">__showMultipleVolumesInformation</a></td>
93 <td>Private method to show information because multiple devices of the same type are ready for flashing.</td>
94 </tr>
95 <tr>
96 <td><a href="#UF2FlashDialog.__showNoVolumeInformation">__showNoVolumeInformation</a></td>
97 <td>Private method to show information about the expected boot volume(s).</td>
98 </tr>
99 <tr>
100 <td><a href="#UF2FlashDialog.__showSpecificInstructions">__showSpecificInstructions</a></td>
101 <td>Private method to show instructions for resetting devices to bootloader mode for a list of detected devices.</td>
102 </tr>
103 <tr>
104 <td><a href="#UF2FlashDialog.__showTypedInstructions">__showTypedInstructions</a></td>
105 <td>Private method to show instructions for resetting devices to bootloader mode for a specific board type.</td>
106 </tr>
107 <tr>
108 <td><a href="#UF2FlashDialog.__updateFlashButton">__updateFlashButton</a></td>
109 <td>Private method to update the state of the Flash button and the retest button.</td>
110 </tr>
111 <tr>
112 <td><a href="#UF2FlashDialog.on_bootPicker_textChanged">on_bootPicker_textChanged</a></td>
113 <td>Private slot handling a change of the boot volume.</td>
114 </tr>
115 <tr>
116 <td><a href="#UF2FlashDialog.on_devicesComboBox_currentIndexChanged">on_devicesComboBox_currentIndexChanged</a></td>
117 <td>Private slot to handle the selection of a board.</td>
118 </tr>
119 <tr>
120 <td><a href="#UF2FlashDialog.on_firmwarePicker_textChanged">on_firmwarePicker_textChanged</a></td>
121 <td>Private slot handling a change of the firmware file.</td>
122 </tr>
123 <tr>
124 <td><a href="#UF2FlashDialog.on_flashButton_clicked">on_flashButton_clicked</a></td>
125 <td>Private slot to flash the selected MicroPython or CircuitPython firmware onto the device.</td>
126 </tr>
127 <tr>
128 <td><a href="#UF2FlashDialog.on_refreshButton_clicked">on_refreshButton_clicked</a></td>
129 <td>Private slot to refresh the dialog.</td>
130 </tr>
131 </table>
132 <h3>Static Methods</h3>
133
134 <table>
135 <tr><td>None</td></tr>
136 </table>
137
138 <a NAME="UF2FlashDialog.__init__" ID="UF2FlashDialog.__init__"></a>
139 <h4>UF2FlashDialog (Constructor)</h4>
140 <b>UF2FlashDialog</b>(<i>boardType="", parent=None</i>)
141
142 <p>
143 Constructor
144 </p>
145 <dl>
146
147 <dt><i>boardType</i> (str)</dt>
148 <dd>
149 specific board type to show the dialog for
150 </dd>
151 <dt><i>parent</i> (QWidget (optional))</dt>
152 <dd>
153 reference to the parent widget (defaults to None)
154 </dd>
155 </dl>
156 <a NAME="UF2FlashDialog.__populate" ID="UF2FlashDialog.__populate"></a>
157 <h4>UF2FlashDialog.__populate</h4>
158 <b>__populate</b>(<i></i>)
159
160 <p>
161 Private method to (re-)populate the dialog.
162 </p>
163 <a NAME="UF2FlashDialog.__showAllInstructions" ID="UF2FlashDialog.__showAllInstructions"></a>
164 <h4>UF2FlashDialog.__showAllInstructions</h4>
165 <b>__showAllInstructions</b>(<i></i>)
166
167 <p>
168 Private method to show instructions for resetting devices to bootloader
169 mode.
170 </p>
171 <a NAME="UF2FlashDialog.__showManualInstructions" ID="UF2FlashDialog.__showManualInstructions"></a>
172 <h4>UF2FlashDialog.__showManualInstructions</h4>
173 <b>__showManualInstructions</b>(<i></i>)
174
175 <p>
176 Private method to show instructions for flashing devices manually.
177 </p>
178 <a NAME="UF2FlashDialog.__showMultipleVolumesInformation" ID="UF2FlashDialog.__showMultipleVolumesInformation"></a>
179 <h4>UF2FlashDialog.__showMultipleVolumesInformation</h4>
180 <b>__showMultipleVolumesInformation</b>(<i>volumePaths</i>)
181
182 <p>
183 Private method to show information because multiple devices of the
184 same type are ready for flashing.
185 </p>
186 <p>
187 Note: This is a dangerous situation!
188 </p>
189 <dl>
190
191 <dt><i>volumePaths</i> (list of str)</dt>
192 <dd>
193 list of volume paths
194 </dd>
195 </dl>
196 <a NAME="UF2FlashDialog.__showNoVolumeInformation" ID="UF2FlashDialog.__showNoVolumeInformation"></a>
197 <h4>UF2FlashDialog.__showNoVolumeInformation</h4>
198 <b>__showNoVolumeInformation</b>(<i>volumes</i>)
199
200 <p>
201 Private method to show information about the expected boot volume(s).
202 </p>
203 <dl>
204
205 <dt><i>volumes</i> (list of str)</dt>
206 <dd>
207 list of expected volume names
208 </dd>
209 </dl>
210 <a NAME="UF2FlashDialog.__showSpecificInstructions" ID="UF2FlashDialog.__showSpecificInstructions"></a>
211 <h4>UF2FlashDialog.__showSpecificInstructions</h4>
212 <b>__showSpecificInstructions</b>(<i>devices</i>)
213
214 <p>
215 Private method to show instructions for resetting devices to bootloader
216 mode for a list of detected devices.
217 </p>
218 <dl>
219
220 <dt><i>devices</i> (list of str)</dt>
221 <dd>
222 list of detected devices
223 </dd>
224 </dl>
225 <a NAME="UF2FlashDialog.__showTypedInstructions" ID="UF2FlashDialog.__showTypedInstructions"></a>
226 <h4>UF2FlashDialog.__showTypedInstructions</h4>
227 <b>__showTypedInstructions</b>(<i>boardType</i>)
228
229 <p>
230 Private method to show instructions for resetting devices to bootloader
231 mode for a specific board type.
232 </p>
233 <dl>
234
235 <dt><i>boardType</i> (str)</dt>
236 <dd>
237 type of the board to show instructions for
238 </dd>
239 </dl>
240 <a NAME="UF2FlashDialog.__updateFlashButton" ID="UF2FlashDialog.__updateFlashButton"></a>
241 <h4>UF2FlashDialog.__updateFlashButton</h4>
242 <b>__updateFlashButton</b>(<i></i>)
243
244 <p>
245 Private method to update the state of the Flash button and the retest
246 button.
247 </p>
248 <a NAME="UF2FlashDialog.on_bootPicker_textChanged" ID="UF2FlashDialog.on_bootPicker_textChanged"></a>
249 <h4>UF2FlashDialog.on_bootPicker_textChanged</h4>
250 <b>on_bootPicker_textChanged</b>(<i>text</i>)
251
252 <p>
253 Private slot handling a change of the boot volume.
254 </p>
255 <dl>
256
257 <dt><i>text</i> (str)</dt>
258 <dd>
259 current text of the boot volume edit
260 </dd>
261 </dl>
262 <a NAME="UF2FlashDialog.on_devicesComboBox_currentIndexChanged" ID="UF2FlashDialog.on_devicesComboBox_currentIndexChanged"></a>
263 <h4>UF2FlashDialog.on_devicesComboBox_currentIndexChanged</h4>
264 <b>on_devicesComboBox_currentIndexChanged</b>(<i>index</i>)
265
266 <p>
267 Private slot to handle the selection of a board.
268 </p>
269 <dl>
270
271 <dt><i>index</i> (int)</dt>
272 <dd>
273 selected index
274 </dd>
275 </dl>
276 <a NAME="UF2FlashDialog.on_firmwarePicker_textChanged" ID="UF2FlashDialog.on_firmwarePicker_textChanged"></a>
277 <h4>UF2FlashDialog.on_firmwarePicker_textChanged</h4>
278 <b>on_firmwarePicker_textChanged</b>(<i>text</i>)
279
280 <p>
281 Private slot handling a change of the firmware file.
282 </p>
283 <dl>
284
285 <dt><i>text</i> (str)</dt>
286 <dd>
287 current text of the firmware edit
288 </dd>
289 </dl>
290 <a NAME="UF2FlashDialog.on_flashButton_clicked" ID="UF2FlashDialog.on_flashButton_clicked"></a>
291 <h4>UF2FlashDialog.on_flashButton_clicked</h4>
292 <b>on_flashButton_clicked</b>(<i></i>)
293
294 <p>
295 Private slot to flash the selected MicroPython or CircuitPython
296 firmware onto the device.
297 </p>
298 <a NAME="UF2FlashDialog.on_refreshButton_clicked" ID="UF2FlashDialog.on_refreshButton_clicked"></a>
299 <h4>UF2FlashDialog.on_refreshButton_clicked</h4>
300 <b>on_refreshButton_clicked</b>(<i></i>)
301
302 <p>
303 Private slot to refresh the dialog.
304 </p>
305 <div align="right"><a href="#top">Up</a></div>
306 <hr />
307 <hr />
308 <a NAME="getFoundDevices" ID="getFoundDevices"></a>
309 <h2>getFoundDevices</h2>
310 <b>getFoundDevices</b>(<i>boardType=""</i>)
311
312 <p>
313 Function to get the list of known serial devices supporting UF2.
314 </p>
315 <dl>
316
317 <dt><i>boardType</i> (str)</dt>
318 <dd>
319 specific board type to search for
320 </dd>
321 </dl>
322 <dl>
323 <dt>Return:</dt>
324 <dd>
325 list of tuples with the board type, the port description, the
326 VID and PID
327 </dd>
328 </dl>
329 <dl>
330 <dt>Return Type:</dt>
331 <dd>
332 list of tuple of (str, str, int, int)
333 </dd>
334 </dl>
335 <div align="right"><a href="#top">Up</a></div>
336 <hr />
337 </body></html>

eric ide

mercurial