eth_sam3.h
Go to the documentation of this file.
00001 00040 #ifndef ETH_SAM3_H 00041 #define ETH_SAM3_H 00042 00043 #include <cpu/types.h> 00044 00045 #define EMAC_TX_BUFSIZ 1518 //!!! Don't change this 00046 #define EMAC_TX_BUFFERS 1 //!!! Don't change this 00047 #define EMAC_TX_DESCRIPTORS EMAC_TX_BUFFERS 00048 00049 #define EMAC_RX_BUFFERS 32 //!!! Don't change this 00050 #define EMAC_RX_BUFSIZ 128 //!!! Don't change this 00051 #define EMAC_RX_DESCRIPTORS EMAC_RX_BUFFERS 00052 00053 // Flag to manage local tx buffer 00054 #define TXS_USED 0x80000000 //Used buffer. 00055 #define TXS_WRAP 0x40000000 //Last descriptor. 00056 #define TXS_ERROR 0x20000000 //Retry limit exceeded. 00057 #define TXS_UNDERRUN 0x10000000 //Transmit underrun. 00058 #define TXS_NO_BUFFER 0x08000000 //Buffer exhausted. 00059 #define TXS_NO_CRC 0x00010000 //CRC not appended. 00060 #define TXS_LAST_BUFF 0x00008000 //Last buffer of frame. 00061 #define TXS_LENGTH_FRAME 0x000007FF // Length of frame including FCS. 00062 00063 // Flag to manage local rx buffer 00064 #define RXBUF_OWNERSHIP 0x00000001 00065 #define RXBUF_WRAP 0x00000002 00066 00067 #define BUF_ADDRMASK 0xFFFFFFFC 00068 00069 #define RXS_BROADCAST_ADDR 0x80000000 // Broadcast address detected. 00070 #define RXS_MULTICAST_HASH 0x40000000 // Multicast hash match. 00071 #define RXS_UNICAST_HASH 0x20000000 // Unicast hash match. 00072 #define RXS_EXTERNAL_ADDR 0x10000000 // External address match. 00073 #define RXS_SA1_ADDR 0x04000000 // Specific address register 1 match. 00074 #define RXS_SA2_ADDR 0x02000000 // Specific address register 2 match. 00075 #define RXS_SA3_ADDR 0x01000000 // Specific address register 3 match. 00076 #define RXS_SA4_ADDR 0x00800000 // Specific address register 4 match. 00077 #define RXS_TYPE_ID 0x00400000 // Type ID match. 00078 #define RXS_VLAN_TAG 0x00200000 // VLAN tag detected. 00079 #define RXS_PRIORITY_TAG 0x00100000 // Priority tag detected. 00080 #define RXS_VLAN_PRIORITY 0x000E0000 // VLAN priority. 00081 #define RXS_CFI_IND 0x00010000 // Concatenation format indicator. 00082 #define RXS_EOF 0x00008000 // End of frame. 00083 #define RXS_SOF 0x00004000 // Start of frame. 00084 #define RXS_RBF_OFFSET 0x00003000 // Receive buffer offset mask. 00085 #define RXS_LENGTH_FRAME 0x000007FF // Length of frame including FCS. 00086 00087 #define EMAC_RSR_BITS (BV(EMAC_BNA) | BV(EMAC_REC) | BV(EMAC_OVR)) 00088 #define EMAC_TSR_BITS (BV(EMAC_UBR) | BV(EMAC_COL) | BV(EMAC_RLES) | \ 00089 BV(EMAC_BEX) | BV(EMAC_COMP) | BV(EMAC_UND)) 00090 00091 typedef struct BufDescriptor 00092 { 00093 volatile uint32_t addr; 00094 volatile uint32_t stat; 00095 } BufDescriptor; 00096 00097 #endif /* ETH_SAM3_H */
![(please configure the [header_logo] section in trac.ini)](/chrome/site/bertos_logo.png)