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

📄 csl_emimdio.h

📁 DM643的音频解码程序! 来之不易 请多支持! 里面有全套的gel文件!
💻 H
字号:
/*
 *  Copyright 2003 by Texas Instruments Incorporated.
 *  All rights reserved. Property of Texas Instruments Incorporated.
 *  Restricted rights to use, duplicate or disclose this code are
 *  granted through contract.
 *  
 */
/* "@(#) DSP/BIOS 4.90.200 05-05-03 (barracuda-m04)" */
/*-----------------------------------------------------------------------*\
* EMIMDIO - Ethernet MDIO Interface
*
* EMIMDIO.H
*
* This file contains MDIO include data for the EMIMDIO device.
*
* NOTE:
*   When used in a multitasking environment, no EMIMDIO function may be
*   called while another EMIMDIO function is operating on the same EMIMDIO
*   handle in another thread. It is the responsibility of the application
*   to assure adherence to this restriction.
*
\*-----------------------------------------------------------------------*/
#ifndef _CSL_EMIMDIO_H_
#define _CSL_EMIMDIO_H_

#include <csl_chip.h>
#include <csl_irq.h>
#include <csl_mdiohal.h>


#if (MDIO_SUPPORT)
/*-----------------------------------------------------------------------*\
* NEW TYPES
\*-----------------------------------------------------------------------*/
#ifndef _CSL_EMI_TYPES
#define _CSL_EMI_TYPES
typedef unsigned int uint;
typedef void * Handle;
#endif

/*-----------------------------------------------------------------------*\
* EMIMDIO Configuration Mode Flags
*
* These flags determine how the EMIMDIO module behaves
\*-----------------------------------------------------------------------*/
#define EMIMDIO_MODEFLG_AUTONEG     0x0001 /* Use Autonegotiate         */
/* The following bits are used for manual and fallback configuration */
#define EMIMDIO_MODEFLG_HD10        0x0002 /* Use 10Mb/s Half Duplex    */
#define EMIMDIO_MODEFLG_FD10        0x0004 /* Use 10Mb/s Full Duplex    */
#define EMIMDIO_MODEFLG_HD100       0x0008 /* Use 100Mb/s Half Duplex   */
#define EMIMDIO_MODEFLG_FD100       0x0010 /* Use 100Mb/s Full Duplex   */
#define EMIMDIO_MODEFLG_LOOPBACK    0x0020 /* Use PHY Loopback          */
/* The following bits are reserved for use by the EMIMDIO module */
#define EMIMDIO_MODEFLG_NWAYACTIVE  0x0040 /* NWAY is currently active  */

/*-----------------------------------------------------------------------*\
* EMIMDIO Link Status Values
*
* These values indicate current PHY link status
\*-----------------------------------------------------------------------*/
#define EMIMDIO_LINKSTATUS_NOLINK   0
#define EMIMDIO_LINKSTATUS_HD10     1
#define EMIMDIO_LINKSTATUS_FD10     2
#define EMIMDIO_LINKSTATUS_HD100    3
#define EMIMDIO_LINKSTATUS_FD100    4

/*-----------------------------------------------------------------------*\
* EMIMDIO Events
*
* These events are returned by EMIMDIO_event() to allow the application
* (or EMAC) to track MDIO status.
\*-----------------------------------------------------------------------*/
#define EMIMDIO_EVENT_NOCHANGE      0   /* No change from previous status */
#define EMIMDIO_EVENT_LINKDOWN      1   /* Link down event                */
#define EMIMDIO_EVENT_LINKUP        2   /* Link (or re-link) event        */
#define EMIMDIO_EVENT_PHYERROR      3   /* No PHY connected               */


/*-----------------------------------------------------------------------*\
* EMIMDIO_open()
*
* Opens the EMI MDIO peripheral and start searching for a PHY device.
*
* It is assumed that the MDIO module is reset prior to calling this
* function.
\*-----------------------------------------------------------------------*/
Handle EMIMDIO_open( uint mdioModeFlags );

/*-----------------------------------------------------------------------*\
* EMIMDIO_close()
*
* Close the EMI MDIO peripheral and disable further operation.
\*-----------------------------------------------------------------------*/
void EMIMDIO_close( Handle hEMIMDIO );

/*-----------------------------------------------------------------------*\
* EMIMDIO_getStatus()
*
* Called to get the status of the MDIO/PHY
\*-----------------------------------------------------------------------*/
void EMIMDIO_getStatus( Handle hEMIMDIO, uint *pPhy, uint *pLinkStatus );

/*-----------------------------------------------------------------------*\
* EMIMDIO_event()
*
* Called to signify that approx 500mS have elapsed, or a more significant
* event has occurred.
*
* Returns NULL, or a link status code
\*-----------------------------------------------------------------------*/
uint EMIMDIO_event( Handle hEMIMDIO );

/*-----------------------------------------------------------------------*\
* EMIMDIO_initPHY()
*
* Force a switch to the specified PHY, and start negotiation.
*
* This call is only used to override the normal PHY detection process.
*
* Returns 1 if the PHY selection completed OK, else 0
\*-----------------------------------------------------------------------*/
uint EMIMDIO_initPHY( Handle hEMIMDIO, uint phyAddr );

#endif /* MDIO_SUPPORT */

#endif /* _CSL_EMIMDIO_H_ */
/******************************************************************************\
* End of emimdio.h
\******************************************************************************/

⌨️ 快捷键说明

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