00001 #ifndef STRAPDV_H
00002 #define STRAPDV_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #include "lcudrv.h"
00019 #include "strapdvCommands.h"
00020
00021
00022
00023
00024
00025 #define strapdvOK 0
00026 #define strapdvERR_INV_TIMEOUT -400
00027 #define strapdvERR_INV_IR_LEVEL -405
00028 #define strapdvERR_INV_IR_NUMBER -410
00029 #define strapdvERR_NO_EXCLUSIVE -420
00030 #define strapdvERR_INV_BOARD_CONFIG -425
00031
00032 #define strapdvERR_IR_CONNECT -430
00033 #define strapdvERR_ENABLE_IR_LEVEL -435
00034 #define strapdvERR_NO_DIAG -440
00035 #define strapdvERR_NO_DATA -445
00036 #define strapdvERR_INV_PARAMETER -450
00037 #define strapdvERR_INV_SEM_ID -455
00038 #define strapdvERR_INV_RT_PTR -460
00039 #define strapdvERR_OVERFLOW -465
00040
00041
00042
00043
00044 #define strapMASK_CLOSED_LOOP 0
00045 #define strapMASK_HV_ON 1
00046 #define strapMASK_OVER_CURR 2
00047 #define strapMASK_OVER_COUNTS 3
00048 #define strapMASK_TEMP_CTRL 4
00049 #define strapMASK_OVER_TEMP 5
00050 #define strapMASK_DISTURB_MODE 6
00051 #define strapMASK_HV_FLAG 7
00052 #define strapMASK_RT_MODE 8
00053 #define strapMASK_INT_SIGNAL 9
00054 #define strapMASK_CIRC_BUFFER 10
00055 #define strapMASK_DATA_READY 11
00056 #define strapMASK_PROCESS_DIST 12
00057 #define strapMASK_E2PROM 13
00058 #define strapMASK_CBUF_OVERFLOW 14
00059 #define strapMASK_SIMULATION 15
00060
00061 #define strapMASK_DIAG_MONITOR 16
00062 #define strapMASK_CHOPPING_MODE 17
00063 #define strapMASK_CHOP_ON 18
00064
00065
00066
00067
00068 #define TYPE_NR_BLOCK_0 0x00
00069 #define TYPE_NR_BLOCK_1 0x01
00070 #define TYPE_NR_BLOCK_2 0x02
00071 #define TYPE_NR_BLOCK_3 0x03
00072 #define TYPE_NR_BLOCK_4 0x04
00073 #define TYPE_NR_BLOCK_5 0x05
00074 #define TYPE_NR_BLOCK_6 0x06
00075 #define TYPE_NR_BLOCK_7 0x07
00076 #define TYPE_NR_BLOCK_8 0x08
00077 #define TYPE_NR_BLOCK_9 0x09
00078
00079
00080
00081
00082 #define TYPE_DL_BLOCK_0 0x0000
00083 #define TYPE_DL_BLOCK_1 0x0001
00084 #define TYPE_DL_BLOCK_2 0x0002
00085
00086
00087
00088
00089 #define RT_NOTIFY 0x0001
00090 #define DIAG_NOTIFY 0x0002
00091
00092
00093 #define strapLENGTH_OF_SETUP_BLOCK 0x0016
00094
00095
00096 #define strapLENGTH_OF_STATIC_BLOCK 0x0029
00097
00098
00099 #define strapLENGTH_OF_STATUS_BLOCK 0x0009
00100
00101
00102 #define strapLENGTH_OF_DIAGNOSTIC_BLOCK 0x002B
00103
00104
00105 #define strapLENGTH_OF_TMPDIST_BLOCK 0x0008
00106
00107
00108 #define strapLENGTH_OF_SOFTVERS_BLOCK 0x0020
00109
00110
00111 #define strapNUMBER_OF_RAM_RECORDS 58248
00112
00113
00114 #define strapLENGTH_OF_DATA_RECORD 6
00115
00116
00117 #define strapLENGTH_OF_RAM_BLOCK 0x0078
00118
00119
00120 #define strapLENGTH_OF_HV_BLOCK 0x0018
00121
00122
00123
00124
00125
00126 #define dspCTRL_COEFF 0
00127 #define dspCOUNT_LIMIT 32
00128 #define dspHIGH_VOLT 33
00129 #define dspGATE 37
00130 #define dspTEMPERATURE 38
00131 #define dspHOLDOFF 39
00132 #define dspTIMEOUT 40
00133
00134
00135
00136
00137
00138 #define dspINT_MATRIX 0
00139 #define dspINT_TIME 4
00140 #define dspDIAG_RATE 5
00141 #define dspDATA_RECS 6
00142 #define dspSPOT_OFFX 7
00143 #define dspSPOT_OFFY 8
00144 #define dspSKYBACKGND 9
00145 #define dspFLUX_THRESHOLD 10
00146 #define dspNUM_CHOP_POS 11
00147 #define dspCHOP_X 12
00148 #define dspCHOP_Y 17
00149
00150
00151
00152
00153 int strapdvDrv (int devices, int channels, int timeout);
00154 int strapdvDevCreate (char *devName, void *baseAddrA16, int intrNumber,
00155 int intrLevel, int boardId);
00156
00157
00158
00159
00160 int strapdvVersion (void);
00161 int strapdvDevShow (void);
00162 int strapdvPrintRegs (int unit);
00163 int strapdvSetRegs (int unit, UINT16 value);
00164 int strapdvPrintDevice (int unit);
00165 int strapdvPrintError (int errorCode);
00166 int strapdvPrintCmd (int cmdCode);
00167 int strapdvPrintChannel (int fd);
00168
00169 #endif