Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
sunifu
Date:
Sun Sep 19 08:19:46 2010 +0000
Commit message:

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	Sun Sep 19 08:19:46 2010 +0000
@@ -0,0 +1,26 @@
+#include "mbed.h"
+
+BusOut myleds(LED1, LED2, LED3, LED4);
+
+// Bit Come and Go
+int main() {
+    int i = 0 ;
+    int stat = 0 ;
+    
+    myleds = 1 ;
+    wait(0.5) ;
+    
+    while(1) {
+        if ( stat == 0 ){
+            myleds = myleds << 1;
+            wait(0.5);
+            if ( myleds == 8 )
+                stat = 1;
+        }else{
+            myleds = myleds >> 1;
+            wait(0.5);
+            if ( myleds == 1 )
+                stat = 0;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sun Sep 19 08:19:46 2010 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/e2ac27c8e93e