File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 20
20
21
21
#include " stack/transceiver/transceiver.h"
22
22
23
+ using std::milli;
24
+ using namespace std ::chrono;
23
25
using namespace mbed ;
24
26
using namespace mbed ::nfc;
25
27
@@ -181,12 +183,9 @@ void NFCController::scheduler_process(bool hw_interrupt)
181
183
_timeout.detach (); // Cancel timeout - if it triggers, it's ok as we'll have an "early" iteration which will likely be a no-op
182
184
183
185
// Process stack events
184
- uint32_t timeout_ms = nfc_scheduler_iteration (_scheduler, hw_interrupt ? EVENT_HW_INTERRUPT : EVENT_NONE);
186
+ duration< uint32_t , milli> timeout{ nfc_scheduler_iteration (_scheduler, hw_interrupt ? EVENT_HW_INTERRUPT : EVENT_NONE)} ;
185
187
186
- _timeout.attach_us (
187
- callback (this , &NFCController::on_timeout),
188
- timeout_ms * (us_timestamp_t ) 1000
189
- );
188
+ _timeout.attach (callback (this , &NFCController::on_timeout), timeout);
190
189
}
191
190
192
191
void NFCController::on_hw_interrupt ()
You can’t perform that action at this time.
0 commit comments