From 9e7a133422d1372e9f6dddfbc4fbacfe9c8a87d3 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Fri, 30 Aug 2019 16:44:11 +0200 Subject: [PATCH] gotthard2: nios server --- slsDetectorServers/gotthard2DetectorServer/Makefile | 4 ++-- .../gotthard2DetectorServer/slsDetectorFunctionList.c | 9 +++++++-- slsSupportLib/include/versionAPI.h | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/slsDetectorServers/gotthard2DetectorServer/Makefile b/slsDetectorServers/gotthard2DetectorServer/Makefile index 6e39569a7..9c121be71 100755 --- a/slsDetectorServers/gotthard2DetectorServer/Makefile +++ b/slsDetectorServers/gotthard2DetectorServer/Makefile @@ -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) diff --git a/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c index 3c5eb13d8..3142b5dca 100644 --- a/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c @@ -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; } diff --git a/slsSupportLib/include/versionAPI.h b/slsSupportLib/include/versionAPI.h index 507e9e392..66a0c5e79 100644 --- a/slsSupportLib/include/versionAPI.h +++ b/slsSupportLib/include/versionAPI.h @@ -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