From 5760c356ef6f6bd8d7bc46aacb588418be78c70b Mon Sep 17 00:00:00 2001 From: liang yongxiang Date: Tue, 13 Mar 2018 17:00:29 +0800 Subject: [PATCH] [bsp] fix enum warnings --- bsp/imxrt1052-evk/drivers/drv_eth.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bsp/imxrt1052-evk/drivers/drv_eth.c b/bsp/imxrt1052-evk/drivers/drv_eth.c index 2678336c83..3bd9cdcc72 100644 --- a/bsp/imxrt1052-evk/drivers/drv_eth.c +++ b/bsp/imxrt1052-evk/drivers/drv_eth.c @@ -572,9 +572,10 @@ static void phy_monitor_thread_entry(void *parameter) if (link) // link up { - PHY_GetLinkSpeedDuplex(imxrt_eth_device.enet_base, PHY_ADDRESS, &speed, &duplex); + PHY_GetLinkSpeedDuplex(imxrt_eth_device.enet_base, + PHY_ADDRESS, &speed, &duplex); - if (kENET_MiiSpeed10M == speed) + if (kPHY_Speed10M == speed) { dbg_log(DBG_LOG, "10M\n"); } @@ -583,7 +584,7 @@ static void phy_monitor_thread_entry(void *parameter) dbg_log(DBG_LOG, "100M\n"); } - if (kENET_MiiHalfDuplex == duplex) + if (kPHY_HalfDuplex == duplex) { dbg_log(DBG_LOG, "half dumplex\n"); } @@ -592,7 +593,8 @@ static void phy_monitor_thread_entry(void *parameter) dbg_log(DBG_LOG, "full dumplex\n"); } - if ((imxrt_eth_device.speed != speed) || (imxrt_eth_device.duplex != duplex)) + if ((imxrt_eth_device.speed != (enet_mii_speed_t)speed) + || (imxrt_eth_device.duplex != (enet_mii_duplex_t)duplex)) { imxrt_eth_device.speed = (enet_mii_speed_t)speed; imxrt_eth_device.duplex = (enet_mii_duplex_t)duplex;