mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-01-17 16:43:45 +01:00
jungfrau virtual server compiles
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
#define REGISTER_DEFS_H
|
#define REGISTER_DEFS_H
|
||||||
|
|
||||||
/* Definitions for FPGA*/
|
/* Definitions for FPGA*/
|
||||||
|
#define MEM_MAP_SHIFT 1
|
||||||
|
|
||||||
/* FPGA Version register */
|
/* FPGA Version register */
|
||||||
#define FPGA_VERSION_REG (0x00 << MEM_MAP_SHIFT)
|
#define FPGA_VERSION_REG (0x00 << MEM_MAP_SHIFT)
|
||||||
|
|||||||
Binary file not shown.
@@ -7,6 +7,9 @@
|
|||||||
#include "AD9257.h" // commonServerFunctions.h, blackfin.h, ansi.h
|
#include "AD9257.h" // commonServerFunctions.h, blackfin.h, ansi.h
|
||||||
#include "programfpga.h"
|
#include "programfpga.h"
|
||||||
#else
|
#else
|
||||||
|
#include "blackfin.h"
|
||||||
|
#include <string.h>
|
||||||
|
#include <unistd.h> // usleep
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -59,7 +62,7 @@ void checkFirmwareCompatibility() {
|
|||||||
}
|
}
|
||||||
firmware_check_done = 1;
|
firmware_check_done = 1;
|
||||||
return;
|
return;
|
||||||
#endif
|
#else
|
||||||
|
|
||||||
defineGPIOpins();
|
defineGPIOpins();
|
||||||
resetFPGA();
|
resetFPGA();
|
||||||
@@ -162,6 +165,7 @@ void checkFirmwareCompatibility() {
|
|||||||
}
|
}
|
||||||
FILE_LOG(logINFO, ("Compatibility - success\n"));
|
FILE_LOG(logINFO, ("Compatibility - success\n"));
|
||||||
firmware_check_done = 1;
|
firmware_check_done = 1;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
#define PROGRAMMING_MODE (0x2)
|
#define PROGRAMMING_MODE (0x2)
|
||||||
#define BOARD_JUNGFRAU_TYPE (8)
|
#define BOARD_JUNGFRAU_TYPE (8)
|
||||||
|
#define CTRL_SRVR_INIT_TIME_US (300 * 1000)
|
||||||
|
|
||||||
/* Struct Definitions */
|
/* Struct Definitions */
|
||||||
typedef struct ip_header_struct {
|
typedef struct ip_header_struct {
|
||||||
|
|||||||
@@ -10,7 +10,6 @@
|
|||||||
u_int64_t CSP0BASE = 0;
|
u_int64_t CSP0BASE = 0;
|
||||||
#define CSP0 0x20200000
|
#define CSP0 0x20200000
|
||||||
#define MEM_SIZE 0x100000
|
#define MEM_SIZE 0x100000
|
||||||
#define MEM_MAP_SHIFT 1
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -129,7 +128,7 @@ int mapCSP0(void) {
|
|||||||
FILE_LOG(logERROR, ("Could not allocate virtual memory.\n"));
|
FILE_LOG(logERROR, ("Could not allocate virtual memory.\n"));
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
FILE_LOG(logINFO, (("memory allocated\n"));
|
FILE_LOG(logINFO, ("memory allocated\n"));
|
||||||
#else
|
#else
|
||||||
int fd;
|
int fd;
|
||||||
fd = open("/dev/mem", O_RDWR | O_SYNC, 0);
|
fd = open("/dev/mem", O_RDWR | O_SYNC, 0);
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
|
|
||||||
/* global variables */
|
/* global variables */
|
||||||
#define CTRL_SRVR_INIT_TIME_US (300 * 1000)
|
|
||||||
#define MTDSIZE 10
|
#define MTDSIZE 10
|
||||||
|
|
||||||
int gpioDefined = 0;
|
int gpioDefined = 0;
|
||||||
|
|||||||
@@ -2123,9 +2123,11 @@ int write_adc_register(int file_des) {
|
|||||||
#ifndef JUNGFRAUD
|
#ifndef JUNGFRAUD
|
||||||
functionNotImplemented();
|
functionNotImplemented();
|
||||||
#else
|
#else
|
||||||
|
#ifndef VIRTUAL
|
||||||
// only set
|
// only set
|
||||||
if (Server_VerifyLock() == OK)
|
if (Server_VerifyLock() == OK)
|
||||||
setAdc(addr, val);
|
setAdc(addr, val);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
return Server_SendResult(file_des, INT32, 1, NULL, 0);
|
return Server_SendResult(file_des, INT32, 1, NULL, 0);
|
||||||
}
|
}
|
||||||
@@ -2385,6 +2387,7 @@ int program_fpga(int file_des) {
|
|||||||
n = receiveData(file_des,mess,MAX_STR_LENGTH,OTHER);
|
n = receiveData(file_des,mess,MAX_STR_LENGTH,OTHER);
|
||||||
functionNotImplemented();
|
functionNotImplemented();
|
||||||
#else
|
#else
|
||||||
|
#ifndef VIRTUAL
|
||||||
// only set
|
// only set
|
||||||
if (Server_VerifyLock() == OK) {
|
if (Server_VerifyLock() == OK) {
|
||||||
|
|
||||||
@@ -2489,6 +2492,7 @@ int program_fpga(int file_des) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
return Server_SendResult(file_des, INT32, 1, NULL, 0);
|
return Server_SendResult(file_des, INT32, 1, NULL, 0);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user