BusOut example

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
gcarmonar
Date:
Thu Nov 20 21:01:24 2014 +0000
Commit message:
BusOut example

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
diff -r 000000000000 -r 14e600ce8429 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Nov 20 21:01:24 2014 +0000
@@ -0,0 +1,20 @@
+#include "mbed.h"
+
+
+BusOut leds(LED1, D9, LED2, LED3);
+
+int x = 1;
+
+int main()
+{
+    leds  = 1;
+    while (true) {
+        leds  = x;
+        x = x << 1;
+        if (x == 16){
+            x = 1;
+        }
+        printf("%d\n", x);
+        wait(1);
+    }
+}
\ No newline at end of file
diff -r 000000000000 -r 14e600ce8429 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Nov 20 21:01:24 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/031413cf7a89
\ No newline at end of file