* g2: new hdi values, write hdi value to reg, set slave/master to reg, able to set master from server config file, server command line and client

* print versions for virtual as well
This commit is contained in:
Dhanya Thattil
2022-08-16 09:31:13 +02:00
committed by GitHub
parent 409a3977db
commit 22b9562629
24 changed files with 251 additions and 241 deletions

View File

@ -67,14 +67,9 @@ void basictests() {
memset(initErrorMessage, 0, MAX_STR_LENGTH);
#ifdef VIRTUAL
LOG(logINFOBLUE, ("******** Jungfrau Virtual Server *****************\n"));
if (mapCSP0() == FAIL) {
strcpy(initErrorMessage,
"Could not map to memory. Dangerous to continue.\n");
LOG(logERROR, (initErrorMessage));
initError = FAIL;
}
return;
#else
LOG(logINFOBLUE, ("************ Jungfrau Server *********************\n"));
initError = defineGPIOpins(initErrorMessage);
if (initError == FAIL) {
return;
@ -83,14 +78,14 @@ void basictests() {
if (initError == FAIL) {
return;
}
#endif
if (mapCSP0() == FAIL) {
strcpy(initErrorMessage,
"Could not map to memory. Dangerous to continue.\n");
LOG(logERROR, ("%s\n\n", initErrorMessage));
LOG(logERROR, (initErrorMessage));
initError = FAIL;
return;
}
#ifndef VIRTUAL
// does check only if flag is 0 (by default), set by command line
if ((!debugflag) && (!updateFlag) &&
((checkType() == FAIL) || (testFpga() == FAIL) ||
@ -101,7 +96,7 @@ void basictests() {
initError = FAIL;
return;
}
#endif
uint16_t hversion = getHardwareVersionNumber();
uint16_t hsnumber = getHardwareSerialNumber();
uint32_t ipadd = getDetectorIP();
@ -135,6 +130,7 @@ void basictests() {
(long long int)sw_fw_apiversion, requiredFirmwareVersion,
(long long int)client_sw_apiversion));
#ifndef VIRTUAL
// return if flag is not zero, debug mode
if (debugflag || updateFlag) {
return;