fprime/Drv/LinuxSpiDriver/LinuxSpiDriverComponentImplStub.cpp
djbyrne17 9fbf5800ab
Update Spi component to return a status on device access (#4452)
* Update Spi component to return a status on device access

* Format LinuxSpiDriver files and update comments from TODO to DEPRECATED

* Add assertions to LinuxSpiDriver

* Add assertions to LinuxSpiDriver

---------

Co-authored-by: djbyrne <djbyrne@jpl.nasa.gov>
2025-12-02 10:42:06 -08:00

40 lines
1.6 KiB
C++

// ======================================================================
// \title LinuxSpiDriverImpl.cpp
// \author tcanham
// \brief cpp file for LinuxSpiDriver component implementation class
//
// \copyright
// Copyright 2009-2015, by the California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#include <Drv/LinuxSpiDriver/LinuxSpiDriverComponentImpl.hpp>
#include <Fw/FPrimeBasicTypes.hpp>
namespace Drv {
bool LinuxSpiDriverComponentImpl::open(FwIndexType device, FwIndexType select, SpiFrequency clock, SpiMode spiMode) {
return false;
}
// ----------------------------------------------------------------------
// Handler implementations for user-defined typed input ports
// ----------------------------------------------------------------------
SpiStatus LinuxSpiDriverComponentImpl::SpiWriteRead_handler(const FwIndexType portNum,
Fw::Buffer& WriteBuffer,
Fw::Buffer& readBuffer) {
return SpiStatus::SPI_OK;
}
// @ DEPRECATED: Use SpiWriteRead port instead (same operation with a return value)
void LinuxSpiDriverComponentImpl::SpiReadWrite_handler(const FwIndexType portNum,
Fw::Buffer& WriteBuffer,
Fw::Buffer& readBuffer) {}
LinuxSpiDriverComponentImpl::~LinuxSpiDriverComponentImpl() {}
} // end namespace Drv