📄 net_phy.h
字号:
/*
*********************************************************************************************************
* uC/TCP-IP
* The Embedded TCP/IP Stack
*
* (c) Copyright 2003-2004; Micrium, Inc.; Weston, FL
*
* All rights reserved. Protected by international copyright laws.
* Knowledge of the source code may not be used to write a similar
* product. This file may only be used in accordance with a license
* and should not be redistributed in any way.
*********************************************************************************************************
*/
/*
*********************************************************************************************************
*
* NETWORK INTERFACE CARD
*
* LXT971A
*
* Filename : net_phy.h
* Version : V1.05
* Programmer(S) : JDH
*********************************************************************************************************
* Note(s) : (1) Supports Intel LXT971A '3.3V Dual-Speed Fast Ethernet Transceiver' as described in
*
* Intel Corporation (INTEL; http://www.intel.com)
* (a) LXT971A (INTEL LXT971A; Revision 249414-002)
*********************************************************************************************************
*/
/*
*********************************************************************************************************
* DEFINES
*********************************************************************************************************
*/
#define LXT971A_INIT_AUTO_NEG_RETRIES 3
/*
*********************************************************************************************************
* FUNCTION PROTOTYPES
*********************************************************************************************************
*/
void NetNIC_PhyInit (void);
void NetNIC_PhyAutoNeg (void); /* Do link auto-negotiation */
/* ------------------- STATUS FNCTS ------------------- */
CPU_BOOLEAN NetNIC_PhyAutoNegState (void); /* Get PHY auto-negotiation state */
CPU_BOOLEAN NetNIC_PhyLinkState (void); /* Get PHY link state */
void NetNIC_PhyISR_Handler (void); /* Decode & handle PHY ISRs. */
/*
*********************************************************************************************************
* FUNCTION PROTOTYPES
* DEFINED IN PRODUCT'S net_bsp.c
*********************************************************************************************************
*/
void NetNIC_LinkUp (void); /* Message from NIC that the ethernet link is up. */
/* Called in interruption context most of the time. */
void NetNIC_LinkDown (void); /* Message from NIC that the ethernet link is down. */
/* Called in interruption context most of the time. */
void LXT971A_DlyReset (void); /* Implement 50 ms dly. */
/* MAY use OS dly to preempt or tmr loop. */
void LXT971A_DlyAutoNegAck (void); /* Implement 1.5 s dly. */
/* MUST use OS dly to preempt. */
/*
*********************************************************************************************************
* FUNCTION PROTOTYPES
* DEFINED IN PRODUCT's net_isr_a.s
*********************************************************************************************************
*/
void NetNIC_PhyISR (void);
/*
*********************************************************************************************************
* FUNCTION PROTOTYPES
* DEFINED IN PRODUCT'S net_isr.c
*********************************************************************************************************
*/
#if (NET_NIC_CFG_INT_CTRL_EN == DEF_ENABLED)
void NetNIC_PhyIntInit (void); /* Init int ctrl'r. */
void NetNIC_PhyIntClr (void); /* Clr int ctrl'r src(s). */
#endif
/*
*********************************************************************************************************
* CONFIGURATION ERRORS
*********************************************************************************************************
*/
#ifndef NET_NIC_CFG_INT_CTRL_EN
#error NET_NIC_CFG_INT_CTRL_EN not #define'd in 'net_cfg.h'
#error [MUST be DEF_DISABLED]
#error [ || DEF_ENABLED ]
#elif ((NET_NIC_CFG_INT_CTRL_EN != DEF_DISABLED) && \
(NET_NIC_CFG_INT_CTRL_EN != DEF_ENABLED ))
#error NET_NIC_CFG_INT_CTRL_EN illegally #define'd in 'net_cfg.h'
#error [MUST be DEF_DISABLED]
#error [ || DEF_ENABLED ]
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -