blink leds

Dependencies:   mbed

Revision:
0:1d9e68d929a1
diff -r 000000000000 -r 1d9e68d929a1 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Apr 17 17:20:18 2014 +0000
@@ -0,0 +1,16 @@
+#include "mbed.h"
+ 
+// LED1 = P1.18  LED2 = P1.20  LED3 = P1.21  LED4 = P1.23
+#define LED_MASK  0x0000000F
+#define LED_MASK1 0x000000F0
+ 
+PortOut ledport(Port2, 0x000000FF);
+ 
+int main() {
+    while(1) {
+        ledport = LED_MASK;
+        wait(1);
+        ledport = LED_MASK1;
+        wait(1);
+    }
+}