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

📄 csv8950.h

📁 Ep93XX TionProV2 BSP
💻 H
字号:
//**********************************************************************
//                                                                      
// Filename:    CSV8950.h
//                                                                      
// Description: 
//
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
//
// Use of this source code is subject to the terms of the Cirrus end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to 
// use this source code. For a copy of the EULA, please see the 
// EULA.RTF on your install media.
//
// Copyright(c) Cirrus Logic Corporation 2005, All Rights Reserved                       
//                                                                      
//**********************************************************************

#ifndef _H_CSV8950
#define _H_CSV8950


#define     MAXLOOP                 0x70000000      /* loop counter for busy wait loops */

//
// Define the Maximum autoconfiguration time to be 4 seconds.
//
#define     MAX_AUTOCONFIGTIME      (4 * 1000)


//#define TXBUFFCOUNT             4              
#define TXBUFFCOUNT             16              
#define TXBUFFSIZE              1520            /* Must be multiple of 4,32bits aligned */
#define TXREQCOUNT              TXBUFFCOUNT
#define TXDESCCOUNT             TXBUFFCOUNT
#define TXSTATCOUNT             TXBUFFCOUNT


/* QQQQQQQQQQQQQQQQQQ */
//#define RXBUFFCOUNT             4              
#define RXBUFFCOUNT             32              
#define RXBUFFSIZE              1520            /* Must be multiple of 4 */
#define RXDESCCOUNT             RXBUFFCOUNT
#define RXSTATCOUNT             RXBUFFCOUNT

#define MAXFRAMELENGTH          RXBUFFSIZE

#define TXSTARTMIN              32
#define TXSTARTMAX              944             /* 1024-64-16, Fifo size - Minframesize - 16 (Chip FACT) */
#define TXSTARTSTEP             32
#define TXGOODMIN               256

/*
 * Different PHYs supported by the code
 */
#define PHY_TYPE_NATIONAL       1
#define PHY_TYPE_CRYSTAL        2
#define PHY_TYPE_ICS            3
#define PHY_TYPE_BROADCOM       4
#define PHY_TYPE_LEVEL1         5
#define PHY_TYPE_MICREL_8721BL  6
#define PHY_TYPE_UNKNOWN        0xff


/* Transmit Request */

typedef struct
{
   DWORD SendID;
   WORD  StartIndex;
   WORD  DescCount;
} TXREQ, *PTXREQ;


/* Buffer Descriptor */

typedef struct
{
   BYTE *pBuff;
   DWORD     PhysAddr;
} BUFF;


/* Chip Data */

typedef struct
{
   RxDesc_t     *pRxDesc;
   RxDesc_t     *pRxDescLimit;
   DWORD         RxDescPhysAddr;
   RxStat_t     *pRxStat;
   RxStat_t     *pRxStatLimit;
   RxStat_t     *pRxStatNext;
   DWORD         RxStatPhysAddr;
   TxDesc_t     *pTxDesc;
   TxDesc_t     *pTxDescLimit;
   TxDesc_t     *pTxDescNext;
   DWORD        TxDescPhysAddr;
   TxStat_t     *pTxStat;
   TxStat_t     *pTxStatLimit;
   TxStat_t     *pTxStatNext;
   DWORD        TxStatPhysAddr;
   BUFF         RxBuff[RXBUFFCOUNT];
   WORD         RxAccepted;
   TXREQ        TxReq[TXREQCOUNT];
   WORD         TxReqIndex;
   WORD         TxDescAvail;
   DWORD        TxGoodCount;
   BYTE         PHYType;
   BYTE         PHYRevision;
   WORD         PHYAddress;
   BUFF         TxBuff[TXBUFFCOUNT];
   WORD         TxQueueDepth; /* The number of Tx frames enqueued but needs to process statuses.*/
} CD, *PCD;


/* Max Frame Length Register */

typedef union
{
   struct
   {
      WORD TxStartThresh;
      WORD MaxFrameLength;
   } Word;
   DWORD DWord;
} MAXFL;


#endif

⌨️ 快捷键说明

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