Commit c85d1f2
committed
Make init() run before C++ static initializers
Before this change, the contents of `init()` run after `.init6`, which is when static initializers run.
However, this is not desirable:
* init() does not need any C++ classes to be active
* C++ static initialization sometimes _does_ require that the hardware be pre-configured!
This makes it possible to make calls like `Serial.begin()` inside constructors of global variables.1 parent 626a00a commit c85d1f2
1 file changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | | - | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
242 | 245 | | |
243 | 246 | | |
244 | 247 | | |
| |||
390 | 393 | | |
391 | 394 | | |
392 | 395 | | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
0 commit comments