diff options
Diffstat (limited to 'main.cpp.example')
-rw-r--r-- | main.cpp.example | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/main.cpp.example b/main.cpp.example index 8fc522a..23d5540 100644 --- a/main.cpp.example +++ b/main.cpp.example @@ -27,16 +27,17 @@ void loop() { } // Force init to be called *first*, i.e. before static object allocation. -// Otherwise, statically allocated object that need libmaple may fail. -__attribute__(( constructor )) void premain() { +// Otherwise, statically allocated objects that need libmaple may fail. +__attribute__((constructor)) void premain() { init(); } int main(void) { setup(); - while (1) { + while (true) { loop(); } + return 0; } |