Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: WizFi250_AP_HelloWorld
Fork of mbed-src by
Diff: common/Ticker.cpp
- Revision:
- 36:ab3ee77451e7
- Parent:
- 15:4892fe388435
- Child:
- 304:89b9c3a9a045
diff -r 371630885ad6 -r ab3ee77451e7 common/Ticker.cpp
--- a/common/Ticker.cpp Mon Oct 21 11:45:04 2013 +0100
+++ b/common/Ticker.cpp Wed Oct 23 14:15:04 2013 +0100
@@ -22,7 +22,7 @@
void Ticker::detach() {
remove();
- _chain.clear();
+ _function.attach(0);
}
void Ticker::setup(unsigned int t) {
@@ -33,13 +33,7 @@
void Ticker::handler() {
insert(event.timestamp + _delay);
- _chain.call();
-}
-
-pFunctionPointer_t Ticker::add_function_helper(void (*fptr)(void), bool front) {
- if (_chain.size() == 0)
- return NULL;
- return front ? _chain.add_front(fptr) : _chain.add(fptr);
+ _function.call();
}
} // namespace mbed
