elektro hiof / Mbed 2 deprecated mbed_ticker

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
JES
Date:
Thu Oct 30 12:45:00 2014 +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
diff -r 000000000000 -r fff331d0f22e main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Oct 30 12:45:00 2014 +0000
@@ -0,0 +1,27 @@
+#include "mbed.h"
+
+DigitalOut led1(LED1);
+DigitalOut led2(LED2);
+DigitalOut led3(LED3);
+DigitalOut led4(LED4);
+
+Ticker tick;
+
+BusOut Leds(LED1, LED2, LED3, LED4);
+volatile int countUp =0;
+
+void teller()
+{
+    countUp++;
+    if (countUp>=16)
+        countUp = 0;
+}
+
+int main()
+{
+    tick.attach(&teller, 2.0);
+
+    while(1) {
+        Leds = countUp;
+    }
+}
diff -r 000000000000 -r fff331d0f22e mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Oct 30 12:45:00 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/552587b429a1
\ No newline at end of file