mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-29 17:40:01 +02:00
wip
This commit is contained in:
parent
dfa6f18ba3
commit
fb271e3a86
@ -178,7 +178,7 @@ int getDrive(char *mess) {
|
|||||||
|
|
||||||
strcpy(flashDriveName, "/dev/");
|
strcpy(flashDriveName, "/dev/");
|
||||||
strcat(flashDriveName, pch);
|
strcat(flashDriveName, pch);
|
||||||
LOG(logINFO, ("Flash drive found: %s\n", flashDriveName));
|
LOG(logINFO, ("\tFlash drive found: %s\n", flashDriveName));
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -206,7 +206,7 @@ int openFileForFlash(FILE **flashfd, FILE **srcfd, char *mess) {
|
|||||||
LOG(logERROR, (mess));
|
LOG(logERROR, (mess));
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
LOG(logINFO, ("Flash ready for writing\n"));
|
LOG(logINFO, ("\tFlash ready for writing\n"));
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -226,7 +226,7 @@ int eraseFlash(char *mess) {
|
|||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG(logINFO, ("Flash erased\n"));
|
LOG(logINFO, ("\tFlash erased\n"));
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -264,7 +264,7 @@ int writeToFlash(FILE *flashfd, FILE *srcfd, char *mess) {
|
|||||||
}
|
}
|
||||||
fclose(flashfd);
|
fclose(flashfd);
|
||||||
fclose(srcfd);
|
fclose(srcfd);
|
||||||
LOG(logINFO, ("Wrote %ld bytes to flash\n", totalBytes));
|
LOG(logINFO, ("\tWrote %ld bytes to flash\n", totalBytes));
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -308,6 +308,6 @@ int waitForFPGAtoTouchFlash(char* mess) {
|
|||||||
}
|
}
|
||||||
LOG(logDEBUG1, ("gpi07 returned %d\n", result));
|
LOG(logDEBUG1, ("gpi07 returned %d\n", result));
|
||||||
}
|
}
|
||||||
LOG(logINFO, ("FPGA has picked up the program from flash\n"));
|
LOG(logINFO, ("\tFPGA has picked up the program from flash\n"));
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
@ -3799,10 +3799,9 @@ int program_fpga(int file_des) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
char cmd[MAX_STR_LENGTH] = {0};
|
|
||||||
char retvals[MAX_STR_LENGTH] = {0};
|
char retvals[MAX_STR_LENGTH] = {0};
|
||||||
strcpy(cmd, "ls -lrt /var/tmp/");
|
if (FAIL ==
|
||||||
if (FAIL == executeCommand(cmd, retvals, logDEBUG1)) {
|
executeCommand("ls -lrt /var/tmp/", retvals, logDEBUG1)) {
|
||||||
sprintf(
|
sprintf(
|
||||||
mess,
|
mess,
|
||||||
"Could not program fpga. (could not delete old file: %s)",
|
"Could not program fpga. (could not delete old file: %s)",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user