eiger setting dac works now and setsettings.. need to work on trimbits

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@620 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
l_maliakal_d 2013-06-20 08:46:47 +00:00
parent e8f3a5aad4
commit 6d4e5aa1af
3 changed files with 14 additions and 5 deletions

View File

@ -1,7 +1,6 @@
#ifdef SLS_DETECTOR_FUNCTION_LIST
#include "slsDetectorFunctionList.h"
#include "slsDetectorServer_defs.h"
#include <stdio.h>
#include <string.h>
@ -40,6 +39,7 @@ int sChan, sChip, sMod, sDac, sAdc;
int nModBoard;
extern int dataBytes;
int dacvalues[NDAC];
/** temporary
u_int32_t CSP0BASE;
@ -221,17 +221,21 @@ int detectorTest( enum digitalTestMode arg){
double setDAC(enum dacIndex ind, double val, int imod){
int setDAC(enum detDacIndex ind, int val, int imod){
if (val >= 0)
dacvalues[(int)ind] = val;
//template initDACbyIndexDACU from mcb_funcs.c
//check that slsDetectorServer_funcs.c set_dac() has all the specific dac enums
//set dac and write to a register in fpga to remember dac value when server restarts
return 0;
return dacvalues[(int)ind];
}
double getADC(enum dacIndex ind, int imod){
int getADC(enum detDacIndex ind, int imod){
//get adc value
return 0;
}
@ -263,7 +267,7 @@ int setThresholdEnergy(int thr, int imod){
enum detectorSettings setSettings(enum detectorSettings sett, int imod){
enum detDacIndex setSettings(enum detDacIndex sett, int imod){
//template setSettings() from mcb_funcs.c
//reads the dac registers from fpga to confirm which settings, if weird, undefined

View File

@ -27,5 +27,10 @@
#define DYNAMIC_RANGE 16
#ifdef EIGERD
enum detDacIndex{SVP,SVN,VTR,VRF,VRS,VTGSTV,VCMP_LL,VCMP_LR,CAL,VCMP_RL,VCMP_RR,RXB_RB,RXB_LB,VCP,VCN,VIS};
#else
enum detDacIndex{none};
#endif
#endif /* SLSDETECTORSERVER_DEFS_H_ */