From 11a0da5c63faffd45bde43da2777a9771cfdf5e9 Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Mon, 2 May 2011 14:33:05 -0400 Subject: /examples/ cleanups. --- examples/test-dac.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'examples/test-dac.cpp') diff --git a/examples/test-dac.cpp b/examples/test-dac.cpp index ba766a4..40ae5d5 100644 --- a/examples/test-dac.cpp +++ b/examples/test-dac.cpp @@ -13,7 +13,7 @@ uint16 count = 0; void setup() { pinMode(BOARD_LED_PIN, OUTPUT); - digitalWrite(BOARD_LED_PIN,1); + digitalWrite(BOARD_LED_PIN, HIGH); Serial1.begin(9600); Serial1.println("**** Beginning DAC test"); @@ -36,11 +36,14 @@ void loop() { dac_write_channel(DAC, 2, count); } -int main(void) { +__attribute__((constructor)) void premain() { init(); +} + +int main(void) { setup(); - while (1) { + while (true) { loop(); } return 0; -- cgit v1.2.3