aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
authoriperry <iperry@749a229e-a60e-11de-b98f-4500b42dc123>2009-12-25 08:39:24 +0000
committeriperry <iperry@749a229e-a60e-11de-b98f-4500b42dc123>2009-12-25 08:39:24 +0000
commitb6674cd738cc22e61ea34cb659750ef45ce01df4 (patch)
treebfee2ae84883c32871ee13a6e0f346f144263cf6 /src/main.cpp
parent3bb04834ffd3f90dc9015997ea11a56d9d150099 (diff)
downloadlibrambutan-b6674cd738cc22e61ea34cb659750ef45ce01df4.tar.gz
librambutan-b6674cd738cc22e61ea34cb659750ef45ce01df4.zip
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
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp9
1 files changed, 4 insertions, 5 deletions
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);