diff --git a/slsDetectorSoftware/gotthardDetectorServer/Makefile b/slsDetectorSoftware/gotthardDetectorServer/Makefile index 1cd94ee59..29ef47aea 100755 --- a/slsDetectorSoftware/gotthardDetectorServer/Makefile +++ b/slsDetectorSoftware/gotthardDetectorServer/Makefile @@ -6,7 +6,7 @@ CROSS = bfin-uclinux- CC = $(CROSS)gcc -CFLAGS += -Wall -DMCB_FUNCS -DVERBOSE #-DVERY_VERBOSE #-DVIRTUAL +CFLAGS += -Wall -DMCB_FUNCS -DVERBOSE #-DVERY_VERBOSE #-DVIRTUAL #INCLUDES= /usr/src/kernels/2.6.18-238.12.1.el5-i686/include #/home/l_maliakal_d/bfin/blackfin-linux-dist/linux-2.6.x/include diff --git a/slsDetectorSoftware/gotthardDetectorServer/communication_funcs.c b/slsDetectorSoftware/gotthardDetectorServer/communication_funcs.c index 8c28ea1a2..863a31789 100755 --- a/slsDetectorSoftware/gotthardDetectorServer/communication_funcs.c +++ b/slsDetectorSoftware/gotthardDetectorServer/communication_funcs.c @@ -96,8 +96,7 @@ int acceptConnection(int socketDescriptor) { // if(file_des>0) return file_des; - //next 3 lines commented out by dhanya - //#ifndef C_ONLY + //#ifndef C_ONLY // if(is_a_server){ //server; the server will wait for the clients connection //#endif diff --git a/slsDetectorSoftware/gotthardDetectorServer/firmware_funcs.c b/slsDetectorSoftware/gotthardDetectorServer/firmware_funcs.c index 84f5e67f8..997057f79 100755 --- a/slsDetectorSoftware/gotthardDetectorServer/firmware_funcs.c +++ b/slsDetectorSoftware/gotthardDetectorServer/firmware_funcs.c @@ -15,6 +15,9 @@ #include #include #include +#include + + //for memory mapping @@ -171,8 +174,8 @@ int mapCSP0(void) { u_int32_t address; address = FIFO_DATA_REG_OFF; - values=(u_int16_t*)(CSP0BASE+address*2); - printf("values=%04x\n",values); + values=(u_int32_t*)(CSP0BASE+address*2); + printf("values=%08x\n",values); //printf("values=%08x\n",((u_int32_t*)(CSP0BASE+FIFO_DATA_REG_OFF*2))); /* must b uncommentedlater//////////////////////////////////////////////////////// @@ -1263,7 +1266,7 @@ u_int32_t runState(void) { write_status_sm("Stopped"); #endif #ifdef VERBOSE - printf("status %08x\n",s); + printf("status %04x\n",s); #endif return s; } @@ -1272,9 +1275,9 @@ u_int32_t runState(void) { // State Machine u_int32_t startStateMachine(){ -#ifdef VERBOSE +//#ifdef VERBOSE printf("Starting State Machine\n"); -#endif +//#endif // fifoReset(); printf("Starting State Machine\n"); now_ptr=(char*)ram_values; #ifdef SHAREDMEMORY @@ -1442,7 +1445,35 @@ u_int32_t* fifo_read_event() printf("FIFO %d contains %d words\n",ichip,(fifoReadCounter(ichip)&FIFO_COUNTER_MASK)); } #endif - memcpy(now_ptr, values, dataBytes); + + + //unsigned long flags; + + // register int ihalf; + + // save_flags(flags); + // cli(); /* This code runs with interrupts disabled */ + + +/* for (ihalf=0;ihalf>16)&0xffff); +*/ + +/* for (ichip=0;ichip