Skip to content

Commit 82ef4ef

Browse files
cyliangtwccli8
authored andcommitted
remove warnings
1 parent 21e8c5b commit 82ef4ef

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ u8_t tx_buf[TX_DESCRIPTOR_NUM][PACKET_BUFFER_SIZE];
4848

4949
extern void ethernetif_input(u16_t len, u8_t *buf, u32_t s, u32_t ns);
5050
extern void ethernetif_loopback_input(struct pbuf *p);
51+
extern void ack_emac_rx_isr(void);
5152

5253
// PTP source clock is 84MHz (Real chip using PLL). Each tick is 11.90ns
5354
// Assume we want to set each tick to 100ns.
@@ -256,7 +257,6 @@ unsigned int m_status;
256257

257258
void EMAC_RX_IRQHandler(void)
258259
{
259-
unsigned int cur_entry, status;
260260

261261
m_status = EMAC->INTSTS & 0xFFFF;
262262
EMAC->INTSTS = m_status;

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ struct netif *_netif;
7979

8080
unsigned char my_mac_addr[6] = {0x02, 0x00, 0xac, 0x55, 0x66, 0x77};
8181
extern u8_t my_mac_addr[6];
82+
extern int ETH_link_ok(void);
83+
extern void EMAC_RX_Action(void);
8284

8385
sys_sem_t RxReadySem; /**< RX packet ready semaphore */
8486

@@ -421,7 +423,7 @@ err_t
421423
/* Packet receive task */
422424

423425
err = sys_sem_new(&RxReadySem, 0);
424-
LWIP_ASSERT("RxReadySem creation error", (err == ERR_OK));
426+
if(err != ERR_OK) LWIP_ASSERT("RxReadySem creation error", (err == ERR_OK));
425427
// In GCC code, DEFAULT_THREAD_STACKSIZE 512 bytes is not enough for rx_task
426428
#if defined (__GNUC__)
427429
// mbed OS 2.0, DEFAULT_THREAD_STACKSIZE*3
@@ -482,10 +484,10 @@ typedef struct {
482484

483485
static void __phy_task(void *data) {
484486
struct netif *netif = (struct netif*)data;
485-
PHY_STATE crt_state = {STATE_UNKNOWN, (phy_speed_t)STATE_UNKNOWN, (phy_duplex_t)STATE_UNKNOWN};
486-
PHY_STATE prev_state;
487+
// PHY_STATE crt_state = {STATE_UNKNOWN, (phy_speed_t)STATE_UNKNOWN, (phy_duplex_t)STATE_UNKNOWN};
488+
// PHY_STATE prev_state;
487489

488-
prev_state = crt_state;
490+
// prev_state = crt_state;
489491
while (1) {
490492
// Get current status
491493
// Get the actual PHY link speed

0 commit comments

Comments
 (0)