mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-15 22:37:14 +02:00
gotthard2: nios server
This commit is contained in:
@ -3,7 +3,7 @@ main_inc = ../slsDetectorServer/include/
|
|||||||
main_src = ../slsDetectorServer/src/
|
main_src = ../slsDetectorServer/src/
|
||||||
support_lib = ../../slsSupportLib/include/
|
support_lib = ../../slsSupportLib/include/
|
||||||
|
|
||||||
CROSS = bfin-uclinux-
|
CROSS = nios2-buildroot-linux-gnu-
|
||||||
CC = $(CROSS)gcc
|
CC = $(CROSS)gcc
|
||||||
CFLAGS += -Wall -DGOTTHARD2D -DSTOP_SERVER -I$(main_inc) -I$(support_lib) -I$(current_dir)#-DVERBOSEI #-DVERBOSE
|
CFLAGS += -Wall -DGOTTHARD2D -DSTOP_SERVER -I$(main_inc) -I$(support_lib) -I$(current_dir)#-DVERBOSEI #-DVERBOSE
|
||||||
LDLIBS += -lm
|
LDLIBS += -lm
|
||||||
@ -12,7 +12,7 @@ DESTDIR ?= bin
|
|||||||
INSTMODE = 0777
|
INSTMODE = 0777
|
||||||
|
|
||||||
SRCS = slsDetectorFunctionList.c
|
SRCS = slsDetectorFunctionList.c
|
||||||
SRCS += $(main_src)slsDetectorServer.c $(main_src)slsDetectorServer_funcs.c $(main_src)communication_funcs.c $(main_src)blackfin.c
|
SRCS += $(main_src)slsDetectorServer.c $(main_src)slsDetectorServer_funcs.c $(main_src)communication_funcs.c $(main_src)nios.c
|
||||||
|
|
||||||
OBJS = $(SRCS:.c=.o)
|
OBJS = $(SRCS:.c=.o)
|
||||||
|
|
||||||
|
@ -194,6 +194,7 @@ int setDynamicRange(int dr){
|
|||||||
int64_t setTimer(enum timerIndex ind, int64_t val) {
|
int64_t setTimer(enum timerIndex ind, int64_t val) {
|
||||||
|
|
||||||
int64_t retval = -1;
|
int64_t retval = -1;
|
||||||
|
#ifdef VIRTUAL
|
||||||
switch(ind){
|
switch(ind){
|
||||||
|
|
||||||
case FRAME_NUMBER: // defined in sls_detector_defs.h (general)
|
case FRAME_NUMBER: // defined in sls_detector_defs.h (general)
|
||||||
@ -233,7 +234,7 @@ int64_t setTimer(enum timerIndex ind, int64_t val) {
|
|||||||
FILE_LOG(logERROR, ("Timer Index not implemented for this detector: %d\n", ind));
|
FILE_LOG(logERROR, ("Timer Index not implemented for this detector: %d\n", ind));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
return retval;
|
return retval;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -262,6 +263,7 @@ int64_t getTimeLeft(enum timerIndex ind){
|
|||||||
#ifdef VIRTUAL
|
#ifdef VIRTUAL
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef VIRTUAL
|
||||||
int64_t retval = -1;
|
int64_t retval = -1;
|
||||||
switch(ind){
|
switch(ind){
|
||||||
|
|
||||||
@ -279,7 +281,7 @@ int64_t getTimeLeft(enum timerIndex ind){
|
|||||||
FILE_LOG(logERROR, ("Remaining Timer index not implemented for this detector: %d\n", ind));
|
FILE_LOG(logERROR, ("Remaining Timer index not implemented for this detector: %d\n", ind));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -401,9 +403,12 @@ u_int32_t runBusy() {
|
|||||||
#ifdef VIRTUAL
|
#ifdef VIRTUAL
|
||||||
return virtual_status;
|
return virtual_status;
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef VIRTUAL
|
||||||
u_int32_t s = (bus_r(STATUS_REG) & RUN_BUSY_MSK);
|
u_int32_t s = (bus_r(STATUS_REG) & RUN_BUSY_MSK);
|
||||||
FILE_LOG(logDEBUG1, ("Status Register: %08x\n", s));
|
FILE_LOG(logDEBUG1, ("Status Register: %08x\n", s));
|
||||||
return s;
|
return s;
|
||||||
|
#endif
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#define APIMOENCH 0x190820
|
#define APIMOENCH 0x190820
|
||||||
#define APICTB 0x190830
|
#define APICTB 0x190830
|
||||||
#define APIGOTTHARD 0x190830
|
#define APIGOTTHARD 0x190830
|
||||||
#define APIGOTTHARD2 0x190830
|
|
||||||
#define APIJUNGFRAU 0x190830
|
#define APIJUNGFRAU 0x190830
|
||||||
#define APIMYTHEN3 0x190830
|
#define APIMYTHEN3 0x190830
|
||||||
#define APIEIGER 0x190830
|
#define APIEIGER 0x190830
|
||||||
|
#define APIGOTTHARD2 0x190830
|
||||||
|
Reference in New Issue
Block a user