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