blink leds

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
m_online3710
Date:
Thu Apr 17 17:20:18 2014 +0000
Commit message:
blink leds

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /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);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Apr 17 17:20:18 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/6473597d706e
\ No newline at end of file