gotthard2: nios server

This commit is contained in:
2019-08-30 16:44:11 +02:00
parent cb8c7eea54
commit 9e7a133422
3 changed files with 10 additions and 5 deletions

View File

@ -3,7 +3,7 @@ main_inc = ../slsDetectorServer/include/
main_src = ../slsDetectorServer/src/
support_lib = ../../slsSupportLib/include/
CROSS = bfin-uclinux-
CROSS = nios2-buildroot-linux-gnu-
CC = $(CROSS)gcc
CFLAGS += -Wall -DGOTTHARD2D -DSTOP_SERVER -I$(main_inc) -I$(support_lib) -I$(current_dir)#-DVERBOSEI #-DVERBOSE
LDLIBS += -lm
@ -12,7 +12,7 @@ DESTDIR ?= bin
INSTMODE = 0777
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)

View File

@ -194,6 +194,7 @@ int setDynamicRange(int dr){
int64_t setTimer(enum timerIndex ind, int64_t val) {
int64_t retval = -1;
#ifdef VIRTUAL
switch(ind){
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));
break;
}
#endif
return retval;
}
@ -262,6 +263,7 @@ int64_t getTimeLeft(enum timerIndex ind){
#ifdef VIRTUAL
return 0;
#endif
#ifdef VIRTUAL
int64_t retval = -1;
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));
break;
}
#endif
return -1;
}
@ -401,9 +403,12 @@ u_int32_t runBusy() {
#ifdef VIRTUAL
return virtual_status;
#endif
#ifdef VIRTUAL
u_int32_t s = (bus_r(STATUS_REG) & RUN_BUSY_MSK);
FILE_LOG(logDEBUG1, ("Status Register: %08x\n", s));
return s;
#endif
return -1;
}

View File

@ -6,7 +6,7 @@
#define APIMOENCH 0x190820
#define APICTB 0x190830
#define APIGOTTHARD 0x190830
#define APIGOTTHARD2 0x190830
#define APIJUNGFRAU 0x190830
#define APIMYTHEN3 0x190830
#define APIEIGER 0x190830
#define APIGOTTHARD2 0x190830