jungfrau with the option to start in debug mode to bypass the checks and tests

This commit is contained in:
Dhanya Maliakal
2017-09-20 16:20:39 +02:00
parent 092487c08e
commit 862169e178
7 changed files with 27 additions and 10 deletions

View File

@ -25,11 +25,17 @@ int32_t clkPhase[2] = {0, 0};
/* basic tests */
void checkFirmwareCompatibility() {
void checkFirmwareCompatibility(int flag) {
defineGPIOpins();
resetFPGA();
if ((mapCSP0() == FAIL) || (checkType() == FAIL) || (testFpga() == FAIL) || (testBus() == FAIL)) {
if (mapCSP0() == FAIL) {
cprintf(BG_RED, "Dangerous to continue. Goodbye!\n");
exit(EXIT_FAILURE);
}
// does check only if flag is 0 (by default), set by command line
if ((!flag) && ((checkType() == FAIL) || (testFpga() == FAIL) || (testBus() == FAIL))) {
cprintf(BG_RED, "Dangerous to continue. Goodbye!\n");
exit(EXIT_FAILURE);
}