[bsp] fix enum warnings

This commit is contained in:
liang yongxiang 2018-03-13 17:00:29 +08:00
parent 005b9da3d5
commit 5760c356ef
1 changed files with 6 additions and 4 deletions

View File

@ -572,9 +572,10 @@ static void phy_monitor_thread_entry(void *parameter)
if (link) // link up 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"); dbg_log(DBG_LOG, "10M\n");
} }
@ -583,7 +584,7 @@ static void phy_monitor_thread_entry(void *parameter)
dbg_log(DBG_LOG, "100M\n"); dbg_log(DBG_LOG, "100M\n");
} }
if (kENET_MiiHalfDuplex == duplex) if (kPHY_HalfDuplex == duplex)
{ {
dbg_log(DBG_LOG, "half dumplex\n"); 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"); 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.speed = (enet_mii_speed_t)speed;
imxrt_eth_device.duplex = (enet_mii_duplex_t)duplex; imxrt_eth_device.duplex = (enet_mii_duplex_t)duplex;