Skip to content

Commit 14aa25b

Browse files
author
Rami Elkhatib
committed
MPS2 CM3DS ethernet fix deprecation warnings
The sleep_for function is updated to use the chrono time arguments since the regular ones are deprecated.
1 parent e2e927e commit 14aa25b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

connectivity/drivers/emac/TARGET_ARM_SSG/COMPONENT_SMSC9220/smsc9220_emac.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ bool SMSC9220_EMAC::power_up()
211211
this));
212212
213213
/* Initialize the hardware */
214-
enum smsc9220_error_t init_successful = smsc9220_init(dev, &ThisThread::sleep_for);
214+
enum smsc9220_error_t init_successful = smsc9220_init(dev, &thread_sleep_for);
215215
if (init_successful != SMSC9220_ERROR_NONE) {
216216
return false;
217217
}
@@ -237,7 +237,7 @@ bool SMSC9220_EMAC::power_up()
237237
&SMSC9220_EMAC::link_status_task));
238238
239239
/* Allow the Link Status task to detect the initial link state */
240-
ThisThread::sleep_for(10);
240+
ThisThread::sleep_for(10ms);
241241
_link_status_task_handle = mbed::mbed_event_queue()->call_every(
242242
LINK_STATUS_TASK_PERIOD_MS,
243243
mbed::callback(this,

connectivity/drivers/emac/TARGET_ARM_SSG/COMPONENT_SMSC9220/smsc9220_emac_config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
#define FLAG_RX 1U
3737
#define LINK_STATUS_THREAD_PRIORITY (osPriorityNormal)
3838
#define LINK_STATUS_THREAD_STACKSIZE 512U
39-
#define LINK_STATUS_TASK_PERIOD_MS 200U
39+
#define LINK_STATUS_TASK_PERIOD_MS 200ms
4040
#define PHY_STATE_LINK_DOWN false
4141
#define PHY_STATE_LINK_UP true
4242
#define CRC_LENGTH_BYTES 4U

0 commit comments

Comments
 (0)