mbed library sources
Dependents: frdm_kl05z_gpio_test
Fork of mbed-src by
Diff: common/Ticker.cpp
- Revision:
- 36:ab3ee77451e7
- Parent:
- 15:4892fe388435
- Child:
- 304:89b9c3a9a045
--- 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