aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorajmeyer@mit.edu <ajmeyer@mit.edu@749a229e-a60e-11de-b98f-4500b42dc123>2010-02-12 20:57:45 +0000
committerajmeyer@mit.edu <ajmeyer@mit.edu@749a229e-a60e-11de-b98f-4500b42dc123>2010-02-12 20:57:45 +0000
commit966e4ac594494f02a62d34bb9446ce1ff07dc54b (patch)
tree6f99c8c8c2bca9f0ab5b21319abec3da26f1552e /src
parent2826bbb424f15d61c5ef917dcfd5444e7e607b56 (diff)
downloadlibrambutan-966e4ac594494f02a62d34bb9446ce1ff07dc54b.tar.gz
librambutan-966e4ac594494f02a62d34bb9446ce1ff07dc54b.zip
modded the library makefile to work with patched dfu-util, also added the USER_FLASH section to the rom linker
git-svn-id: https://leaflabs.googlecode.com/svn/trunk/library@131 749a229e-a60e-11de-b98f-4500b42dc123
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp5
-rw-r--r--src/main.cxx7
-rw-r--r--src/wiring/WProgram.h16
3 files changed, 14 insertions, 14 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 78b0f89..6f210e5 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -5,6 +5,8 @@
#include "usb.h"
int ledPin = 13;
+HardwareUsb Usb;
+
void setup() {
pinMode(ledPin, OUTPUT);
}
@@ -13,7 +15,8 @@ int toggle = 1;
void loop() {
digitalWrite(ledPin, toggle);
toggle ^= 1;
- delay(100);
+ delay(1000);
+ Usb.println("hello world!");
}
int main(void) {
diff --git a/src/main.cxx b/src/main.cxx
index 7734d6e..24b6483 100644
--- a/src/main.cxx
+++ b/src/main.cxx
@@ -9,6 +9,13 @@ int main(void)
return 0;
}
+/* Required for C++ hackery */
+/* TODO: This really shouldn't go here... move it later
+ * */
+extern "C" void __cxa_pure_virtual(void) {
+ while(1)
+ ;
+}
/* Implemented:
* void pinMode(pin, mode)
diff --git a/src/wiring/WProgram.h b/src/wiring/WProgram.h
index 111c7dc..1d38776 100644
--- a/src/wiring/WProgram.h
+++ b/src/wiring/WProgram.h
@@ -1,17 +1,7 @@
-#include "stm32f10x_map.h"
-#include "stm32f10x_lib.h"
-#include "stm32f10x_flash.h"
-#include "stm32f10x_usart.h"
-#include "Serial.h"
-#include "timers.h"
#include "wiring.h"
-#include "util.h"
-#include "systick.h"
-#include "adc.h"
-#include "gpio.h"
-#include "pwm.h"
-#include "ext_interrupts.h"
-#include "usart.h"
+#include "HardwareSerial.h"
+#include "HardwareUsb.h"
+#include "math.h"
#include "usb.h"
void setup();