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

📄 zl5011xinit.h

📁 Zalink50114----TDMoIP芯片驱动源码
💻 H
字号:
/*******************************************************************************
*
*  File name:              zl5011xInit.h
*
*  Version:                30
*
*  Author:                 MRC
*
*  Date created:           01/05/2002
*
*  Copyright 2002, 2003, 2004, 2005, Zarlink Semiconductor Limited.
*  All rights reserved.
*
*  Module Description:
*
*  This is the header file for the device initialisation functions.
*
*  Revision History:
*
*  Rev:  Date:       Author:  Comments:
*  1     30/04/2002  MRC      Creation
*  2     02/05/2002  MRC      Update
*  3     07/05/2002  MRC      Changed enum to use uppercase
*                             P(acketTxHeaderModeE).
*  4     09/05/2002  MRC      Added VerInit structure init fn
*  5     21/05/2002  MRC      Increased the block timeout, to speed the
*                             simulation up.
*  6     28/05/2002  MRC      Mods following seminar
*  7     14/06/2002  MRC      Brought more options out to the verInit fn
*  8     19/06/2002  MRC      PTX block changed
*  9     09/07/2002  MRC      Added LIU frequency to Wan init structure
*  10    09/07/2002  MRC      Added packet queue granules to Lan init structure
*  11    18/07/2002  MRC      Updated memory configure fn
*  12    01/08/2002  MRC      Added setting for the rtp stats interrupt period
*  13    14/08/2002  MRC      Added harness initialisation config bits
*  14    09/09/2002  MRC      Tidied up ready for review
*  15    10/09/2002  MRC      Updated following review
*  16    19/09/2002  MRC      Added Wan Tx max granule usage to WanInit
*  17    20/09/2002  MRC      Removed prototypes for fn's moved to Misc file
*  18    23/09/2002  MRC      Added SysInit function
*  19    29/10/2002  MRC      Added osExclusion parameter
*  20    31/10/2002  MRC      Added variants + minor fixes
*  21    19/11/2002  MRC      ZL5011X_BLOCK_INIT_TIMEOUT_MS now checks for it
*                             being previously declared
*  22    26/11/2002  MRC      Added extra granule control
*  23    29/01/2003  MRC      Added control for external memory parity
*  24    18/02/2003  MRC      Tidied up SysInit structure
*  25    26/02/2003  MRC      Added packet loopback function
*  26    05/06/2003  MRC      Fixed packet loopback function
*  27    04/08/2003  APL      Removed unused variable for some device variants
*  28    19/08/2004  MRC      Added user defined LIU frequency setting
*  29    06/09/2004  APL      Added device type to SysInit parameters
*  30    03/02/2005  APL      Renamed device ID's to allow new family members
*
*******************************************************************************/

#ifndef _ZL5011X_INIT_H
#define _ZL5011X_INIT_H

