Extra problem 2 for HW 1

Dependencies:   mbed

Revision:
0:9b0b3bdf816e
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Feb 18 14:48:30 2015 +0000
@@ -0,0 +1,20 @@
+#include "mbed.h"
+// This program will blink LED1 and LED4
+// using assembly language for LED1 and
+// API functions for LED4
+// declare external assembly language function (in a *.s file)
+extern "C" int my_asm();
+// declare LED outputs – let C set them up as output bits
+DigitalIn sw(p5);
+DigitalOut led(p10);
+DigitalOut myled1(LED1);
+DigitalOut myled4(LED4);
+ 
+int main() {
+    // loop forever
+    while(1) {
+      //call assembly language function to control LED1
+      my_asm();
+      wait(0.2);
+    }
+}
\ No newline at end of file