?? zl5011xcompiler.h
字號:
/*******************************************************************************
*
* File name: zl5011xCompiler.h
*
* Version: 38
*
* Author: MRC
*
* Date created: 08/02/2002
*
* Copyright 2002, 2003, 2004, 2005, Zarlink Semiconductor Limited.
* All rights reserved.
*
* Module Description:
*
* This file contains all the compiler specific information. It should be
* replaced or modified as necessary in order to incorporate the API to an
* application
* Also contains the ZL5011X_TRACE macros and defines to allow selective logging.
*
* Revision History:
*
* Rev: Date: Author: Comments:
* 1 08/02/2002 MRC Creation
* 2 15/02/2002 MRC Update
* 3 22/02/2002 MRC Update
* 4 28/02/2002 MRC Update
* 5 03/04/2002 MRC Added 64 bit number structure
* 6 16/04/2002 MRC Changed Authur to Author in the header
* 7 30/04/2002 MRC Addded a trace type for the high level INIT fns
* 8 30/04/2002 MRC Addded more trace types.
* 9 28/05/2002 MRC Defined a macro for the newline character(s)
* 10 29/05/2002 LCW Added RTP function ID for trace
* 11 10/06/2002 MRC Added LAN function ID for trace
* 12 26/06/2002 JFE Added Packet function ID for trace
* 13 01/07/2002 PJE Added WAN function ID for trace
* 14 11/07/2002 LCW Added DMA function ID for trace
* 15 18/07/2002 PJE Added ISR function ID for trace
* 16 22/07/2002 MRC Added ifdef around NEWLINE macro
* 17 12/09/2002 MRC Added ZL5011X_TRACE define for MISC funcs
* 18 27/09/2002 JFE Changed ZL5011X_TRACE macro to enable socket reporting
* 19 30/09/2002 JFE Modified ZL5011X_TRACE to include #define for ver reporting
* 20 30/09/2002 JFE Modified ZL5011X_TRACE macro to return ver reporting
* regardless of mask
* 21 02/10/2002 JFE Made reporting change to ZL5011X_TRACE_CONTEXT macro.
* Added function prototype for report function.
* 22 03/10/2002 MRC Added extra trace macros
* 23 31/10/2002 MRC Added variants + minor fixes
* 24 12/11/2002 AOC Added extra trace macro for Ces
* 25 14/11/2002 AOC Changed ZL5011X_CES_FN_ID to ZL5011X_CET_FN_ID
* 26 14/11/2002 AOC Update
* 27 18/11/2002 AOC Added ZL5011X_EVAL_FN_ID for Eval test
* 28 19/11/2002 MRC Removed _DEBUG and ZL5011X_EVAL_FN_ID defines
* 29 13/01/2003 MRC Added Err code fn definition
* 30 15/01/2003 MRC Fixed exclusion ifndef
* 31 03/04/2003 MRC Added trace control for within the ISR routines
* 32 18/07/2003 APL Added TRACE_INIT macro
* 33 18/07/2003 APL Additional TRACE_INIT macro when DEBUG not defined
* 34 18/07/2003 APL Added version history for previous version
* 35 23/07/2003 APL Added conditional around basic types to avoid redefinition
* 36 21/10/2003 AMS Moved define for ZL5011X_BITS_PER_BYTE from Dma.c
* 37 06/01/2004 MRC Update
* 38 03/02/2005 APL Added trace control for timing API functions
*
*******************************************************************************/
#ifndef _ZL5011X_COMPILER_H_
#define _ZL5011X_COMPILER_H_
#ifdef __cplusplus
extern "C" {
#endif
/***************** INCLUDE FILES ******************************************/
/***************** DATA TYPES *********************************************/
#ifndef ZL501XX_BASIC_TYPES_DEFINED
#define ZL501XX_BASIC_TYPES_DEFINED
typedef unsigned long osCallReturn;
typedef unsigned long AddressT;
typedef unsigned char Uint8T;
typedef signed char Sint8T;
typedef unsigned short Uint16T;
typedef signed short Sint16T;
typedef unsigned long Uint32T;
typedef signed long Sint32T;
typedef struct
{
Uint32T hi;
Uint32T lo;
} Uint64S;
#endif
/***************** # DEFINES **********************************************/
/* block function ID's used for trace statements */
#define ZL5011X_ADM_FN_ID (Uint32T)(1 << 0)
#define ZL5011X_CPU_FN_ID (Uint32T)(1 << 1)
#define ZL5011X_CPQ_FN_ID (Uint32T)(1 << 2)
#define ZL5011X_GM_FN_ID (Uint32T)(1 << 3)
#define ZL5011X_MM_FN_ID (Uint32T)(1 << 4)
#define ZL5011X_PAC_FN_ID (Uint32T)(1 << 5)
#define ZL5011X_PKC_FN_ID (Uint32T)(1 << 6)
#define ZL5011X_PKI_FN_ID (Uint32T)(1 << 7)
#define ZL5011X_PKQ_FN_ID (Uint32T)(1 << 8)
#define ZL5011X_PLA_FN_ID (Uint32T)(1 << 9)
#define ZL5011X_PRX_FN_ID (Uint32T)(1 << 10)
#define ZL5011X_PTX_FN_ID (Uint32T)(1 << 11)
#define ZL5011X_TFM_FN_ID (Uint32T)(1 << 12)
#define ZL5011X_TFQ_FN_ID (Uint32T)(1 << 13)
#define ZL5011X_TIF_FN_ID (Uint32T)(1 << 14)
#define ZL5011X_TM_FN_ID (Uint32T)(1 << 15)
#define ZL5011X_RTP_FN_ID (Uint32T)(1 << 16)
/* device access ID's used for trace statements */
#define ZL5011X_READ (Uint32T)(1 << 17)
#define ZL5011X_WRITE (Uint32T)(1 << 18)
/* high level API function ID's used for trace statements */
#define ZL5011X_INIT_FN_ID (Uint32T)(1 << 19)
#define ZL5011X_TDM_FN_ID (Uint32T)(1 << 20)
#define ZL5011X_LAN_FN_ID (Uint32T)(1 << 21)
#define ZL5011X_DMA_FN_ID (Uint32T)(1 << 22)
#define ZL5011X_ISR_FN_ID (Uint32T)(1 << 23)
#define ZL5011X_MISC_FN_ID (Uint32T)(1 << 24)
#define ZL5011X_PACKET_FN_ID (Uint32T)(1 << 25)
#define ZL5011X_CET_FN_ID (Uint32T)(1 << 26)
#define ZL5011X_ERR_FN_ID (Uint32T)(1 << 27)
#define ZL5011X_TIMING_FN_ID (Uint32T)(1 << 28)
#define ZL5011X_BITS_PER_BYTE 8
/* define a string to be used for the newline character. This allows the
newline to support carriage return - linefeed combinations etc. */
#ifndef ZL5011X_NEWLINE
#define ZL5011X_NEWLINE "\r\n"
#endif
#ifndef _DEBUG
#define _DEBUG
#endif
#ifdef _DEBUG
extern Uint32T zl5011xTraceFnFilter;
extern Uint32T zl5011xTraceCtxtFnFilter;
extern Uint32T zl5011xTraceCtxtFilter;
extern Uint32T zl5011xTraceIsrEnable;
#define ZL5011X_TRACE_INIT(x) OS_LOG_INIT(x)
#define ZL5011X_TRACE_ON zl5011xTraceFnFilter = 0xffffffff; zl5011xTraceCtxtFnFilter = 0xffffffff; zl5011xTraceCtxtFilter = 0xffffffff
#define ZL5011X_TRACE_OFF zl5011xTraceFnFilter = 0; zl5011xTraceCtxtFnFilter = 0; zl5011xTraceCtxtFilter = 0
#define ZL5011X_TRACE_ERROR zl5011xTraceFnFilter = ZL5011X_ERR_FN_ID; zl5011xTraceCtxtFnFilter = ZL5011X_ERR_FN_ID; zl5011xTraceCtxtFilter = ZL5011X_ERR_FN_ID
#define ZL5011X_TRACE_SET(x) zl5011xTraceFnFilter = x; zl5011xTraceCtxtFnFilter = x; zl5011xTraceCtxtFilter = 0xffffffff
#define ZL5011X_TRACE_ADD(x) zl5011xTraceFnFilter |= x; zl5011xTraceCtxtFnFilter |= x
#define ZL5011X_TRACE_REMOVE(x) zl5011xTraceFnFilter &= ~(x); zl5011xTraceCtxtFnFilter &= ~(x)
#ifdef _FUNCTION_REPORT
void zl5011xSendFunctionReport(Uint8T * message);
#define ZL5011X_TRACE(fnId, string, a, b, c, d, e, f) \
if ((fnId & zl5011xTraceFnFilter) > 0) \
{ \
OS_LOG_MSG(string ZL5011X_NEWLINE, a, b, c, d, e, f); \
} \
if ((fnId != ZL5011X_READ) && (fnId != ZL5011X_WRITE)) \
{ \
zl5011xSendFunctionReport((Uint8T *)string); \
}
#else
#define ZL5011X_TRACE(fnId, string, a, b, c, d, e, f) \
if ((fnId & zl5011xTraceFnFilter) > 0) \
{ \
OS_LOG_MSG(string ZL5011X_NEWLINE, a, b, c, d, e, f); \
}
#endif
#ifdef _FUNCTION_REPORT
#define ZL5011X_TRACE_CONTEXT(fnId, ctxtId, string, a, b, c, d, e, f) \
if (((fnId & zl5011xTraceCtxtFnFilter) > 0) && \
((zl5011xTraceCtxtFilter == 0xffffffff) || (zl5011xTraceCtxtFilter == ctxtId))) \
{ \
OS_LOG_MSG(string ZL5011X_NEWLINE, a, b, c, d, e, f); \
} \
if ((fnId != ZL5011X_READ) && (fnId != ZL5011X_WRITE)) \
{ \
zl5011xSendFunctionReport((Uint8T *)string); \
}
#else
#define ZL5011X_TRACE_CONTEXT(fnId, ctxtId, string, a, b, c, d, e, f) \
((fnId & zl5011xTraceCtxtFnFilter) && \
((zl5011xTraceCtxtFilter == 0xffffffff) || (zl5011xTraceCtxtFilter == ctxtId))) ? \
OS_LOG_MSG(string ZL5011X_NEWLINE, a, b, c, d, e, f) : (Uint32T)NULL
#endif
#else
#define ZL5011X_TRACE_INIT(x)
#define ZL5011X_TRACE_ON
#define ZL5011X_TRACE_OFF
#define ZL5011X_TRACE_ERROR
#define ZL5011X_TRACE_SET(x)
#define ZL5011X_TRACE_ADD(x)
#define ZL5011X_TRACE_REMOVE(x)
#define ZL5011X_TRACE(fnId, string, a, b, c, d, e, f)
#define ZL5011X_TRACE_CONTEXT(fnId, ctxtId, string, a, b, c, d, e, f)
#endif
/***************** DATA STRUCTURES ****************************************/
/***************** EXPORTED GLOBAL VARIABLE DECLARATIONS ******************/
/***************** EXTERNAL FUNCTION DECLARATIONS *************************/
#ifdef __cplusplus
}
#endif
#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -