⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 freedev_lan91c111_regs.h

📁 lan91c111网络接口的设计 包括功能设计文件和驱动程序文件
💻 H
📖 第 1 页 / 共 3 页
字号:

/*
* Receive Frame Status bits
*/
#define FREEDEV_LAN91C111_RS_MULT_CAST_MSK          0x1
#define FREEDEV_LAN91C111_RS_MULT_CAST_OFST         0
#define FREEDEV_LAN91C111_RS_TOO_SHORT_MSK          0x400
#define FREEDEV_LAN91C111_RS_TOO_SHORT_OFST         10
#define FREEDEV_LAN91C111_RS_TOO_LONG_MSK           0x800
#define FREEDEV_LAN91C111_RS_TOO_LONG_OFST          11
#define FREEDEV_LAN91C111_RS_ODD_FRM_MSK            0x1000  
#define FREEDEV_LAN91C111_RS_ODD_FRM_OFST           12  
#define FREEDEV_LAN91C111_RS_BAD_CRC_MSK            0x2000
#define FREEDEV_LAN91C111_RS_BAD_CRC_OFST           13
#define FREEDEV_LAN91C111_RS_BROD_CAST_MSK          0x4000
#define FREEDEV_LAN91C111_RS_BROD_CAST_OFST         14
#define FREEDEV_LAN91C111_RS_ALGN_ERR_MSK           0x8000
#define FREEDEV_LAN91C111_RS_ALGN_ERR_OFST          15

/*
* Control Byte
*/
#define FREEDEV_LAN91C111_CONTROL_CRC_MSK           0x10
#define FREEDEV_LAN91C111_CONTROL_CRC_OFST          4
#define FREEDEV_LAN91C111_CONTROL_ODD_MSK           0x20
#define FREEDEV_LAN91C111_CONTROL_ODD_OFST          5

/*
* PHY MII Registers
*/
#define FREEDEV_LAN91C111_PHY_COMPANY_ID            0x16
#define FREEDEV_LAN91C111_PHY_MFCT_ID               0xF840

/* PHY Control Register */
#define FREEDEV_LAN91C111_PHY_CONTROL_REG           0

#define FREEDEV_LAN91C111_PHY_CONTROL_COLTST_MSK    0x80  
#define FREEDEV_LAN91C111_PHY_CONTROL_COLTST_OFST   7  
#define FREEDEV_LAN91C111_PHY_CONTROL_DPLX_MSK      0x100  
#define FREEDEV_LAN91C111_PHY_CONTROL_DPLX_OFST     8  
#define FREEDEV_LAN91C111_PHY_CONTROL_ANEG_RST_MSK  0x200 
#define FREEDEV_LAN91C111_PHY_CONTROL_ANEG_RST_OFST 9 
#define FREEDEV_LAN91C111_PHY_CONTROL_MII_DIS_MSK   0x400 
#define FREEDEV_LAN91C111_PHY_CONTROL_MII_DIS_OFST  10 
#define FREEDEV_LAN91C111_PHY_CONTROL_PDN_MSK       0x800 
#define FREEDEV_LAN91C111_PHY_CONTROL_PDN_OFST      11 
#define FREEDEV_LAN91C111_PHY_CONTROL_ANEG_EN_MSK   0x1000 
#define FREEDEV_LAN91C111_PHY_CONTROL_ANEG_EN_OFST  12 
#define FREEDEV_LAN91C111_PHY_CONTROL_SPEED_MSK     0x2000 
#define FREEDEV_LAN91C111_PHY_CONTROL_SPEED_OFST    13 
#define FREEDEV_LAN91C111_PHY_CONTROL_LPBK_MSK      0x4000 
#define FREEDEV_LAN91C111_PHY_CONTROL_LPBK_OFST     14 
#define FREEDEV_LAN91C111_PHY_CONTROL_RST_MSK       0x8000 
#define FREEDEV_LAN91C111_PHY_CONTROL_RST_OFST      15

/* PHY Status Register */
#define FREEDEV_LAN91C111_PHY_STATUS_REG            1

