started rm3100 testing
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
#include "SpiComIF.h"
|
||||
#include <OBSWConfig.h>
|
||||
|
||||
#include <linux/utility/Utility.h>
|
||||
#include <linux/spi/SpiCookie.h>
|
||||
@ -188,6 +189,18 @@ ReturnValue_t SpiComIF::sendMessage(CookieIF *cookie, const uint8_t *sendData, s
|
||||
utility::handleIoctlError("SpiComIF::sendMessage: ioctl error.");
|
||||
result = FULL_DUPLEX_TRANSFER_FAILED;
|
||||
}
|
||||
#if FSFW_LINUX_SPI_WIRETAPPING == 1
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::info << "Sent SPI data: " << std::endl;
|
||||
size_t dataLen = spiCookie->getTransferStructHandle()->len;
|
||||
uint8_t* dataPtr = reinterpret_cast<uint8_t*>(spiCookie->getTransferStructHandle()->tx_buf);
|
||||
arrayprinter::print(dataPtr, dataLen, OutputType::HEX, false);
|
||||
sif::info << "Received SPI data: " << std::endl;
|
||||
dataPtr = reinterpret_cast<uint8_t*>(spiCookie->getTransferStructHandle()->rx_buf);
|
||||
arrayprinter::print(dataPtr, dataLen, OutputType::HEX, false);
|
||||
#else
|
||||
#endif /* FSFW_CPP_OSTREAM_ENABLED == 1 */
|
||||
#endif /* FSFW_LINUX_SPI_WIRETAPPING == 1 */
|
||||
}
|
||||
else {
|
||||
/* We write with a blocking half-duplex transfer here */
|
||||
|
@ -1,9 +1,11 @@
|
||||
#ifndef LINUX_SPI_SPIDEFINITONS_H_
|
||||
#define LINUX_SPI_SPIDEFINITONS_H_
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace spi {
|
||||
|
||||
enum SpiMode {
|
||||
enum SpiMode: uint8_t {
|
||||
MODE_0,
|
||||
MODE_1,
|
||||
MODE_2,
|
||||
|
Reference in New Issue
Block a user