Commit 54d3126
committed
static pin-map - patch for SerialBase class
Related PR:
ARMmbed#10924
The above PR adds functions to disable/enable serial input/output. If both serial input and serial output are disabled, the peripheral is freed. If either serial input or serial output is re-enabled, the peripheral is reinitialized.
I missed this change while working on the static pinmap and unfortunately it has an impact on it. The reinitialization is a problem for static pinmap. Now the HAL init()/init_direct() function is called not only in the constructor (but also when re-enabling the peripheral). In the current version, even if static pinmap constructor was used to create an object (and init_direct() HAL API), when reinitialization is done it uses init() HAL API. This must be split.
If static pinmap constructor is used, then the peripheral must be always initialized using HAL init_direct() function. If regular the constructor is used, then the peripheral must be initialized using HAL init() function. The same split also must be done while setting flow control during reinitialization.1 parent e2a11c0 commit 54d3126
2 files changed
+40
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
333 | 336 | | |
334 | 337 | | |
335 | 338 | | |
| |||
345 | 348 | | |
346 | 349 | | |
347 | 350 | | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
355 | 359 | | |
356 | 360 | | |
357 | | - | |
358 | | - | |
359 | | - | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
360 | 365 | | |
361 | 366 | | |
362 | 367 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
40 | | - | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
53 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
54 | 57 | | |
55 | 58 | | |
56 | 59 | | |
57 | 60 | | |
58 | 61 | | |
59 | 62 | | |
60 | 63 | | |
61 | | - | |
62 | | - | |
63 | | - | |
| 64 | + | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
| |||
156 | 157 | | |
157 | 158 | | |
158 | 159 | | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
159 | 172 | | |
160 | 173 | | |
161 | 174 | | |
| |||
166 | 179 | | |
167 | 180 | | |
168 | 181 | | |
169 | | - | |
| 182 | + | |
170 | 183 | | |
171 | 184 | | |
172 | 185 | | |
| |||
203 | 216 | | |
204 | 217 | | |
205 | 218 | | |
206 | | - | |
| 219 | + | |
207 | 220 | | |
208 | 221 | | |
209 | 222 | | |
| |||
289 | 302 | | |
290 | 303 | | |
291 | 304 | | |
| 305 | + | |
292 | 306 | | |
293 | 307 | | |
294 | 308 | | |
| |||
318 | 332 | | |
319 | 333 | | |
320 | 334 | | |
| 335 | + | |
321 | 336 | | |
| 337 | + | |
322 | 338 | | |
323 | | - | |
| 339 | + | |
324 | 340 | | |
325 | 341 | | |
326 | 342 | | |
| |||
0 commit comments