mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-11 20:37:15 +02:00
configuremac after starting receiver, also telling the server to send packets to receiver or cpu with receiver start and receiver stop
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@290 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
@ -705,6 +705,33 @@ int setContinousReadOut(int d) {
|
||||
}
|
||||
|
||||
|
||||
int startReceiver(int start) {
|
||||
u_int32_t addr=CONFIG_REG;
|
||||
#ifdef VERBOSE
|
||||
if(start)
|
||||
printf("Setting up detector to send to Receiver\n");
|
||||
else
|
||||
printf("Setting up detector to send to CPU\n");
|
||||
#endif
|
||||
int reg=bus_r(addr);
|
||||
//for start recever, write 0 and for stop, write 1
|
||||
if (!start)
|
||||
bus_w(CONFIG_REG,reg|CPU_OR_RECEIVER_BIT);
|
||||
else
|
||||
bus_w(CONFIG_REG,reg&(~CPU_OR_RECEIVER_BIT));
|
||||
|
||||
reg=bus_r(addr);
|
||||
#ifdef VERBOSE
|
||||
printf("Config Reg %x\n", reg);
|
||||
#endif
|
||||
if (start && (!(reg&CPU_OR_RECEIVER_BIT)))
|
||||
return OK;
|
||||
if(!start && (reg&CPU_OR_RECEIVER_BIT))
|
||||
return OK;
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
|
||||
u_int64_t getDetectorNumber() {
|
||||
char output[255],mac[255]="";
|
||||
u_int64_t res=0;
|
||||
|
Reference in New Issue
Block a user