1 LM3S_EMAC.h的源代码
/* Management Clock Divider */
#define MCDIV_MASK 0x000000FF /* MII Data Clock Divider Mask */
/* Management Transmit/Receive Data */
#define MTXD_MASK 0x0000FFFF /* Management Transmit Data mask */
#define MRXD_MASK 0x0000FFFF /* Management Receive Data mask */
/* Number of RX Packets */
#define RXFC_MASK 0x0000003F /* Number of RX Packets in FIFO */
/* Tramsmit Request */
#define TXRQ_NEW_TX 0x00000001 /* Start New Transmission */
/* Timer Support */
#define TSEN_EN 0x00000001 /* Enable Timer Support */
/* Embedded PHY Registers */
#define PHY_REG_CTRL 0x00 /* Basic Mode Control Register */
#define PHY_REG_STAT 0x01 /* Basic Mode Status Register */
#define PHY_REG_IDR1 0x02 /* PHY Identifier 1 */
#define PHY_REG_IDR2 0x03 /* PHY Identifier 2 */
#define PHY_REG_ANA 0x04 /* Auto-Negotiation Advertisement */
#define PHY_REG_ANLPA 0x05 /* Auto-Neg. Link Partner Abitily */
#define PHY_REG_ANE 0x06 /* Auto-Neg. Expansion Register */
#define PHY_REG_VSP 0x10 /* Vendor Specific Register */
#define PHY_REG_INT 0x11 /* Interrupt Control/Status Register */
#define PHY_REG_DIAG 0x12 /* Diagnostic Register */
#define PHY_REG_TRANC 0x13 /* Transceiver Control */
#define PHY_REG_LEDC 0x17 /* LED Configuration */
#define PHY_REG_MDIX 0x18 /* MDI/MDIX Control */
#define PHY_FULLD_100M 0x2100 /* Full Duplex 100Mbit */
#define PHY_HALFD_100M 0x2000 /* Half Duplex 100Mbit */
#define PHY_FULLD_10M 0x0100 /* Full Duplex 10Mbit */
#define PHY_HALFD_10M 0x0000 /* Half Duplex 10MBit */
#define PHY_AUTO_NEG 0x3000 /* Select Auto Negotiation */
/* Misc */
#define PHY_DEF_ADR 0x0000 /* Default PHY device address */
#endif
/*----------------------------------------------------------------------------
* end of file
*---------------------------------------------------------------------------*/
可以从上看出,这里都是一些寄存器等。其实也可以用LM3S固件库里的
这里就不多说了 |