update EMAC driver.

This commit is contained in:
aozima 2014-09-02 11:28:59 +08:00
parent 89bcb70e5f
commit 4b99afc2b9
1 changed files with 2 additions and 15 deletions

View File

@ -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())