Spi COM IF update #7
@ -165,13 +165,14 @@ ReturnValue_t SpiComIF::sendMessage(CookieIF *cookie, const uint8_t *sendData, s
|
|||||||
void* funcArgs = nullptr;
|
void* funcArgs = nullptr;
|
||||||
spiCookie->getCallback(&sendFunc, &funcArgs);
|
spiCookie->getCallback(&sendFunc, &funcArgs);
|
||||||
if(sendFunc != nullptr) {
|
if(sendFunc != nullptr) {
|
||||||
result = sendFunc(spiCookie, sendData, sendLen, funcArgs);
|
result = sendFunc(this, spiCookie, sendData, sendLen, funcArgs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
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;
|
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
||||||
int retval = 0;
|
int retval = 0;
|
||||||
/* Prepare transfer */
|
/* Prepare transfer */
|
||||||
@ -265,8 +266,7 @@ ReturnValue_t SpiComIF::requestReceiveMessage(CookieIF *cookie, size_t requestLe
|
|||||||
return NULLPOINTER;
|
return NULLPOINTER;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool fullDuplex = spiCookie->isFullDuplex();
|
if(spiCookie->isFullDuplex()) {
|
||||||
if(fullDuplex) {
|
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return HasReturnvaluesIF::RETURN_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
class SpiCookie;
|
class SpiCookie;
|
||||||
|
class SpiComIF;
|
||||||
|
|
||||||
namespace spi {
|
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);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user