#ifdef __cplusplus
extern "C" {
#endif

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

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

#ifndef ZL5011X_BLOCK_INIT_TIMEOUT_MS
   #define ZL5011X_BLOCK_INIT_TIMEOUT_MS    50
#endif

#define ZL5011X_BLOCK_INIT_RETRY         100
#define ZL5011X_MEMORY_GRANULARITY_MASK  ((Uint32T)0x7FFF)

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

/*****************   DATA STRUCTURES and FUNCTION DECLARATIONS   **************/

typedef struct
{
   zlDeviceTypeE deviceType;
   Uint32T systemClockFreq;
   zl5011xBooleanE osExclusionEnable;
} zl5011xInitS;

zlStatusE zl5011xInitStructInit(zl5011xParamsS *zl5011xParams, zl5011xInitS *par);
zlStatusE zl5011xInit(zl5011xParamsS *zl5011xParams, zl5011xInitS *par);

/********************************/

typedef struct
{
   zl5011xExtMemChipSizeE extMemChipSize;
   zl5011xExtMemParityE extMemParity;

   /* how many granules to initialise */
   Uint32T numberGranules;

   /* the following value determines how much memory is required for all of
      the TDM queues. */
   Uint32T maxWanQueueSizeInkBytes;
   zl5011xBooleanE osExclusionEnable;
} zl5011xConfigureMemoryS;

zlStatusE zl5011xConfigureMemoryStructInit(zl5011xParamsS *zl5011xParams, zl5011xConfigureMemoryS *par);
zlStatusE zl5011xConfigureMemory(zl5011xParamsS *zl5011xParams, zl5011xConfigureMemoryS *mem);

/********************************/

typedef struct
{
   zl5011xWanIfTypeE ifType;
   zl5011xWanLiuFreqE liuFreq;

   /* if the liuFreq enum is specified as ZL5011X_WAN_LIU_FREQ_OTHER, then
      the frequency in Hz is set using the following variable */
   Uint32T liuFreqHz;

   Uint32T txQueueMaxNumberOfGranules;
   zl5011xBooleanE osExclusionEnable;
} zl5011xWanInitS;

zlStatusE zl5011xWanInitStructInit(zl5011xParamsS *zl5011xParams, zl5011xWanInitS *par);
zlStatusE zl5011xWanInit (zl5011xParamsS *zl5011xParams, zl5011xWanInitS *par);

/********************************/

typedef enum
{
   ZL5011X_LOOPBACK_ETHERNET,
   ZL5011X_LOOPBACK_IP_UDP,
   ZL5011X_LOOPBACK_MPLS
} zl5011xPacketLoopbackProtocolTypeE;

typedef struct
{
   zl5011xPacketLoopbackProtocolTypeE protocolType;

   /* packet header setup information */
   Uint8T portNum;
   Uint8T queueNum;
   Uint8T *header;
   zl5011xBooleanE enableVlan;
   zl5011xBooleanE ethernetSrcAddressFromMac;
} zl5011xPacketLoopbackConfigS;

typedef struct
{
   Uint32T maxPacketQueueGranules;

   /* the following variable is used to set the interrupt period for the RTP
      statistics function. The setting is the minimum time between interrupts
      in milli-seconds */
   Uint32T rtpInterruptPeriodMs;

   /* the following variables control whether unmatched packets in the Packet
      Rx should be retransmitted on the Packet Tx */
   zl5011xBooleanE unmatchedProtocolLoopback;
   zl5011xPacketLoopbackConfigS packetLoopbackConfig;

   zl5011xBooleanE osExclusionEnable;
} zl5011xLanInitS;

zlStatusE zl5011xLanInitStructInit(zl5011xParamsS *zl5011xParams, zl5011xLanInitS *par);
zlStatusE zl5011xLanInit(zl5011xParamsS *zl5011xParams, zl5011xLanInitS *par);

/********************************/

typedef struct
{
   zl5011xBooleanE osExclusionEnable;
} zl5011xRunS;

zlStatusE zl5011xRunStructInit(zl5011xParamsS *zl5011xParams, zl5011xRunS *par);
zlStatusE zl5011xRun(zl5011xParamsS *zl5011xParams, zl5011xRunS *par);

/********************************/

typedef struct
{
   zl5011xInitS init;
   zl5011xWanInitS wanInit;
   zl5011xConfigureMemoryS configureMemory;
   zl5011xLanInitS lanInit;
   zl5011xRunS run;
   zl5011xBooleanE osExclusionEnable;
} zl5011xSysInitS;

zlStatusE zl5011xSysInitStructInit(zl5011xParamsS *zl5011xParams, zl5011xSysInitS *par);
zlStatusE zl5011xSysInit(zl5011xParamsS *zl5011xParams, zl5011xSysInitS *par);

/********************************/

typedef struct
{
   zl5011xBooleanE enable;
   zl5011xBooleanE osExclusionEnable;
} zl5011xLanLoopbackConfigS;

zlStatusE zl5011xLanLoopbackConfigStructInit(zl5011xParamsS *zl5011xParams,
      zl5011xLanLoopbackConfigS *par);
zlStatusE zl5011xLanLoopbackConfig(zl5011xParamsS *zl5011xParams,
      zl5011xLanLoopbackConfigS *par);

#ifdef __cplusplus
}
#endif

#endif

⌨️ 快捷键说明

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