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

📄 zl5011xtfq.h

📁 Zalink50114----TDMoIP芯片驱动源码
💻 H
字号:
/*******************************************************************************
*
*  File name:              zl5011xTfq.h
*
*  Version:                15
*
*  Author:                 MRC
*
*  Date created:           23/04/2002
*
*  Copyright 2002, 2003, 2004, 2005, Zarlink Semiconductor Limited.
*  All rights reserved.
*
*  Module Description:
*
*  This is the header file for the TFQ block. It contains the function prototypes
*  and any definitions.
*
*  Revision History:
*
*  Rev:  Date:       Author:  Comments:
*  1     23/04/2002  MRC      Creation
*  2     23/04/2002  MRC      Changed Authur to Author in the header.
*  3     19/09/2002  MRC      Added max granule fn
*  4     01/10/2002  DJA      Function TfqEnableInterrupts renamed to
*                             zl5011xTfqEnableInterrupts
*                             Function TfqDisableInterrupts renamed to
*                             zl5011xTfqDisableInterrupts
*  5     08/07/2002  PJE      new zl5011xTfqClearGranuleThresholdIntr
*  6     21/10/2002  PJE      new TfqEnable/DisableGranuleThresholdIntr
*  7     24/10/2002  PJE      API tidy up
*  8     31/10/2002  MRC      Added variants + minor fixes
*  9     06/02/2003  MRC      Added TFQ reset function
*  10    22/05/2003  MRC      Added fn to get sequence number for the queue
*  11    05/06/2003  MRC      Added fn to return queue status
*  12    21/06/2003  MRC      Added fn to return current queue length
*  13    02/12/2004  APL      Added helper fn to demangle the avg queue length
*  14    14/02/2005  MRC      Modified comment
*  15    17/05/2005  MRC      Added function to reset queue statistics
*
*******************************************************************************/

#ifndef _ZL5011X_TFQ_H
#define _ZL5011X_TFQ_H

#ifdef __cplusplus
extern "C" {
#endif

/* defines for the TFQ interrupt bit positions */
#define ZL5011X_TFQ_OVERFLOW_INT_ENABLE     28
#define ZL5011X_TFQ_OVERFLOW_INT            26

/*****************   INCLUDE FILES   ******************************************/

/*****************   # DEFINES   **********************************************/

/*****************   DATA TYPES   *********************************************/

/*****************   DATA STRUCTURES   ****************************************/

/*****************   EXPORTED GLOBAL VARIABLE DECLARATIONS   ******************/

/*****************   EXTERNAL FUNCTION DECLARATIONS   *************************/

zlStatusE zl5011xTfqInit(zl5011xParamsS *zl5011xParams);
zlStatusE zl5011xTfqConfigure(zl5011xParamsS *zl5011xParams, Uint32T context,
      Uint32T baseAddress, zl5011xWanTxQueueSizeE size, zl5011xWanTxQueueOperationE mode);
zlStatusE zl5011xTfqSetACP(zl5011xParamsS *zl5011xParams, Uint32T context,
      zl5011xWanTxQueueAvgModeE avgMode);
zlStatusE zl5011xTfqFlush(zl5011xParamsS *zl5011xParams, Uint32T context);
zlStatusE zl5011xTfqResume(zl5011xParamsS *zl5011xParams, Uint32T context);
zlStatusE zl5011xTfqGetQueueStatus(zl5011xParamsS *zl5011xParams, Uint32T context, zl5011xBooleanE *active);
zlStatusE zl5011xTfqResetLengths(zl5011xParamsS *zl5011xParams, Uint32T context);
zlStatusE zl5011xTfqExtendQueueDepth(zl5011xParamsS *zl5011xParams, Uint32T context,
      zl5011xBooleanE packet, Uint32T bytes);
zlStatusE zl5011xTfqReduceQueueDepth(zl5011xParamsS *zl5011xParams, Uint32T context,
      zl5011xBooleanE packet, Uint32T bytes);
zlStatusE zl5011xTfqChangeQueueDepth(zl5011xParamsS *zl5011xParams, Uint32T context,
      zl5011xBooleanE packet, Uint32T bytes, Uint32T bitPos, Uint32T lengthPos, Uint32T lengthMask);
zlStatusE zl5011xTfqSetGranuleUsage(zl5011xParamsS *zl5011xParams, Uint32T maxNumberOfGranules);

zlStatusE zl5011xTfqGetMinMaxLengths(zl5011xParamsS *zl5011xParams, Uint32T context,
                                    Uint32T *minLength, Uint32T *maxLength);
zlStatusE zl5011xTfqGetAvgLength(zl5011xParamsS *zl5011xParams, Uint32T context,
                                Uint32T *avgLength);
void zl5011xTfqFormatAvgLength(Uint32T avgLength, Uint32T numDP, Uint32T *intPart, Uint32T *fracPart);

zlStatusE zl5011xTfqGetCurrentLength(zl5011xParamsS *zl5011xParams,
      Uint32T context, Uint32T *value);
zlStatusE zl5011xTfqGetLatePackets(zl5011xParamsS *zl5011xParams, Uint32T context,
                                  Uint32T *count);
zlStatusE zl5011xTfqGetEarlyPackets(zl5011xParamsS *zl5011xParams, Uint32T context,
                                   Uint32T *count);
zlStatusE zl5011xTfqGetUnderrunCount(zl5011xParamsS *zl5011xParams, Uint32T context,
                                    Uint32T *count);
zlStatusE zl5011xTfqGetStats(zl5011xParamsS *zl5011xParams, Uint32T context,
                            zl5011xTfqStatsS *stats);
zlStatusE zl5011xTfqResetStats(zl5011xParamsS *zl5011xParams, Uint32T context);
zlStatusE zl5011xTfqResetQueue(zl5011xParamsS *zl5011xParams,
      Uint32T context);
zlStatusE zl5011xTfqGetReadPointer(zl5011xParamsS *zl5011xParams,
   Uint32T context, Uint32T *value);

zlStatusE zl5011xTfqGetNextError(zl5011xParamsS *zl5011xParams,
                                Uint32T *context, Uint32T *error);
zlStatusE zl5011xTfqGetError(zl5011xParamsS *zl5011xParams,
                            Uint32T context, Uint32T *error);
zlStatusE zl5011xTfqGetErroredContext(zl5011xParamsS *zl5011xParams,
                                     Uint32T *context);

zlStatusE zl5011xTfqEnableInterrupts(zl5011xParamsS *zl5011xParams,
                                    Uint32T context, Uint32T intMask);
zlStatusE zl5011xTfqDisableInterrupts(zl5011xParamsS *zl5011xParams,
                                     Uint32T context, Uint32T intMask);
zlStatusE zl5011xTfqClearGranuleThresholdIntr(zl5011xParamsS *zl5011xParams);
zlStatusE zl5011xTfqEnableGranuleThresholdIntr(zl5011xParamsS *zl5011xParams,
                                              Uint32T intMask);
zlStatusE zl5011xTfqDisableGranuleThresholdIntr(zl5011xParamsS *zl5011xParams,
                                              Uint32T intMask);

#ifdef __cplusplus
}
#endif

#endif  /* _ZL5011X_TFQ_H */

⌨️ 快捷键说明

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