From 966e4ac594494f02a62d34bb9446ce1ff07dc54b Mon Sep 17 00:00:00 2001 From: "ajmeyer@mit.edu" Date: Fri, 12 Feb 2010 20:57:45 +0000 Subject: 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 --- src/main.cpp | 5 ++++- src/main.cxx | 7 +++++++ src/wiring/WProgram.h | 16 +++------------- 3 files changed, 14 insertions(+), 14 deletions(-) (limited to 'src') 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(); -- cgit v1.2.3