aboutsummaryrefslogtreecommitdiffstats
path: root/main.cpp.example
diff options
context:
space:
mode:
authorPerry Hung <iperry@alum.mit.edu>2010-06-04 00:43:21 -0400
committerPerry Hung <iperry@alum.mit.edu>2010-06-04 00:43:21 -0400
commit88d4b095e4590ab9bbafcf76e134d168f66c41b1 (patch)
tree5947dd76c0136194e0e08ea45cbe4e004d7b81ff /main.cpp.example
parent1a908d88b8c288fca89b17ceea182044d82e766e (diff)
downloadlibrambutan-88d4b095e4590ab9bbafcf76e134d168f66c41b1.tar.gz
librambutan-88d4b095e4590ab9bbafcf76e134d168f66c41b1.zip
Preliminary wirish USBSerial implementation.
-updated examples -removed HardwareUSB -cleaned up a handful of includes
Diffstat (limited to 'main.cpp.example')
-rw-r--r--main.cpp.example10
1 files changed, 5 insertions, 5 deletions
diff --git a/main.cpp.example b/main.cpp.example
index 67380ae..18966da 100644
--- a/main.cpp.example
+++ b/main.cpp.example
@@ -23,13 +23,11 @@
* ****************************************************************************/
/**
- * @brief Sample main.cpp file. Blinks an LED, sends a message out USART2
- * and turns on PWM on pin 2
+ * @brief Sample main.cpp file. Blinks an LED, sends a message out USART2 and the,
+ * USB virtual serial port, and turns on PWM on pin 2
*/
#include "wirish.h"
-#include "HardwareSerial.h"
-#include "usb.h"
#define LED_PIN 13
#define PWM_PIN 2
@@ -43,10 +41,12 @@ void setup()
Serial2.begin(9600);
Serial2.println("Hello world!");
+ /* Send a message out the usb virtual serial port */
+ SerialUSB.println("Hello!");
+
/* Turn on PWM on pin PWM_PIN */
pinMode(PWM_PIN, PWM);
pwmWrite(PWM_PIN, 0x8000);
-
}
int toggle = 0;