mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-13 13:27:14 +02:00
a check in gotthard server to ensure that it is really gotthard and not moench module
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@522 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
@ -52,19 +52,28 @@ char mess[1000];
|
||||
|
||||
int digitalTestBit = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
void check_detector_type(){
|
||||
if (((bus_r(PCB_REV_REG) & DETECTOR_TYPE_MASK)>> DETECTOR_TYPE_OFFSET) == MOENCH_MODULE){
|
||||
printf("This is a MOENCH detector. Exiting Gotthard Server.\n");
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
int init_detector( int b) {
|
||||
#ifndef PICASSOD
|
||||
|
||||
printf("This is a GOTTHARD detector with %d chips per module\n", NCHIP);
|
||||
#else
|
||||
printf("This is a PICASSO detector with %d chips per module\n", NCHIP);
|
||||
#endif
|
||||
|
||||
if (mapCSP0()==FAIL) { printf("Could not map memory\n");
|
||||
exit(1);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
//check if it is really gotthard
|
||||
check_detector_type();
|
||||
|
||||
//testFpga();
|
||||
if (b) {
|
||||
#ifdef MCB_FUNCS
|
||||
|
Reference in New Issue
Block a user