aboutsummaryrefslogtreecommitdiff
path: root/examples/test-dac.cpp
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2011-05-02 14:33:05 -0400
committerMarti Bolivar <mbolivar@leaflabs.com>2011-05-04 13:31:24 -0400
commit1634a4855e3d5bf8e3cda2ecb0f4e5f384d057af (patch)
tree5cf246a27d1f02ec959893fb62fd8aa754a11e8e /examples/test-dac.cpp
parentc436ffa1bbe0491738d19b06c2618935603b424f (diff)
/examples/ cleanups.
Diffstat (limited to 'examples/test-dac.cpp')
-rw-r--r--examples/test-dac.cpp9
1 files changed, 6 insertions, 3 deletions
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;