#define FREEDEV_LAN91C111_PHY_STATUS_EXREG_MSK      0x1  
#define FREEDEV_LAN91C111_PHY_STATUS_EXREG_OFST     0  
#define FREEDEV_LAN91C111_PHY_STATUS_JAB_MSK        0x2  
#define FREEDEV_LAN91C111_PHY_STATUS_JAB_OFST       1  
#define FREEDEV_LAN91C111_PHY_STATUS_LINK_MSK       0x4  
#define FREEDEV_LAN91C111_PHY_STATUS_LINK_OFST      2  
#define FREEDEV_LAN91C111_PHY_STATUS_CAP_ANEG_MSK   0x8  
#define FREEDEV_LAN91C111_PHY_STATUS_CAP_ANEG_OFST  3  
#define FREEDEV_LAN91C111_PHY_STATUS_REM_FLT_MSK    0x10  
#define FREEDEV_LAN91C111_PHY_STATUS_REM_FLT_OFST   4  
#define FREEDEV_LAN91C111_PHY_STATUS_ANEG_ACK_MSK   0x20  
#define FREEDEV_LAN91C111_PHY_STATUS_ANEG_ACK_OFST  5  
#define FREEDEV_LAN91C111_PHY_STATUS_CAP_SUPR_MSK   0x40  
#define FREEDEV_LAN91C111_PHY_STATUS_CAP_SUPR_OFST  6  
#define FREEDEV_LAN91C111_PHY_STATUS_CAP_TH_MSK     0x800  
#define FREEDEV_LAN91C111_PHY_STATUS_CAP_TH_OFST    11  
#define FREEDEV_LAN91C111_PHY_STATUS_CAP_TF_MSK     0x1000  
#define FREEDEV_LAN91C111_PHY_STATUS_CAP_TF_OFST    12  
#define FREEDEV_LAN91C111_PHY_STATUS_CAP_TXH_MSK    0x2000  
#define FREEDEV_LAN91C111_PHY_STATUS_CAP_TXH_OFST   13  
#define FREEDEV_LAN91C111_PHY_STATUS_CAP_TXF_MSK    0x4000  
#define FREEDEV_LAN91C111_PHY_STATUS_CAP_TXF_OFST   14  
#define FREEDEV_LAN91C111_PHY_STATUS_CAP_T4_MSK     0x8000  
#define FREEDEV_LAN91C111_PHY_STATUS_CAP_T4_OFST    15  

/* PHY Identifier Registers */
#define FREEDEV_LAN91C111_PHY_ID1_REG               2    
#define FREEDEV_LAN91C111_PHY_ID2_REG               3    

/* PHY Auto Negotiation Advertisement Register */
#define FREEDEV_LAN91C111_PHY_ADVERT_REG            4

/* PHY Auto Negotiation Remote End Capability Register */
#define FREEDEV_LAN91C111_PHY_REMOTE_REG            5

/* Bit definitions for the negotiation */
#define FREEDEV_LAN91C111_PHY_NEGOTIATE_CSMA_MSK    0x1  
#define FREEDEV_LAN91C111_PHY_NEGOTIATE_CSMA_OFST   0  
#define FREEDEV_LAN91C111_PHY_NEGOTIATE_10_HDX_MSK  0x20  
#define FREEDEV_LAN91C111_PHY_NEGOTIATE_10_HDX_OFST 5  
#define FREEDEV_LAN91C111_PHY_NEGOTIATE_10_FDX_MSK  0x40  
#define FREEDEV_LAN91C111_PHY_NEGOTIATE_10_FDX_OFST 6  
#define FREEDEV_LAN91C111_PHY_NEGOTIATE_TX_HDX_MSK  0x80  
#define FREEDEV_LAN91C111_PHY_NEGOTIATE_TX_HDX_OFST 7  
#define FREEDEV_LAN91C111_PHY_NEGOTIATE_TX_FDX_MSK  0x100  
#define FREEDEV_LAN91C111_PHY_NEGOTIATE_TX_FDX_OFST 8  
#define FREEDEV_LAN91C111_PHY_NEGOTIATE_T4_MSK      0x200  
#define FREEDEV_LAN91C111_PHY_NEGOTIATE_T4_OFST     9  
#define FREEDEV_LAN91C111_PHY_NEGOTIATE_RF_MSK      0x2000  
#define FREEDEV_LAN91C111_PHY_NEGOTIATE_RF_OFST     13  
#define FREEDEV_LAN91C111_PHY_NEGOTIATE_ACK_MSK     0x4000  
#define FREEDEV_LAN91C111_PHY_NEGOTIATE_ACK_OFST    14  
#define FREEDEV_LAN91C111_PHY_NEGOTIATE_NP_MSK      0x8000  
#define FREEDEV_LAN91C111_PHY_NEGOTIATE_NP_OFST     15  

/* PHY Configuration Register 1 */
#define FREEDEV_LAN91C111_PHY_CONFIG1_REG           16

