Skip to content

Commit 092da0d

Browse files
committed
Merge pull request #28 from 0xc0170/ticker_chaining_bug
Chaining in Ticker - switched arguments [fix]
2 parents de715ae + 3d9be83 commit 092da0d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libraries/mbed/api/Ticker.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class Ticker : public TimerEvent {
104104
*/
105105
template<typename T>
106106
pFunctionPointer_t attach(T* tptr, void (T::*mptr)(void), float t) {
107-
return attach_us(tptr, mptr, t * 1000000.0f);
107+
return attach_us(tptr, mptr, t * 1000000.0f);
108108
}
109109

110110
/** Add a function to be called by the Ticker at the end of the call chain
@@ -158,7 +158,7 @@ class Ticker : public TimerEvent {
158158
*/
159159
template<typename T>
160160
pFunctionPointer_t attach_us(T* tptr, void (T::*mptr)(void), unsigned int t) {
161-
pFunctionPointer_t pf = _chain.add(mptr, tptr);
161+
pFunctionPointer_t pf = _chain.add(tptr, mptr);
162162
setup(t);
163163
return pf;
164164
}

0 commit comments

Comments
 (0)