📄 dp_cfg.h
字号:
#define INIT_VPC3_IND_H 0xFC
/*---------------------------------------------------------------------------*/
/* end of user defines */
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
/* !!!!! do not edit this calculating part !!!!! */
/*---------------------------------------------------------------------------*/
// == Segmentation VPC3+ ===============================================================
#ifdef DP_VPC3_4KB_MODE
// 16 Byte segmentation
#define SEG_OFFSET ((UBYTE)0x0F)
#define SEG_MULDIV ((UBYTE)0x04)
#define SEG_ADDBYTE ((UWORD)0xFFF0)
#define SEG_ADDWORD ((UWORD)0xFFF0)
#else
// 8 Byte segmentation
#define SEG_OFFSET ((UBYTE)0x07)
#define SEG_MULDIV ((UBYTE)0x03)
#define SEG_ADDBYTE ((UWORD)0xF8)
#define SEG_ADDWORD ((UWORD)0xFFF8)
#endif
// == DPV1/DPV2 ========================================================================
#define DP_C1_USE_RD_WR_SAP 0x01
#define DP_C1_USE_ALARM_SAP 0x04
// == MSAC1 ============================================================================
#ifdef DP_ALARM
#define DP_MSAC_C1
#endif
#ifdef DP_MSAC_C1
#define DP_C1_LEN C1_LEN
// == Alarm ========================================================================
#ifdef DP_ALARM
#ifdef DP_ALARM_OVER_SAP50
#define DP_C1_SAPS ( DP_C1_USE_RD_WR_SAP | DP_C1_USE_ALARM_SAP )
#else
#define DP_C1_SAPS ( DP_C1_USE_RD_WR_SAP )
#endif
#else
#define DP_C1_SAPS ( DP_C1_USE_RD_WR_SAP )
#endif
#else
#define DP_C1_SAPS 0x00
#define DP_C1_LEN ((UBYTE)0x00)
#undef DP_ALARM
#endif
// == MSAC2 ============================================================================
#ifdef DP_MSAC_C2
#define DP_C2_NUM_SAPS C2_NUM_SAPS
#define DP_C2_LEN C2_LEN
#else
#define DP_C2_NUM_SAPS ((UBYTE)0x00)
#define DP_C2_LEN ((UBYTE)0x00)
#endif
// == Subscriber =======================================================================
#ifdef DP_SUBSCRIBER
#define DP_MAX_LINK_SUPPORTED MAX_LINK_SUPPORTED
#define DP_MAX_DATA_PER_LINK MAX_DATA_PER_LINK
#else
#define DP_MAX_LINK_SUPPORTED 0
#define DP_MAX_DATA_PER_LINK 0
#endif
// == Calculating FDL list =============================================================
#if ( (defined DP_MSAC_C1) || (defined DP_MSAC_C2) )
#define DP_FDL
#endif
#if (DP_C1_SAPS & DP_C1_USE_RD_WR_SAP)
#define DP_TEMP_X1 1
#else
#define DP_TEMP_X1 0
#endif
#if (DP_C1_SAPS & DP_C1_USE_ALARM_SAP )
#define DP_TEMP_X2 1
#define SAP_50
#else
#define DP_TEMP_X2 0
#endif
#ifdef DP_MSAC_C1
#define DP_TEMP_X (DP_TEMP_X1 + DP_TEMP_X2)
#else
#define DP_TEMP_X 0
#endif
#ifdef DP_MSAC_C2
#define DP_MAX_SAPS (DP_TEMP_X + DP_C2_NUM_SAPS + 1 )
#else
#define DP_MAX_SAPS DP_TEMP_X
#endif
#define DP_ORG_LENGTH 0x40 // organizational parameter
#if (defined (DP_FDL))
#define FDL_SAP_MAX DP_MAX_SAPS
/* length of vpc3-sap-list */
#define SAP_LENGTH (((FDL_SAP_MAX*7)+SEG_OFFSET) & SEG_ADDBYTE)
#else
#define SAP_LENGTH 0x10
#endif
#ifdef DP_VPC3_4KB_MODE
#define ASIC_RAM_LENGTH 0x1000
#define ASIC_USER_RAM (ASIC_RAM_LENGTH - DP_ORG_LENGTH - SAP_LENGTH)
#else
#define ASIC_RAM_LENGTH 0x800
#define ASIC_USER_RAM (ASIC_RAM_LENGTH - DP_ORG_LENGTH - SAP_LENGTH)
#endif
#define ISR_ENABLE_VPC3_INT_MAC_RESET 0
#define ISR_ENABLE_VPC3_INT_GO_LEAVE_DATA_EX 0
#define ISR_ENABLE_VPC3_INT_BAUDRATE_DETECT 0
#define ISR_ENABLE_VPC3_INT_WD_DP_TIMEOUT 0
#define ISR_ENABLE_VPC3_INT_USER_TIMER_CLOCK 0
#define ISR_ENABLE_VPC3_INT_DXB_LINK_ERROR 0
#define ISR_ENABLE_VPC3_INT_NEW_EXT_PRM_DATA 0
#define ISR_ENABLE_VPC3_INT_DXB_OUT 0
#define ISR_ENABLE_VPC3_INT_NEW_GC_COMMAND 0
#define ISR_ENABLE_VPC3_INT_NEW_SSA_DATA 0
#define ISR_ENABLE_VPC3_INT_NEW_CFG_DATA 0
#define ISR_ENABLE_VPC3_INT_NEW_PRM_DATA 0
#define ISR_ENABLE_VPC3_INT_DIAG_BUF_CHANGED 0
#define ISR_ENABLE_VPC3_INT_DX_OUT 0
#define ISR_ENABLE_VPC3_INT_RESERVED 0
#define ISR_ENABLE_VPC3_INT_SERVICE_ERROR 0
#if( INIT_VPC3_IND_L & 0x01 )
#undef ISR_ENABLE_VPC3_INT_MAC_RESET
#define ISR_ENABLE_VPC3_INT_MAC_RESET 1
#endif
#if( INIT_VPC3_IND_L & 0x02 )
#undef ISR_ENABLE_VPC3_INT_GO_LEAVE_DATA_EX
#define ISR_ENABLE_VPC3_INT_GO_LEAVE_DATA_EX 1
#endif
#if( INIT_VPC3_IND_L & 0x04 )
#undef ISR_ENABLE_VPC3_INT_BAUDRATE_DETECT
#define ISR_ENABLE_VPC3_INT_BAUDRATE_DETECT 1
#endif
#if( INIT_VPC3_IND_L & 0x08 )
#undef ISR_ENABLE_VPC3_INT_WD_DP_TIMEOUT
#define ISR_ENABLE_VPC3_INT_WD_DP_TIMEOUT 1
#endif
#if( INIT_VPC3_IND_L & 0x10 )
#undef ISR_ENABLE_VPC3_INT_USER_TIMER_CLOCK
#define ISR_ENABLE_VPC3_INT_USER_TIMER_CLOCK 1
#endif
#if( INIT_VPC3_IND_L & 0x20 )
#undef ISR_ENABLE_VPC3_INT_DXB_LINK_ERROR
#define ISR_ENABLE_VPC3_INT_DXB_LINK_ERROR 1
#endif
#if( INIT_VPC3_IND_L & 0x40 )
#undef ISR_ENABLE_VPC3_INT_NEW_EXT_PRM_DATA
#define ISR_ENABLE_VPC3_INT_NEW_EXT_PRM_DATA 1
#endif
#if( INIT_VPC3_IND_L & 0x80 )
#undef ISR_ENABLE_VPC3_INT_DXB_OUT
#define ISR_ENABLE_VPC3_INT_DXB_OUT 1
#endif
#if( INIT_VPC3_IND_H & 0x01 )
#undef ISR_ENABLE_VPC3_INT_NEW_GC_COMMAND
#define ISR_ENABLE_VPC3_INT_NEW_GC_COMMAND 1
#endif
#if( INIT_VPC3_IND_H & 0x02 )
#undef ISR_ENABLE_VPC3_INT_NEW_SSA_DATA
#define ISR_ENABLE_VPC3_INT_NEW_SSA_DATA 1
#endif
#if( INIT_VPC3_IND_H & 0x04 )
#undef ISR_ENABLE_VPC3_INT_NEW_CFG_DATA
#define ISR_ENABLE_VPC3_INT_NEW_CFG_DATA 1
#endif
#if( INIT_VPC3_IND_H & 0x08 )
#undef ISR_ENABLE_VPC3_INT_NEW_PRM_DATA
#define ISR_ENABLE_VPC3_INT_NEW_PRM_DATA 1
#endif
#if( INIT_VPC3_IND_H & 0x10 )
#undef ISR_ENABLE_VPC3_INT_DIAG_BUF_CHANGED
#define ISR_ENABLE_VPC3_INT_DIAG_BUF_CHANGED 1
#endif
#if( INIT_VPC3_IND_H & 0x20 )
#undef ISR_ENABLE_VPC3_INT_DX_OUT
#define ISR_ENABLE_VPC3_INT_DX_OUT 1
#endif
#if( INIT_VPC3_IND_H & 0x40 )
#undef ISR_ENABLE_VPC3_INT_POLL_END_IND
#define ISR_ENABLE_VPC3_INT_POLL_END_IND 1
#endif
#if( INIT_VPC3_IND_H & 0x80 )
#undef ISR_ENABLE_VPC3_INT_FDL_IND
#define ISR_ENABLE_VPC3_INT_FDL_IND 1
#endif
/*****************************************************************************/
/* reinclude-protection */
#else
#pragma message "The header DP_CFG.H is included twice or more !"
#endif
/*****************************************************************************/
/* Copyright (C) profichip GmbH 2004. Confidential. */
/*****************************************************************************/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -