mirror of https://github.com/ARMmbed/mbed-os.git
Deprecate previous Ticker::attach() API
* Restore previous implementation as deprecated * Ensure method call is unambiguouspull/11236/head
parent
e1714ec53a
commit
4b1cee3cf3
|
@ -83,6 +83,12 @@ public:
|
|||
attach_us(func, SECONDS_TO_MICROSECONDS(t));
|
||||
}
|
||||
|
||||
MBED_DEPRECATED("This function has been deprecated, use attach(Callback<void()> func, const s_timestamp_t t)")
|
||||
void attach(Callback<void()> func, float t)
|
||||
{
|
||||
attach_us(func, t * 1000000.0f);
|
||||
}
|
||||
|
||||
/** Attach a member function to be called by the Ticker, specifying the interval in seconds
|
||||
*
|
||||
* @param obj pointer to the object to call the member function on
|
||||
|
|
|
@ -183,7 +183,7 @@ void NFCController::scheduler_process(bool hw_interrupt)
|
|||
// Process stack events
|
||||
uint32_t timeout = nfc_scheduler_iteration(_scheduler, hw_interrupt ? EVENT_HW_INTERRUPT : EVENT_NONE);
|
||||
|
||||
_timeout.attach(callback(this, &NFCController::on_timeout), timeout);
|
||||
_timeout.attach(callback(this, &NFCController::on_timeout), (s_timestamp_t)timeout);
|
||||
}
|
||||
|
||||
void NFCController::on_hw_interrupt()
|
||||
|
|
Loading…
Reference in New Issue