#define FREEDEV_LAN91C111_PHY_CONFIG1_TRF0_MSK      0x1  
#define FREEDEV_LAN91C111_PHY_CONFIG1_TRF0_OFST     0  
#define FREEDEV_LAN91C111_PHY_CONFIG1_TRF1_MSK      0x2  
#define FREEDEV_LAN91C111_PHY_CONFIG1_TRF1_OFST     1  
#define FREEDEV_LAN91C111_PHY_CONFIG1_TLVL0_MSK     0x4  
#define FREEDEV_LAN91C111_PHY_CONFIG1_TLVL0_OFST    2  
#define FREEDEV_LAN91C111_PHY_CONFIG1_TLVL1_MSK     0x8  
#define FREEDEV_LAN91C111_PHY_CONFIG1_TLVL1_OFST    3 
#define FREEDEV_LAN91C111_PHY_CONFIG1_TLVL2_MSK     0x10  
#define FREEDEV_LAN91C111_PHY_CONFIG1_TLVL2_OFST    4  
#define FREEDEV_LAN91C111_PHY_CONFIG1_TLVL3_MSK     0x20  
#define FREEDEV_LAN91C111_PHY_CONFIG1_TLVL3_OFST    5  
#define FREEDEV_LAN91C111_PHY_CONFIG1_RLVL0_MSK     0x40  
#define FREEDEV_LAN91C111_PHY_CONFIG1_RLVL0_OFST    6  
#define FREEDEV_LAN91C111_PHY_CONFIG1_CABLE_MSK     0x80  
#define FREEDEV_LAN91C111_PHY_CONFIG1_CABLE_OFST    7  
#define FREEDEV_LAN91C111_PHY_CONFIG1_EQLZR_MSK     0x100  
#define FREEDEV_LAN91C111_PHY_CONFIG1_EQLZR_OFST    8  
#define FREEDEV_LAN91C111_PHY_CONFIG1_UNSCDS_MSK    0x200  
#define FREEDEV_LAN91C111_PHY_CONFIG1_UNSCDS_OFST   9  
#define FREEDEV_LAN91C111_PHY_CONFIG1_BYPSCR_MSK    0x400  
#define FREEDEV_LAN91C111_PHY_CONFIG1_BYPSCR_OFST   10  
#define FREEDEV_LAN91C111_PHY_CONFIG1_XMTPDN_MSK    0x2000  
#define FREEDEV_LAN91C111_PHY_CONFIG1_XMTPDN_OFST   13  
#define FREEDEV_LAN91C111_PHY_CONFIG1_XMTDIS_MSK    0x4000  
#define FREEDEV_LAN91C111_PHY_CONFIG1_XMTDIS_OFST   14
#define FREEDEV_LAN91C111_PHY_CONFIG1_LNKDIS_MSK    0x8000  
#define FREEDEV_LAN91C111_PHY_CONFIG1_LNKDIS_OFST   15  

/* PHY Configuration Register 2 */
#define FREEDEV_LAN91C111_PHY_CONFIG2_REG           17

#define FREEDEV_LAN91C111_PHY_CONFIG2_INTMDIO_MSK   0x4  
#define FREEDEV_LAN91C111_PHY_CONFIG2_INTMDIO_OFST  2  
#define FREEDEV_LAN91C111_PHY_CONFIG2_MREG_MSK      0x8  
#define FREEDEV_LAN91C111_PHY_CONFIG2_MREG_OFST     3
#define FREEDEV_LAN91C111_PHY_CONFIG2_JABDIS_MSK    0x10  
#define FREEDEV_LAN91C111_PHY_CONFIG2_JABDIS_OFST   4  
#define FREEDEV_LAN91C111_PHY_CONFIG2_APOLDIS_MSK   0x20  
#define FREEDEV_LAN91C111_PHY_CONFIG2_APOLDIS_OFST  5  

/* PHY Status Output (and Interrupt status) Register */
#define FREEDEV_LAN91C111_PHY_INT_STATUS_REG        18    

/* PHY Interrupt/Status Mask Register */
#define FREEDEV_LAN91C111_PHY_INT_MASK_REG          19

/* Bit definitions for the PHY INT registers */
#define FREEDEV_LAN91C111_PHY_INT_DPLXDET_MSK       0x40  
#define FREEDEV_LAN91C111_PHY_INT_DPLXDET_OFST      6  
#define FREEDEV_LAN91C111_PHY_INT_SPDDET_MSK        0x80  
#define FREEDEV_LAN91C111_PHY_INT_SPDDET_OFST       7  
#define FREEDEV_LAN91C111_PHY_INT_JAB_MSK           0x100  
#define FREEDEV_LAN91C111_PHY_INT_JAB_OFST          8  
#define FREEDEV_LAN91C111_PHY_INT_RPOL_MSK          0x200  
#define FREEDEV_LAN91C111_PHY_INT_RPOL_OFST         9  
#define FREEDEV_LAN91C111_PHY_INT_ESD_MSK           0x400  
#define FREEDEV_LAN91C111_PHY_INT_ESD_OFST          10  
#define FREEDEV_LAN91C111_PHY_INT_SSD_MSK           0x800  
#define FREEDEV_LAN91C111_PHY_INT_SSD_OFST          11  
#define FREEDEV_LAN91C111_PHY_INT_CWRD_MSK          0x1000  
#define FREEDEV_LAN91C111_PHY_INT_CWRD_OFST         12  
#define FREEDEV_LAN91C111_PHY_INT_LOSSSYNC_MSK      0x2000  
#define FREEDEV_LAN91C111_PHY_INT_LOSSSYNC_OFST     13  
#define FREEDEV_LAN91C111_PHY_INT_LNKFAIL_MSK       0x4000  
#define FREEDEV_LAN91C111_PHY_INT_LNKFAIL_OFST      14  
#define FREEDEV_LAN91C111_PHY_INT_INT_MSK           0x8000  
#define FREEDEV_LAN91C111_PHY_INT_INT_OFST          15  
 
#endif  /* __FREEDEV_LAN91C111_REGS_H_ */

/*
* Register definitions for the LAN91C111 ethernet chip used on the Nios II
* FreeDev2.1 development 16bit net boards
* Create by Free-electron
* author:liu-jun-sheng
* address:MoGanShan road HangZhou ZheJiang China 
* tel:0571-88846603
* www.Free-Electron.com.cn
* date:2005/12/02
*/


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -