adaptions for spi callback

This commit is contained in:
Martin Zietz
2021-06-21 14:49:20 +02:00
parent 457afca582
commit e3ddb8b3ba
4 changed files with 17 additions and 2 deletions

View File

@ -147,9 +147,13 @@ ReturnValue_t I2cComIF::requestReceiveMessage(CookieIF *cookie,
uint8_t* replyBuffer = i2cDeviceMapIter->second.replyBuffer.data();
int readLen = read(fd, replyBuffer, requestLen);
<<<<<<< Updated upstream
if (readLen != static_cast<int>(requestLen)) {
#if FSFW_VERBOSE_LEVEL >= 1 and FSFW_CPP_OSTREAM_ENABLED == 1
=======
if (readLen != static_cast<int>(requestLen)) {
>>>>>>> Stashed changes
sif::error << "I2cComIF::requestReceiveMessage: Reading from I2C "
<< "device failed with error code " << errno <<". Description"
<< " of error: " << strerror(errno) << std::endl;
@ -157,6 +161,7 @@ ReturnValue_t I2cComIF::requestReceiveMessage(CookieIF *cookie,
<< requestLen << " bytes" << std::endl;
#endif
i2cDeviceMapIter->second.replyLen = 0;
sif::debug << "I2cComIF::requestReceiveMessage: Read " << readLen << " of " << requestLen << " bytes" << std::endl;
return HasReturnvaluesIF::RETURN_FAILED;
}