diff options
author | Marti Bolivar <mbolivar@leaflabs.com> | 2011-05-10 16:41:37 -0400 |
---|---|---|
committer | Marti Bolivar <mbolivar@leaflabs.com> | 2011-05-10 16:41:37 -0400 |
commit | 9cfd9ba5d6e2933e72dd93b048e62b9e9494fafb (patch) | |
tree | c002f6a389e38576fec44777557e62064e342d02 /examples/blinky.cpp | |
parent | 19ea6ba4ea3f1ecb9830cf4d3e1366513f4f96e3 (diff) | |
download | librambutan-9cfd9ba5d6e2933e72dd93b048e62b9e9494fafb.tar.gz librambutan-9cfd9ba5d6e2933e72dd93b048e62b9e9494fafb.zip |
Converting all files to UNIX newlines.
Committing the results of running the following on the libmaple root
directory:
$ fromdos `grep --exclude-dir='[.]git' -Ilsr $'\r$' .`
Diffstat (limited to 'examples/blinky.cpp')
-rw-r--r-- | examples/blinky.cpp | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/examples/blinky.cpp b/examples/blinky.cpp index 91d1a47..dd72514 100644 --- a/examples/blinky.cpp +++ b/examples/blinky.cpp @@ -1,32 +1,32 @@ -// Blinks the built-in LED
-
-#include "wirish.h"
-
-void setup() {
- pinMode(BOARD_LED_PIN, OUTPUT);
-}
-
-int toggle = 1;
-
-void loop() {
- // You could just use toggleLED() instead, but this illustrates
- // the use of digitalWrite():
- digitalWrite(BOARD_LED_PIN, toggle);
- toggle ^= 1;
- delay(100);
-}
-
-// Force init to be called *first*, i.e. before static object allocation.
-// Otherwise, statically allocated objects that need libmaple may fail.
-__attribute__((constructor)) void premain() {
- init();
-}
-
-int main(void) {
- setup();
-
- while (true) {
- loop();
- }
- return 0;
-}
+// Blinks the built-in LED + +#include "wirish.h" + +void setup() { + pinMode(BOARD_LED_PIN, OUTPUT); +} + +int toggle = 1; + +void loop() { + // You could just use toggleLED() instead, but this illustrates + // the use of digitalWrite(): + digitalWrite(BOARD_LED_PIN, toggle); + toggle ^= 1; + delay(100); +} + +// Force init to be called *first*, i.e. before static object allocation. +// Otherwise, statically allocated objects that need libmaple may fail. +__attribute__((constructor)) void premain() { + init(); +} + +int main(void) { + setup(); + + while (true) { + loop(); + } + return 0; +} |