mbed_example
/
Timeout_Example
Simple Timeout example with class and callback to member function
Diff: main.cpp
- Revision:
- 1:00cc01bd2e75
- Parent:
- 0:f24282a2495f
--- a/main.cpp Tue Feb 19 15:53:38 2013 +0000 +++ b/main.cpp Thu Jan 19 10:52:48 2017 -0600 @@ -18,7 +18,8 @@ Timeout 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) {