[RTOS] Added deprecated RtosTimer constructor

Reintroduced the original RtosTimer constructor as an additional deprecated constructor for backwards compatibility.
pull/2199/head
Neil Thiessen 2016-07-20 16:07:12 -06:00 committed by GitHub
parent 511117acdf
commit 4d4089e7bc
1 changed files with 11 additions and 0 deletions
rtos/rtos

View File

@ -37,6 +37,17 @@ namespace rtos {
*/
class RtosTimer {
public:
/** Create timer.
@param func function to be executed by this timer.
@param type osTimerOnce for one-shot or osTimerPeriodic for periodic behaviour. (default: osTimerPeriodic)
@param argument argument to the timer call back function. (default: NULL)
@deprecated Replaced with RtosTimer(Callback<void()>, os_timer_type)
*/
MBED_DEPRECATED("Replaced with RtosTimer(Callback<void()>, os_timer_type)")
RtosTimer(void (*func)(void const *argument), os_timer_type type=osTimerPeriodic, void *argument=NULL) {
constructor(mbed::Callback<void()>(argument, (void (*)(void *))func), type);
}
/** Create timer.
@param func function to be executed by this timer.
@param type osTimerOnce for one-shot or osTimerPeriodic for periodic behaviour. (default: osTimerPeriodic)