From f3f69b8db7eb88aab060f23ce551a255f5c06b5f Mon Sep 17 00:00:00 2001 From: Jason Huang Date: Tue, 21 Apr 2020 13:22:33 +0800 Subject: [PATCH] Correction of judgment errors. --- .../emac-drivers/TARGET_NUVOTON_EMAC/TARGET_M480/m480_eth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/features/netsocket/emac-drivers/TARGET_NUVOTON_EMAC/TARGET_M480/m480_eth.c b/features/netsocket/emac-drivers/TARGET_NUVOTON_EMAC/TARGET_M480/m480_eth.c index 67883619a3..6e4ef50e9b 100644 --- a/features/netsocket/emac-drivers/TARGET_NUVOTON_EMAC/TARGET_M480/m480_eth.c +++ b/features/netsocket/emac-drivers/TARGET_NUVOTON_EMAC/TARGET_M480/m480_eth.c @@ -84,7 +84,7 @@ static int reset_phy(void) } - if(delayCnt == 0) { + if(delayCnt == -1) { NU_DEBUGF(("Reset phy failed\n")); return(-1); } @@ -105,7 +105,7 @@ static int reset_phy(void) break; } - if(delayCnt == 0) { + if(delayCnt == -1) { NU_DEBUGF(("AN failed. Set to 100 FULL\n")); EMAC->CTL |= (EMAC_CTL_OPMODE_Msk | EMAC_CTL_FUDUP_Msk); return(-1);