📄 devlib.h
字号:
typedef bb_Error_e (*IxfGetOpMode_t)(bb_ChipData_t *pChipData,
bb_ChipSegment_t *section,
bb_OperMode_e *opMode,
void *pModeCfg);
typedef bb_Error_e (*IxfSetOpMode_t)(bb_ChipData_t *pChipData,
bb_ChipSegment_t *section,
bb_OperMode_e opMode,
void *pModeCfg);
typedef bb_Error_e (*IxfReset_t)(bb_ChipData_t *pChipData,
bb_ChipSegment_t *section,
bb_SelResetType_e resetType);
typedef bb_Error_e (*IxfInitAlarmCallback_t)(bb_ChipData_t *pChipData,
AlarmCallBack pAlarmCallbackArg);
typedef bb_Error_e (*IxfChipIsr_t)(bb_ChipData_t *pChipData);
typedef bb_Error_e (*IxfCfgTest_t)(bb_ChipData_t *pChipData,
bb_ChipSegment_t *section,
bb_TestType_e testType, void *pTestCfg);
typedef bb_Error_e (*IxfGetCounters_t)(bb_ChipData_t *pChipData,
bb_ChipSegment_t *section,
bb_SelCounters_e SelCounters,
void *pCounters);
typedef bb_Error_e (*IxfGetChipInfo_t)(bb_ChipData_t *pChipData, bb_ChipInfo_t *pChipInfo);
typedef bb_Error_e (*IxfSetChipOnline_t)(bb_ChipData_t *pChipData, bb_ChipSegment_t *section);
typedef bb_Error_e (*IxfSetChipOffline_t)(bb_ChipData_t *pChipData,
bb_ChipSegment_t *section);
typedef bb_Error_e (*IxfSetAlarmCfg_t)(bb_ChipData_t *pChipData, bb_ChipSegment_t *section,
bb_AlarmType_e AlarmType, void *pAlarmCfg);
typedef bb_Error_e (*IxfGetBuildVersion_t) (bb_ChipData_t *pChipData,
char *drvName, char *date,
ushort *buildVer, ushort *buildRev);
typedef bb_Error_e (*IxfRead_t)(bb_ChipData_t *pChipData, bb_Word_Size_t wordSize,
ulong address, ushort length, void *buffer);
typedef bb_Error_e (*IxfWrite_t)(bb_ChipData_t *pChipData, bb_Word_Size_t wordSize,
ulong address, ushort length, void *buffer);
typedef bb_Error_e (*IxfApiGetCfg_t)(bb_ChipData_t *ptChipData,
bb_ChipSegment_t *ptSegment,
bb_SelConfig_e SelCfg);
typedef bb_Error_e (*IxfApiSetCfg_t)(bb_ChipData_t *ptChipData,
bb_ChipSegment_t *ptSegment,
bb_SelConfig_e SelCfg);
/* The types below define the SONET prototypes */
typedef bb_Error_e (*IxfGetWindowSize_t)(bb_ChipData_t *pChipData,
bb_ChipSegment_t *section,
bb_WindowSizeMode_e mode,
ulong *value);
typedef bb_Error_e (*IxfSetWindowSize_t)(bb_ChipData_t *pChipData,
bb_ChipSegment_t *section,
bb_WindowSizeMode_e mode,
ulong value);
typedef bb_Error_e (*IxfSetBERThreshold_t)(bb_ChipData_t *pChipData,
bb_ChipSegment_t *section,
bb_BerThresholdSel_e berThresholdSel,
bb_STSMode_e mode,
short expNum);
typedef bb_Error_e (*IxfGetTrace_t)(bb_ChipData_t *pChipData,
bb_ChipSegment_t *section,
bb_TraceType_e TraceType,
char *pTrace,
ushort *pLength);
typedef bb_Error_e (*IxfSetTrace_t)(bb_ChipData_t *pChipData,
bb_ChipSegment_t *section,
bb_TraceType_e TraceType,
bb_TraceFormat_e TraceFormat,
char *pTrace);
typedef bb_Error_e (*IxfGetOhBytes_t)(bb_ChipData_t *pChipData,
bb_ChipSegment_t *section,
bb_SelOhBytes_e SelOhBytes,
void *pOhBytes);
typedef bb_Error_e (*IxfSetOhByte_t)(bb_ChipData_t *pChipData,
bb_ChipSegment_t *section,
bb_SelOhBytes_e SelOhByte,
ushort OhByte);
typedef bb_Error_e (*IxfMapFrame_t)(bb_ChipData_t *pChipData,
MapFrame_t type,
bb_SignalType_e sigType,
ulong src,
ulong dest,
ulong srcFrameNum,
ulong destFrameNum,
ulong numOfFrames);
typedef bb_Error_e (*IxfGetMappedFrame_t)(bb_ChipData_t *pChipData,
bb_SignalType_e sigType,
ulong src,
ulong destFrameNum,
ulong numOfFrames,
ushort *address);
typedef bb_Error_e (*IxfGetAuPointer_t)(bb_ChipData_t *pChipData,
ulong src,
bb_SignalType_e sigType,
ulong srcFrameNum,
ulong numOfFrames,
ushort *AuPtrValue);
typedef bb_Error_e (*IxfSetRmstSourceBytes_t)(bb_ChipData_t *pChipData,
bb_ChipSegment_t *section);
typedef bb_Error_e (*IxfGetRmstSourceBytes_t)(bb_ChipData_t *pChipData,
bb_ChipSegment_t *section);
/* The types below define the XGMAC prototypes */
typedef bb_Error_e (*IxfGetMacAddress_t)(bb_ChipData_t *pChipData,
bb_ChipSegment_t *section, IxfApi_MacAddress_t *address);
typedef bb_Error_e (*IxfSetMacAddress_t)(bb_ChipData_t *pChipData,
bb_ChipSegment_t *section, IxfApi_MacAddress_t *address);
/* All Common API routines definition */
typedef struct
{
IxfInitChip_t InitChipFuncPtr;
IxfAllocMem_t AllocFuncPtr;
IxfDeAllocMem_t DeAllocFuncPtr;
IxfGetStatus_t GetStatusFuncPtr;
IxfGetOpMode_t GetOpModeFuncPtr;
IxfSetOpMode_t SetOpModeFuncPtr;
IxfReset_t ResetFuncPtr;
IxfInitAlarmCallback_t InitAlarmCallbackFuncPtr;
IxfChipIsr_t ChipIsrFuncPtr;
IxfCfgTest_t CfgTestFuncPtr;
IxfGetCounters_t GetCountersFuncPtr;
IxfGetChipInfo_t ChipInfoFuncPtr;
IxfSetChipOnline_t ChipOnlineFuncPtr;
IxfSetChipOffline_t ChipOfflineFuncPtr;
IxfSetAlarmCfg_t SetAlarmCfgFuncPtr;
IxfGetBuildVersion_t GetBuildVersionFuncPtr;
IxfRead_t ReadFuncPtr;
IxfWrite_t WriteFuncPtr;
IxfApiGetCfg_t GetCfgFuncPtr;
IxfApiSetCfg_t SetCfgFuncPtr;
} CommonFunctionPointers_t;
/* All SONET API routines definition */
typedef struct
{
IxfGetWindowSize_t GetWindowSizeFuncPtr;
IxfSetWindowSize_t SetWindowSizeFuncPtr;
IxfSetBERThreshold_t SetBERThresholdFuncPtr;
IxfGetTrace_t GetTraceFuncPtr;
IxfSetTrace_t SetTraceFuncPtr;
IxfGetOhBytes_t GetOhBytesFuncPtr;
IxfSetOhByte_t SetOhBytesFuncPtr;
IxfSetRmstSourceBytes_t SetRmstSourceFuncPtr;
IxfGetRmstSourceBytes_t GetRmstSourceFuncPtr;
IxfMapFrame_t MapFramesFuncPtr;
IxfGetMappedFrame_t GetMappedFramesFuncPtr;
IxfGetAuPointer_t GetFramesAuPointerFuncPtr;
} SonetFunctionPointers_t;
/* All XGMAC API routines definition */
typedef struct
{
IxfGetMacAddress_t GetMacAddressPtr;
IxfSetMacAddress_t SetMacAddressPtr;
} XgmacFunctionPointers_t;
typedef struct
{
CommonFunctionPointers_t *tCommonFuncPtr;
SonetFunctionPointers_t *tSonetFuncPtr;
XgmacFunctionPointers_t *tXgmacFuncPtr;
} ChipFunctionPointers_t;
#ifdef INCLUDE_6192_LIB
/* Function Pointers for the Ixf6192 Chip */
extern const ChipFunctionPointers_t ixf6192FuncPtrs;
#endif /* INCLUDE_6192_LIB */
#ifdef INCLUDE_6048_LIB
/* Function Pointers for the Ixf6048 Chip */
extern const ChipFunctionPointers_t ixf6048FuncPtrs;
#endif /* INCLUDE_6048_LIB */
#ifdef INCLUDE_18100_LIB
/* Function Pointers for the Ixf18100 Chip */
extern const ChipFunctionPointers_t ixf18100FuncPtrs;
#endif /* INCLUDE_18100_LIB */
#ifdef INCLUDE_16121_LIB
/* Function Pointers for the Ixf16121 Chip */
extern const ChipFunctionPointers_t ixf16121FuncPtrs;
#endif /* INCLUDE_16121_LIB */
#ifdef INCLUDE_GENERIC_LIB
extern const ChipFunctionPointers_t genericFuncPtrs;
#endif
extern const ChipFunctionPointers_t *chipArrayFuncPtrs[];
extern ChipFunctionPointers_t* getChipFuncPtr(bb_ChipType_e chipType);
extern bb_ChipType_e checkChipType(bb_ChipType_e chipType);
#endif /* __DEVLIB_H_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -