diff --git a/slsDetectorSoftware/gotthardDetectorServer/firmware_funcs.c b/slsDetectorSoftware/gotthardDetectorServer/firmware_funcs.c index 958567ebf..e5322be71 100755 --- a/slsDetectorSoftware/gotthardDetectorServer/firmware_funcs.c +++ b/slsDetectorSoftware/gotthardDetectorServer/firmware_funcs.c @@ -176,7 +176,7 @@ int setDAQRegister() int setPhaseShiftOnce(){ u_int32_t addr, reg; - int result=OK, i,val,powerOn=0; + int result=OK, i,val; addr=MULTI_PURPOSE_REG; reg=bus_r(addr); #ifdef VERBOSE @@ -200,7 +200,26 @@ int setPhaseShiftOnce(){ } reg=bus_r(addr); - printf("\nREG:%d\n",reg); + printf("Multipupose reg now:%d\n",reg); + + //for init_enet.. to convert ipaddress + /* + string sval; + sval.assign("129.129.202.176"); + stringstream sstr(sval); + string word; + char chex[50],cword[50]; + int i,inum; + + + while(getline(sstr,word,'.')){ + i=atoi(word.c_str()); + sprintf(chex,"%02x",i); + strcat(cword,chex); + } + printf("%s\n\n",cword); + */ + return result; } diff --git a/slsDetectorSoftware/gotthardDetectorServer/registers_g.h b/slsDetectorSoftware/gotthardDetectorServer/registers_g.h index a2bb70263..be98abe45 100755 --- a/slsDetectorSoftware/gotthardDetectorServer/registers_g.h +++ b/slsDetectorSoftware/gotthardDetectorServer/registers_g.h @@ -202,6 +202,8 @@ #define SW1_BIT 0x00000020 #define SW1_OFFSET 5 +#define RESET_BIT 0x00000080 +#define RESET_OFFSET 7 #define ENET_RESETN_BIT 0x00000800 #define ENET_RESETN_OFFSET 11