mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-22 01:27:59 +02:00
Separate headers (#57)
* WIP, ctb * WIP, eiger * WIP, gotthard * WIP, jungfrau * WIP, gotthard2 * WIP, mythen3 * WIP, moench * fixed gotthard apiversioning mismatch with gotthard2
This commit is contained in:
@ -1,31 +1,40 @@
|
||||
add_executable(jungfrauDetectorServer
|
||||
add_executable(jungfrauDetectorServer_virtual
|
||||
slsDetectorFunctionList.c
|
||||
../slsDetectorServer/slsDetectorServer.c
|
||||
../slsDetectorServer/slsDetectorServer_funcs.c
|
||||
../slsDetectorServer/communication_funcs.c
|
||||
../slsDetectorServer/src/slsDetectorServer.c
|
||||
../slsDetectorServer/src/slsDetectorServer_funcs.c
|
||||
../slsDetectorServer/src/communication_funcs.c
|
||||
../slsDetectorServer/src/blackfin.c
|
||||
../slsDetectorServer/src/common.c
|
||||
../slsDetectorServer/src/commonServerFunctions.c
|
||||
../slsDetectorServer/src/AD9257.c
|
||||
../slsDetectorServer/src/ALTERA_PLL.c
|
||||
../slsDetectorServer/src/LTC2620.c
|
||||
../slsDetectorServer/src/MAX1932.c
|
||||
../slsDetectorServer/src/programfpga.c
|
||||
../slsDetectorServer/src/communication_funcs_UDP.c
|
||||
)
|
||||
|
||||
include_directories(
|
||||
../slsDetectorServer/
|
||||
../slsDetectorServer/include
|
||||
../../slsSupportLib/include
|
||||
)
|
||||
|
||||
target_include_directories(jungfrauDetectorServer
|
||||
target_include_directories(jungfrauDetectorServer_virtual
|
||||
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
target_compile_definitions(jungfrauDetectorServer
|
||||
target_compile_definitions(jungfrauDetectorServer_virtual
|
||||
PUBLIC JUNGFRAUD VIRTUAL STOP_SERVER
|
||||
)
|
||||
|
||||
target_link_libraries(jungfrauDetectorServer
|
||||
target_link_libraries(jungfrauDetectorServer_virtual
|
||||
PUBLIC pthread rt
|
||||
)
|
||||
|
||||
set_target_properties(jungfrauDetectorServer PROPERTIES
|
||||
set_target_properties(jungfrauDetectorServer_virtual PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
||||
)
|
||||
|
||||
install(TARGETS jungfrauDetectorServer
|
||||
install(TARGETS jungfrauDetectorServer_virtual
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
)
|
||||
|
@ -1,16 +1,19 @@
|
||||
current_dir = $(shell pwd)
|
||||
main_server = ../slsDetectorServer/
|
||||
main_inc = ../slsDetectorServer/include/
|
||||
main_src = ../slsDetectorServer/src/
|
||||
support_lib = ../../slsSupportLib/include/
|
||||
|
||||
CROSS = bfin-uclinux-
|
||||
CC = $(CROSS)gcc
|
||||
CFLAGS += -Wall -DJUNGFRAUD -DSTOP_SERVER -I$(main_server) -I$(support_lib) -I$(current_dir)#-DVERBOSEI #-DVERBOSE
|
||||
CFLAGS += -Wall -DJUNGFRAUD -DSTOP_SERVER -I$(main_inc) -I$(support_lib) -I$(current_dir)#-DVERBOSEI #-DVERBOSE
|
||||
LDLIBS += -lm
|
||||
PROGS = jungfrauDetectorServer
|
||||
DESTDIR ?= bin
|
||||
INSTMODE = 0777
|
||||
|
||||
SRCS = $(main_server)communication_funcs.c $(main_server)slsDetectorServer.c $(main_server)slsDetectorServer_funcs.c slsDetectorFunctionList.c
|
||||
SRCS = slsDetectorFunctionList.c
|
||||
SRCS += $(main_src)slsDetectorServer.c $(main_src)slsDetectorServer_funcs.c $(main_src)communication_funcs.c $(main_src)blackfin.c $(main_src)common.c $(main_src)commonServerFunctions.c $(main_src)AD9257.c $(main_src)ALTERA_PLL.c $(main_src)LTC2620.c $(main_src)MAX1932.c $(main_src)programfpga.c
|
||||
|
||||
OBJS = $(SRCS:.c=.o)
|
||||
|
||||
all: clean versioning $(PROGS)
|
||||
@ -29,9 +32,10 @@ $(PROGS): $(OBJS)
|
||||
$(CC) -o $@ $^ $(CFLAGS) $(LDLIBS)
|
||||
mv $(PROGS) $(DESTDIR)
|
||||
rm *.gdb
|
||||
rm $(main_src)*.o
|
||||
|
||||
clean:
|
||||
rm -rf $(DESTDIR)/$(PROGS) *.o *.gdb $(main_server)*.o
|
||||
rm -rf $(DESTDIR)/$(PROGS) *.o *.gdb $(main_src)*.o
|
||||
|
||||
|
||||
|
@ -6,13 +6,17 @@
|
||||
#include "LTC2620.h" // dacs
|
||||
#include "MAX1932.h" // hv
|
||||
#include "ALTERA_PLL.h" // pll
|
||||
#include "blackfin.h"
|
||||
#include "common.h"
|
||||
#ifndef VIRTUAL
|
||||
#include "programfpga.h"
|
||||
#else
|
||||
#include "communication_funcs_UDP.h"
|
||||
#include "blackfin.h"
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <unistd.h> // usleep
|
||||
#ifdef VIRTUAL
|
||||
#include <pthread.h>
|
||||
#include <time.h>
|
||||
#endif
|
||||
@ -921,7 +925,7 @@ int getDAC(enum DACINDEX ind, int mV) {
|
||||
}
|
||||
|
||||
int getMaxDacSteps() {
|
||||
return LTC2620_MAX_STEPS;
|
||||
return LTC2620_GetMaxNumSteps();
|
||||
}
|
||||
|
||||
int getADC(enum ADCINDEX ind){
|
||||
@ -1057,7 +1061,7 @@ void setupHeader(int iRxEntry, enum interfaceType type, uint32_t destip, uint64_
|
||||
// calculate rxr endpoint offset
|
||||
addr += (iRxEntry * RXR_ENDPOINT_OFST);
|
||||
// get struct memory
|
||||
udp_header *udp = (udp_header*) (CSP0BASE + addr * 2);
|
||||
udp_header *udp = (udp_header*) (Blackfin_getBaseAddress() + addr * 2);
|
||||
memset(udp, 0, sizeof(udp_header));
|
||||
|
||||
// mac addresses
|
||||
|
Reference in New Issue
Block a user