📄 cei22032.h
字号:
/*===========================================================================*
* FILE: C E I 2 2 0 3 2 . H
*===========================================================================*
*
* COPYRIGHT (C) 1998 - 2006 BY
* CONDOR ENGINEERING, INC., SANTA BARBARA, CALIFORNIA
* ALL RIGHTS RESERVED.
*
* THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND
* COPIED ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH
* THE INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY
* OTHER COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE
* AVAILABLE TO ANY OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE
* SOFTWARE IS HEREBY TRANSFERRED.
*
* THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT
* NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY CONDOR
* ENGINEERING.
*
*===========================================================================*
*
* FUNCTION:
*
* Equates used by ARINC utilities and user applications that call them.
*
* DESCRIPTION:
*
* General ARINC globals and function prototypes are declared herein.
* This file defines the interface between user applications and the
* following Condor devices:
*
* CEI-100/200
* CEI-220/420/520/620/820/820TX
* VME/VXI-AIC
* IP-Avionics installed on a CEI-300/500/600
* CEI-700
*
* Since this file is shared between many product lines, caution should
* be exercised when performing modifications.
*
* HISTORY:
*
* Date By Vers Comments
* -------- ---- ---- -----------------------------------------------------
* 05/11/96 rt 1 Made WIN32 compatible.
* 03/11/97 rt 2 Made all functions stdcall types.
* 03/28/97 sli 3 Added code for cplusplus name mangling
* 09/01/97 dz 4 Enforced CEI formatting/readability standards. Added
* missing prototypes for AR_FORCE_VERSION,
* AR_FORMATARINCLABEL, AR_FORMATBINARYLABEL,
* AR_GET_LABEL_FILTER, AR_GET_RAW_MODE, and
* AR_UNFORMAT. Reorganized prototypes -- now grouped by
* API (those functions that appear in the CEI-100/200
* User's Manual) and utility (all others). Functions
* are organized lexicographically within these two
* groups.
* 10/27/97 dz 5 Last modification changed label types in calls to
* AR_GET_LATEST, AR_LABEL_FILTER and
* AR_GET_LABEL_FILTER to unsigned char. This was
* incompatible with the constant ARU_ALL_LABELS (0x1FF)
* and was thus changed to unsigned short.
* 02/04/98 sli 6 Added support for the CEI-220.
* 02/04/98 ajh 7 Changed calling sequences to support CEI-220.
* 02/10/98 sli 8 Added more support for the CEI-220.
* 02/21/98 ajh 9 Added parametric support for the CEI-220.
* 02/27/98 ajh 10 Added transmitter shutdown & comments for CEI-220.
* 04/14/98 ajh 11 Final changes for CEI-220 (CEI-x20 v1.10).
* 08/13/98 ajh 12 Added support for the CEI-420 board (CEI-x20 v1.30).
* 12/09/98 sli 13 Added support for the PA-100.
* 12/12/98 sli 14 Change AR_GETWORDT to resolve linking problem.
* 12/16/98 ajh 15 Added ability to select scheduled or burst mode on a
* per-channel basis for CEI-220/420 (CEI-x20 v2.20).
* 01/12/99 sli 16 Fixed interface.dll problem.
* 01/25/99 bw 17 Added IP429HD to the interface.
* 02/18/99 bw 18 Added CEI-710 to the interface.
* 03/17/99 ajh 19 Added support for the CEI-520 (CEI-x20 v2.22).
* 04/07/99 ajh 20 Completed support for the CEI-520 (CEI-x20 v2.31).
* 04/15/99 ajh 21 Merged versions back together (CEI-x20 v2.33).
* 08/27/99 dz 22 Merged ajh version with BusTools/ARINC and CEI-LV
* versions.
* 12/03/99 ajh 23 Merged versions together (CEI-x20 v3.00).
* 04/29/00 ajh 24 Added definitions for new CEI-520/620 interface
* definitions (CEI-x20 v3.02).
* 05/24/00 ajh 25 Removed hardware definitions (CEI-x20 v3.04).
* 07/16/00 ajh 26 Updated to support CEI-x20 CSDB channels (CEI-x20
* v3.06).
* 06/08/01 ajh 27 Corrected the definition of the labels
* ARU_CH13_DISABLE_TIMETAG - ARU_CH16_DISABLE_TIMETAG
* (CEI-x20 v3.26).
* 09/27/01 skb 28 Expanded explanation of the 'BaudRate' member in the
* AR_CHANNEL_PARMS structure to include a description
* description of variable baud rate usage on the
* CEI-820 (CEI-x20 v3.40).
* 06/06/02 skb 29 Updated to support 32 transmitters and 32 receivers
* (CEI-x20 v3.60).
* 03/25/03 skb 30 Added support for CEI-520A (CEI-x20 v3.80).
* 04/23/04 skb 31 Added constants to support AR_EXECUTE_BIT (CEI-x20
* v3.90).
* 03/28/06 skb 32 Updated to use platform-independent data types
* (CEI-x20 v3.95).
*
*===========================================================================*/
#ifndef CEI22032_H
#define CEI22032_H
#include "cei_types.h"
// define _UNIX_ for CEI-x20 VxWorks/Linux builds
#if (defined(CEIX20_BUILD_VXWORKS) || defined(CEIX20_TARGET_LINUX_X86))
#define _UNIX_
#endif
// don't include WINDOWS stuff when building CEI-x20 firmware
#ifndef i960
#define WIN32_LEAN_AND_MEAN
#if !defined(__DOS__) && !defined(_UNIX_)
#include <windows.h>
#endif
#if defined (_WINDOWS)
// Microsoft C protected mode Windows program
#define _Windows
#endif
#if defined(_WINDLL)
#define _Windows
#endif
#if defined (__WIN32__)
// for Borland C++ compiler
#ifndef _WIN32
#define _WIN32
#endif
#endif
#if !defined (_WIN32)
#define EXPORT __export
#define EXPORT32
#else
#include <windows.h>
#if defined(__BORLANDC__)
#define EXPORT32
#define EXPORT __export
#else
#define EXPORT32 /* */ // __declspec(dllexport)
#define EXPORT
#define _Windows
#endif
#define UINT8 unsigned short >> 8
#define INT8 short >> 8
#endif
#endif
/*---------------------------------------------------------------------------*
* Create the standard WINDOWS typedef's if compiling for _UNIX_.
*---------------------------------------------------------------------------*/
#ifdef _UNIX_
#ifndef TARGET_DEFINES_H
typedef CEI_UINT16 WORD;
typedef CEI_UINT32 DWORD;
typedef CEI_UINT32 HWND;
typedef CEI_CHAR *LPSTR;
typedef int *LPINT;
typedef WORD *LPWORD;
typedef CEI_INT32 *LPLONG;
typedef DWORD *LPDWORD;
typedef void *LPVOID;
#define HANDLE CEI_INT32
#define VOID void
#define CALLBACK
#define NOMANGLE
#define CCONV
#define MAX_BTA 16
#ifndef CEIX20_BUILD_VXWORKS
typedef unsigned int UINT;
#endif
#endif //TARGET_DEFINES_H
#define HUGE
#define FAR
#define far
#endif
/*---------------------------------------------------------------------------*
* CONSTANTS -- The following constants need to be exported in the interface.
*---------------------------------------------------------------------------*/
#define FALSE 0
#define TRUE 1
/*----------------------------------------------------------------------------*
* Board Type equates. These are returned to callers of the API. The CEI-x20
* API "OR"s the base board type with the options (IS_6WIRE, IS_CSDB, or
* IS_717). The base board type can be extracted by "AND"ing with the mask
* API_BOARD_TYPE_MASK. Use AR_GET_BOARDTYPE to return the CEI-x20 board
* type value.
*----------------------------------------------------------------------------*/
#define MAX_BOARD_TYPES 17
#define MAX_IP_SLOTS 6
#define PA_100 0
#define CEDEMO 1 /* Driver only supports demo mode--no HW */
#define CEI_100 2 /* CEI-100 board is selected HW */
#define CEI_200 3 /* CEI-200 board is selected HW */
#define CEI_220 4 /* CEI-220 board is selected HW */
#define CEI_420 5 /* CEI-420 board is selected HW */
#define CEI_520 6 /* CEI-520 board is selected HW */
#define CEI_710 7 /* CEI-710 board is selected HW */
#define IP429HD 8 /* IP429HD board is selected HW */
#define VME_AIC 9 /* VME-AIC board is selected HW */
#define CEI_620 10 /* CEI-620 board is selected HW */
#define CEI_820 11 /* CEI-820 board is selected HW */
#define IP708 12 /* IP-708 board is selected HW */
#define CEI_420A 13 /* CEI-420A board is selected HW */
#define CEI_420A_12 14 /* CEI-420A (12 MHz) is selected HW */
#define CEI_420_70J 15 /* CEI-420-70J (12 MHz) reduced HW */
#define CEI_715 16 /* CEI-715 board is selected HW */
#define CEI_820TX 17 /* CEI-820TX board is selected HW */
#define CEI_520A 18 /* CEI-520A board is selected HW */
#define IS_6WIRE 0x1000 /* CEI-x20 board with 6-wire support */
#define IS_717 0x2000 /* CEI-x20 board with -717/573 support */
#define IS_CSDB 0x4000 /* CEI-x20 board with CSDB support */
#define API_BOARD_TYPE_MASK 0x00FF /* Extract the base board type */
/*----------------------------------------------------------------------------*
* CEI-520/620/820 Implemented Channel array bit definitions
*----------------------------------------------------------------------------*/
#define CHAN_NOT_IMPLEMENTED 0x00 /* Channel is not implemented */
#define CHAN_ARINC429 0x01 /* Channel is an ARINC-429 channel */
#define CHAN_ARINC717 0x02 /* Channel is an ARINC-573/717 channel */
#define CHAN_CSDB 0x04 /* Channel is a CSDB channel */
#define CHAN_6WIRE 0x05 /* Channel is a 561 6-wire channel */
/*----------------------------------------------------------------------------*
* ARINC configuration equates ==> AR_SET_ARINC_CONFIG specific.
*----------------------------------------------------------------------------*
* This set of configuration equates should be used with calls to
* AR_SET_ARINC_CONFIG when the target is a VME-AIC board.
*----------------------------------------------------------------------------*/
#define A708_WORDS_PER_FRAME 107
#define RCB_SPEED_HIGH 0
#define RCB_SPEED_LOW 1
#define RCB_PARITY_ODD 0
#define RCB_PARITY_EVEN 1
#define SCB_RECV_MERGED 0
#define SCB_RECV_INDIVIDUAL 1
#define SCB_RECV_SELFTEST_IND 6
#define SCB_RECV_INDIVIDUAL_NOSDI 7
#define ARU_RX_BITRATE 1
#define ARU_TX_BITRATE 2
#define ARU_RX_PARITY 3
#define ARU_TX_PARITY 4
#define ARU_RECV_MODE 5
#define ARU_RESOLUTION 6
/*----------------------------------------------------------------------------*
* V M E - A I C Only!
* ARINC configuration equates ==> AR_SET_CONTROL specific (VME-AIC).
* These configuration equates should be used with calls to
* AR_SET_CONTROL to set the attribute specified in the comment field.
* Search for "717" to see the parameters for the CEI-x20 with the -717 option.
*----------------------------------------------------------------------------*/
#define ARU_573_SPEED 1 /* Set the IP573 baud rate and subframe size*/
#define ARU_573_INTERNAL_WRAP 2 /* Set the IP573 internal wrap state */
#define ARU_573_RECV_SYNC_1 3 /* Set the first IP573 receive sync word */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -