📄 ab_env.h
字号:
/****************************************************************************
*****************************************************************************
**
** File Name
** ---------
**
** AB_ENV.H
**
*****************************************************************************
*****************************************************************************
**
** Description
** -----------
**
** Basic Services API - Environment Definition
**
** This source file contains the definitions that describe the
** major characteristics of the environment for a particular build
** of the EtherNetNet Example Code. These coarse switches as well as
** the fine tuning switches are documented in the mate to
** this file, AB_CFG.H.
**
** The "fine tuning" switches are selected in the file AB_CFG.H
**
*****************************************************************************
*****************************************************************************
**
** Source Change Indices
** ---------------------
**
** Porting: <none>----4<major> Customization: <none>0----<major>
**
** * Need adjustments to most environment specifications contained in
** this source file.
**
** * The application developer should not need to add new items to the
** list defined in this file.
**
*****************************************************************************
*****************************************************************************
** **
** ETHERNET/IP EXAMPLE CODE **
** COPYRIGHT (c) 2000-2005 ODVA (Open DeviceNet Vendor Association) **
** & ControlNet International Ltd. **
** **
** All rights reserved, except as specifically licensed in writing. **
** Use of the Ethernet/IP Example Protocol Software is subject to **
** ODVA's and ControlNet International's Terms of Use Agreement. **
** The following work constitutes example program code and is intended **
** merely to illustrate useful programming techniques. The user is **
** responsible for applying the code correctly. The code is provided **
** AS IS without warranty and is in no way guaranteed to be error-free. **
** **
*****************************************************************************
*****************************************************************************
*/
/****************************************************************************
*****************************************************************************
**
** Change Log
** ----------
**
**
*****************************************************************************
*****************************************************************************
*/
#ifndef AB_ENV_H
#define AB_ENV_H
/****************************************************************************
**
** Coarse tuning environment definitions.
**
*****************************************************************************
**
**---------------------------------------------------------------------------
** General class of services
** This selection is generally made via a setting in the project or make
** file rather than in the ab_env.h file. If it is inconvenient to make this
** selection in the project or make file, make it in the ab_env.h file.
**---------------------------------------------------------------------------
**
**
**
**
**---------------------------------------------------------------------------
** Platform
**---------------------------------------------------------------------------
**
** #define PC /* Running on a PC (DOS) *//*
** #define EMBEDDED /* Embedded processor on custom hardware *//*
**
**
**
**---------------------------------------------------------------------------
** PC interface card type
**---------------------------------------------------------------------------
**
** #define CNA10_ISA_CARD /* CNA10 ISA card (large or small) *//*
** #define KTCT_CARD_SMAC /* KTCT card in direct access mode *//*
** #define KTCT_CARD_FW /* KTCT card in native 186 FW mode *//*
**
**
**
**---------------------------------------------------------------------------
** Processor
**---------------------------------------------------------------------------
**
** #define INTEL80x86 /* Intel 8086 series processor *//*
** #define MOT68K /* Motorola 68000 series processor *//*
** #define HITACHI_H8_300 /* Hitachi H8/300 series microController *//*
**
**
**
**---------------------------------------------------------------------------
** Independent of the processor, how to handle memory issues
**---------------------------------------------------------------------------
**
** #define WORD_ALIGN_WORD_DATA /* For low end 68k processors this ensures *//*
** /* data alignment to avoid bus faults *//*
**
** #define SEGMENTED_ADDRESS /* Intel x86 segment:offset addressing *//*
** #define LINEAR_ADDRESS /* 32 bit linear addressing *//*
**
**
**
**---------------------------------------------------------------------------
** Compiler
**---------------------------------------------------------------------------
**
** #define BORLANDC /* Borland C compiler (80x86) *//*
** #define MICROSOFTC /* Microsoft Visual C++ compiler *//*
** #define MICROTEK68K /* Microtek 68000 C compiler *//*
** #define MICROTEKH8300 /* Microtek H8/300 Series C compiler *//*
** #define MICROTEK960 /* Microtek i960 C compiler *//*
**
**
**
**---------------------------------------------------------------------------
** OS Type (indicate whether you are using the example OS)
**---------------------------------------------------------------------------
**
**
**
**
**---------------------------------------------------------------------------
** OS Preepmtion Mode (even if running a commercial OS)
**---------------------------------------------------------------------------
**
** #define PREEMPTIVE /* Operating System is preemptive *//*
** #define NON_PREEMPTIVE /* Operating System is non-preeptive *//*
**
**
**
**
**
**
**---------------------------------------------------------------------------
** Device Profile
**---------------------------------------------------------------------------
**
** #define VENDOR 0x0001 /* Define Vendor ID *//*
** #define PRODUCT_TYPE 0x000C /* Define Product Type *//*
** #define MAJOR_REVISION 0x81 /* Define Major Revision *//*
** #define MINOR_REVISION 0x01 /* Define Minor Revision *//*
** #define PRODUCT_CODE 0x0023 /* Define Product Code *//*
** #define PRODUCT_NAME "CNA30 Rack" /* Define Product Name String *//*
**
**
**
**---------------------------------------------------------------------------
** Supported Objects/Sub-objects (General and DOS application specific)
**---------------------------------------------------------------------------
**
** #define CD_EN_OBJECTS /* Include Comm Device and EtherNet Objs *//*
** #define DEBUG_OBJECT /* Include the Debug Object *//*
** #define CORE_OBJECTS /* Include Router, UCMM, Identity Objects *//*
** #define UCMM_CLIENT /* Include UCMM client support *//*
** #define ASSEMBLY_OBJECT /* Include the Assembly Object *//*
** #define PCCC_OBJECT /* Include the PCCC Object *//*
** #define NV_STORAGE_UTIL /* Include the Non-Volatile Storage Utility*//*
** #define NVS_OBJECT /* Include the Non-Volatile Storage Object *//*
**
** #define STATUS_STRINGS /* Include status code text strings *//*
**
** /* The following are only available in *//*
** /* the CNA40 version of the example code *//*
**
**
**
**
**---------------------------------------------------------------------------
** Heap Base Address and Total Size
**---------------------------------------------------------------------------
**
** #define GS_HEAP_BASE 0x00040000L /* Set to the proper starting address *//*
**
** /* NOTE: For INTEL80x86, the addr *//*
** /* is in the form seg:offset where *//*
** /* each is 16 bits. For example, *//*
** /* the physical address 0x000A0000 *//*
** /* would be 0xA0000000. *//*
**
** #define GS_TOTAL_HEAP_SIZE 28*1024L /* Heap Size (static + dynamic) *//*
**
**
**
**---------------------------------------------------------------------------
** Stack Allocation Base Block (all stacks sizes are a multiple of this)
**---------------------------------------------------------------------------
**
** #define STACK_BLOCK 0x40 /* stacks allocated in 64 byte chunks *//*
**
**
**
**---------------------------------------------------------------------------
** GS Timebase in Milliseconds
**---------------------------------------------------------------------------
**
** #define GS_TICKPERIOD 10 /* NOTE: It is NOT recommended to *//*
** /* set the tick period to less *//*
** /* than 10 msec in nonpreemptive *//*
** /* environments. *//*
**
**
**
**
**
**
**---------------------------------------------------------------------------
** Multitasking kernel reschedule software interrupt vector selection.
** Default PC interrupt has been selected to minimize conflicts.
** Default Motorola is the TRAP 0 instruction vector.
**---------------------------------------------------------------------------
**
** #define OS_INT_VECTOR_RESCHEDULE 0x78 /* PC *//*
** #define OS_INT_VECTOR_RESCHEDULE 0x1e /* Motorola *//*
**
**
**
**---------------------------------------------------------------------------
** Miscellaneous ControlNet ASIC settings.
** MAC ID (0 = application must issue request to config task to set MAC ID).
** Initial redundancy setting (MUST be the best the hardware can provide).
** Auto tune setting determines whether scheduled transmission timer is
** static or dynamic.
**---------------------------------------------------------------------------
**
**
** #define CD_MAC_ID 0
** #define CD_REDUNDANCY_BOTH
** #define CD_REDUNDANCY_A_ONLY
** #define CD_REDUNDANCY_NAP_ONLY
** #define CD_PHYSICAL_BUILD_SCH_TX_TIMER
** #define CD_AUTO_TUNE
**
**
**
*****************************************************************************
*/
/*
** Define essential environment.
**
** General level of services (This is defined in the project file)
** Platform
** Interface card (if any)
** Processor
** Word alignment requirements inside combufs
** Addressing mode
** Compiler
** OS used
** OS rescheduling method
** ControlNet ASIC
** How to get our mac address.
*/
#define INTEL80x86
#define LINEAR_ADDRESS
#define MICROSOFTC
/*
** Specify objects/sub-objects to be included.
*/
#define CD_EN_OBJECTS /* EtherNet transport */
#define DEBUG_OBJECT
#define CORE_OBJECTS /* ROUTER, UCMM, ID, CM */
#define UCMM_CLIENT /* UCMM Client support */
#define BUFFER_FRAGMENT_MAPPER
#define ASSEMBLY_OBJECT
/*#define PCCC_OBJECT*/
/*#define NV_STORAGE_UTIL*/
/*#define NVS_OBJECT*/
/* ! ConformanceTestProblem */
#define ETHERNET_LINK_OBJECT
#define TCPIP_INTERFACE_OBJECT
#ifdef DEBUG
#define STATUS_STRINGS
#endif
/*
** Heap size, stack block size.
*/
#include "ab_cfg.h"
#define STACK_BLOCK 256 /* 0x40 */
/*
** GS timer tick source & speed (in ms).
*/
#define GS_TICKPERIOD 1
#define MSEC2TICKS(msecs) (msecs)
#endif /* inclusion lock */
/****************************************************************************
**
** End of AB_ENV.H
**
*****************************************************************************
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -