mirror of https://github.com/ARMmbed/mbed-os.git
[RTOS] Added deprecated RtosTimer constructor
Reintroduced the original RtosTimer constructor as an additional deprecated constructor for backwards compatibility.pull/2199/head
parent
511117acdf
commit
4d4089e7bc
rtos/rtos
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue