Skip to content

Commit 61b1482

Browse files
committed
Add new API method attach_s instead of overloading the deprecated attach
1 parent ce5dbda commit 61b1482

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

drivers/Ticker.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,12 @@ class Ticker : public TimerEvent, private NonCopyable<Ticker> {
9393
* @param func pointer to the function to be called
9494
* @param t the time between calls in seconds
9595
*/
96-
void attach(Callback<void()> func, const s_timestamp_t t)
96+
void attach_s(Callback<void()> func, const s_timestamp_t t)
9797
{
9898
attach_us(func, SECONDS_TO_MICROSECONDS(t));
9999
}
100100

101-
MBED_DEPRECATED("This function has been deprecated, use attach(Callback<void()> func, const s_timestamp_t t)")
101+
MBED_DEPRECATED("This function has been deprecated, use attach_s(Callback<void()> func, const s_timestamp_t t)")
102102
void attach(Callback<void()> func, float t)
103103
{
104104
attach_us(func, t * 1000000.0f);

features/nfc/source/nfc/NFCController.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ void NFCController::scheduler_process(bool hw_interrupt)
183183
// Process stack events
184184
uint32_t timeout = nfc_scheduler_iteration(_scheduler, hw_interrupt ? EVENT_HW_INTERRUPT : EVENT_NONE);
185185

186-
_timeout.attach(callback(this, &NFCController::on_timeout), (s_timestamp_t)timeout);
186+
_timeout.attach_s(callback(this, &NFCController::on_timeout), timeout);
187187
}
188188

189189
void NFCController::on_hw_interrupt()

0 commit comments

Comments
 (0)