CheckIfFrameReceived() |
StartReadingFrame(); CopyFromFrame_EthMAC(void *Dest, ETH_FRAG_SIZE); StopReadingFrame(); |
/* EMAC Memory Buffer configuration for 16K Ethernet RAM. */ #define NUM_RX_FRAG 4 /* Num.of RX Fragments 4*1536= 6.0kB */ #define NUM_TX_FRAG 2 /* Num.of TX Fragments 3*1536= 4.6kB */ #define ETH_FRAG_SIZE 1536 /* Packet Fragment size 1536 Bytes */ #define ETH_MAX_FLEN 1536 /* Max. Ethernet Frame Size */ /* EMAC variables located in AHB SRAM bank 1*/ #define RX_DESC_BASE 0x2007c000 #define RX_STAT_BASE (RX_DESC_BASE + NUM_RX_FRAG*8) #define TX_DESC_BASE (RX_STAT_BASE + NUM_RX_FRAG*8) #define TX_STAT_BASE (TX_DESC_BASE + NUM_TX_FRAG*8) #define[COLOR=Red] RX_BUF_BASE[/COLOR] (TX_STAT_BASE + NUM_TX_FRAG*4) #define[COLOR=Red] TX_BUF_BASE [/COLOR] (RX_BUF_BASE + NUM_RX_FRAG*ETH_FRAG_SIZE) ... #define [COLOR=Red]RX_BUF(i) [/COLOR] (RX_BUF_BASE + ETH_FRAG_SIZE*i) #define [COLOR=Red]TX_BUF(i)[/COLOR] (TX_BUF_BASE + ETH_FRAG_SIZE*i) |