Spi COM IF update #7
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user