EIVE upstream #29
@ -102,13 +102,12 @@ ReturnValue_t I2cComIF::sendMessage(CookieIF* cookie, const uint8_t* sendData, s
|
||||
if (fileHelper.getOpenResult() != returnvalue::OK) {
|
||||
return fileHelper.getOpenResult();
|
||||
}
|
||||
int slaveFd = 0;
|
||||
result = openI2cSlave(deviceFile, i2cAddress, slaveFd);
|
||||
result = openI2cSlave(deviceFile, i2cAddress, fd);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
|
||||
if (write(slaveFd, sendData, sendLen) != static_cast<int>(sendLen)) {
|
||||
if (write(fd, sendData, sendLen) != static_cast<int>(sendLen)) {
|
||||
i2cCookie->errorCounter++;
|
||||
if (i2cCookie->errorCounter < 3) {
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
@ -161,8 +160,7 @@ ReturnValue_t I2cComIF::requestReceiveMessage(CookieIF* cookie, size_t requestLe
|
||||
if (fileHelper.getOpenResult() != returnvalue::OK) {
|
||||
return fileHelper.getOpenResult();
|
||||
}
|
||||
int slaveFd = 0;
|
||||
result = openI2cSlave(deviceFile, i2cAddress, slaveFd);
|
||||
result = openI2cSlave(deviceFile, i2cAddress, fd);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user