mbed_example
/
Ticker_Example
example creating a Ticker with callback
Diff: main.cpp
- Revision:
- 1:fa1a6e600bdb
- Parent:
- 0:14eb5da7a9a3
--- a/main.cpp Tue Feb 19 15:58:42 2013 +0000 +++ b/main.cpp Thu Jan 19 10:48:50 2017 -0600 @@ -18,7 +18,8 @@ Ticker t; int main() { - t.attach(&f, &Flipper::flip, 2.0); // the address of the object, member function, and interval + // the address of the object, member function, and interval + t.attach(callback(&f, &Flipper::flip), 2.0); // spin in a main loop. flipper will interrupt it to call flip while(1) {