some remaining low-level issue..
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
This commit is contained in:
parent
083b4e61ad
commit
e3dc1c9a74
@ -463,15 +463,14 @@ class TcFlashFopen : public mpsoc::TcBase {
|
|||||||
|
|
||||||
ReturnValue_t setPayload(std::string filename, uint8_t mode) {
|
ReturnValue_t setPayload(std::string filename, uint8_t mode) {
|
||||||
accessMode = mode;
|
accessMode = mode;
|
||||||
size_t nameSize = filename.size();
|
|
||||||
spParams.setFullPayloadLen(FILENAME_FIELD_SIZE + CRC_SIZE);
|
|
||||||
ReturnValue_t result = checkPayloadLen();
|
ReturnValue_t result = checkPayloadLen();
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
std::memset(payloadStart, 0, FILENAME_FIELD_SIZE);
|
std::memset(payloadStart, 0, FILENAME_FIELD_SIZE);
|
||||||
std::memcpy(payloadStart, filename.c_str(), nameSize);
|
std::memcpy(payloadStart, filename.c_str(), filename.size());
|
||||||
payloadStart[256] = accessMode;
|
payloadStart[FILENAME_FIELD_SIZE] = accessMode;
|
||||||
|
spParams.setFullPayloadLen(FILENAME_FIELD_SIZE + 1 + CRC_SIZE);
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -581,15 +580,6 @@ class TcFlashRead : public TcBase {
|
|||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
updateSpFields();
|
|
||||||
result = checkSizeAndSerializeHeader();
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
result = calcAndSetCrc();
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
readSize = readLen;
|
readSize = readLen;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user