7 years, 11 months ago.

Right way to create RtosTimer object in mbed os5.2 and above.

I was wondering what is the right way to create the RtosTimer object as I am getting a deprecated warning with the constructor I am using with mbed os5.2

RtosTimer constrcutor deprecated warning

m_pSensorReadTimer = new RtosTimer(this,&BleSensor::OnReadSensorIntervalElapsed,osTimerPeriodic);

Although I was able to use the following code for starting a thread in mbed os5.2 to get over the thread related deprecated warnings, but a similar fix doesn't seem to work with the RtosTimer.

Fix for removing thread method deprecated warnings

m_DownLinkThread->start(callback(this,&BleSensor::ProcessDownLinkPackets));

Any guidance with the issue above?

Thanks, Ajay

Be the first to answer this question.