From 4b99afc2b9ba3dea399a79aa6bd3ef9c4571afea Mon Sep 17 00:00:00 2001 From: aozima Date: Tue, 2 Sep 2014 11:28:59 +0800 Subject: [PATCH] update EMAC driver. --- bsp/CME_M7/drivers/emac.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/bsp/CME_M7/drivers/emac.c b/bsp/CME_M7/drivers/emac.c index 2f72545eb5..3de53142b9 100644 --- a/bsp/CME_M7/drivers/emac.c +++ b/bsp/CME_M7/drivers/emac.c @@ -19,8 +19,6 @@ #include "board.h" #include "app_phy.h" -//#include "app_bufferpool.h" -//#include "app_bufferqueue.h" /* debug option */ #define ETH_DEBUG @@ -180,27 +178,16 @@ static rt_err_t rt_cme_eth_init(rt_device_t dev) init.ETH_JumboFrame = FALSE; memcpy(init.ETH_MacAddr, cme_eth->dev_addr, sizeof(init.ETH_MacAddr)); -// init.ETH_MacAddr[0] = 0x00; -// init.ETH_MacAddr[1] = 0x1E; -// init.ETH_MacAddr[2] = 0xC9; -// init.ETH_MacAddr[3] = 0x3B; -// init.ETH_MacAddr[4] = 0x11; -// init.ETH_MacAddr[5] = 0xF8; // Disable broadcast; + // TODO: why? + memset(&flt, 0, sizeof(ETH_FrameFilter)); flt.ETH_BroadcastFilterEnable = FALSE; flt.ETH_OwnFilterEnable = FALSE; flt.ETH_SelfDrop = FALSE; flt.ETH_SourceFilterEnable = FALSE; flt.ETH_SourceDrop = FALSE; - flt.ETH_SourceMacAddr[0] = 0x00; - flt.ETH_SourceMacAddr[1] = 0x1E; - flt.ETH_SourceMacAddr[2] = 0xC9; - flt.ETH_SourceMacAddr[3] = 0x3B; - flt.ETH_SourceMacAddr[4] = 0x11; - flt.ETH_SourceMacAddr[5] = 0xF9; - init.ETH_Filter = &flt; if (!phy_Init())