From b6674cd738cc22e61ea34cb659750ef45ce01df4 Mon Sep 17 00:00:00 2001 From: iperry Date: Fri, 25 Dec 2009 08:39:24 +0000 Subject: Fixed delayMicroseconds, changed serial interface, added an (untested) runtime check for pwm/serial collision, moved more headers around. git-svn-id: https://leaflabs.googlecode.com/svn/trunk/library@79 749a229e-a60e-11de-b98f-4500b42dc123 --- src/main.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index cf79329..8c90b7d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3,9 +3,6 @@ #include "math.h" #include "usb.h" -void setup(); -void loop(); - int ledPin = 13; uint8_t bytes_in; @@ -26,6 +23,7 @@ void setup() pinMode(6, PWM); pwmWrite(6, 0x8000); + pinMode(7, OUTPUT); Serial2.println("setup end"); @@ -37,8 +35,9 @@ void setup() int toggle = 0; -char* testMsg = "0123456\n"; -void loop() { +const char* testMsg = "hello world!\n"; + +static inline void loop() { toggle ^= 1; digitalWrite(ledPin, toggle); delay(1000); -- cgit v1.2.3