Skip to content

Commit f429675

Browse files
committed
[NUC472] remove dead code in nuc472_netif.c
1 parent c58631b commit f429675

File tree

1 file changed

+6
-5
lines changed
  • features/FEATURE_LWIP/lwip-interface/lwip-eth/arch/TARGET_NUVOTON/TARGET_NUC472

1 file changed

+6
-5
lines changed

features/FEATURE_LWIP/lwip-interface/lwip-eth/arch/TARGET_NUVOTON/TARGET_NUC472/nuc472_netif.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ void mbed_mac_address(char *mac)
117117
SYS_UnlockReg();
118118
FMC_Open();
119119
// = FMC_ReadUID(0);
120-
uID1 = FMC_ReadUID(1);
121-
word1 = (uID1 & 0x003FFFFF) | ((uID1 & 0x030000) << 6) >> 8;
122-
word0 = ((FMC_ReadUID(0) >> 4) << 20) | ((uID1 & 0xFF)<<12) | (FMC_ReadUID(2) & 0xFFF);
120+
uID1 = FMC_ReadUID(1);
121+
word1 = (uID1 & 0x003FFFFF) | ((uID1 & 0x030000) << 6) >> 8;
122+
word0 = ((FMC_ReadUID(0) >> 4) << 20) | ((uID1 & 0xFF)<<12) | (FMC_ReadUID(2) & 0xFFF);
123123
/* Disable FMC ISP function */
124124
FMC_Close();
125125
/* Lock protected registers */
@@ -135,7 +135,8 @@ void mbed_mac_address(char *mac)
135135
mac[3] = (word0 & 0x00ff0000) >> 16;
136136
mac[4] = (word0 & 0x0000ff00) >> 8;
137137
mac[5] = (word0 & 0x000000ff);
138-
// printf("mac address %02x-%02x-%02x-%02x-%02x-%02x \r\n", mac[0], mac[1],mac[2],mac[3],mac[4],mac[5]);
138+
139+
LWIP_DEBUGF(LWIP_DBG_LEVEL_WARNING|LWIP_DBG_ON, ("mac address %02x-%02x-%02x-%02x-%02x-%02x \r\n", mac[0], mac[1],mac[2],mac[3],mac[4],mac[5]));
139140
}
140141

141142
/**
@@ -356,7 +357,7 @@ ethernetif_loopback_input(struct pbuf *p) // TODO: make sure packet no
356357
{
357358
/* pass all packets to ethernet_input, which decides what packets it supports */
358359
if (netif->input(p, netif) != ERR_OK) {
359-
LWIP_DEBUGF(NETIF_DEBUG, ("k64f_enetif_input: input error\n"));
360+
LWIP_DEBUGF(NETIF_DEBUG, ("netif_input: input error\n"));
360361
/* Free buffer */
361362
pbuf_free(p);
362363
}

0 commit comments

Comments
 (0)