Spi COM IF update #7

Merged
meierj merged 15 commits from mueller/master into master 2021-05-27 13:47:27 +02:00
2 changed files with 7 additions and 5 deletions
Showing only changes of commit f363d0fbd5 - Show all commits

View File

@ -165,13 +165,14 @@ ReturnValue_t SpiComIF::sendMessage(CookieIF *cookie, const uint8_t *sendData, s
void* funcArgs = nullptr;
spiCookie->getCallback(&sendFunc, &funcArgs);
if(sendFunc != nullptr) {
result = sendFunc(spiCookie, sendData, sendLen, funcArgs);
result = sendFunc(this, spiCookie, sendData, sendLen, funcArgs);
}
}
return result;
}
ReturnValue_t SpiComIF::performRegularSendOperation(SpiCookie *spiCookie, const uint8_t *sendData, size_t sendLen) {
ReturnValue_t SpiComIF::performRegularSendOperation(SpiCookie *spiCookie, const uint8_t *sendData,
size_t sendLen) {
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
int retval = 0;
/* Prepare transfer */
@ -265,8 +266,7 @@ ReturnValue_t SpiComIF::requestReceiveMessage(CookieIF *cookie, size_t requestLe
return NULLPOINTER;
}
bool fullDuplex = spiCookie->isFullDuplex();
if(fullDuplex) {
if(spiCookie->isFullDuplex()) {
return HasReturnvaluesIF::RETURN_OK;
}

View File

@ -9,6 +9,7 @@
#include <cstdint>
class SpiCookie;
class SpiComIF;
namespace spi {
@ -25,7 +26,8 @@ enum SpiComIfModes {
};
using send_callback_function_t = ReturnValue_t (*) (SpiCookie *cookie, const uint8_t *sendData, size_t sendLen, void* args);
using send_callback_function_t = ReturnValue_t (*) (SpiComIF* comIf, SpiCookie *cookie,
const uint8_t *sendData, size_t sendLen, void* args);
}