fprime/Drv/LinuxI2cDriver/LinuxI2cDriverStub.cpp
M Starch b76d8c9a0c
Update/types refactor as constants (#1623)
* lestarch: adding logical types implementation into Linux/StandardTypes.hpp

* lestarch: removing VxWorks StandardTypes from repository

* updated fprime types for correct compilation with vxworks and baremetal

* lestarch: refactoring types and configuration header w.r.t type design

* lestarch: replacing usages of AssertArg with FwAssertArgType

* lestarch: missspelled configuration

* lestarch: minor compilation fixes

* lestarch: renaming StandardTypes.hpp -> PlatformTypes.hpp

* lestarch: updating PRI tokens

* lestarch: replacing BasicTypes.hpp includes with FpConfig.hpp

* lestarch: UT and compilation fixes for types refactor

* lestarch: sp

* lestarch: fixing RPI issues in PassiveConsoleTextLogger

* lestarch: converting RPI build to debug

* lestarch: removing duplicate config imports

* lestarch: fixing documentation

* lestarch: fixing up multiple definitions and RPI compilation problems

* lestarch: reverting debug build

* lestarch: reverting platform types to class-based constants

* lestarch: reworking basic types

* lestarch: configured types refactor into classes

* lestarch: fixing bugs with static constants in classes

* lestarch: fixing platform types spelling and documentation

* lestarch: adding include guards to types headers

Co-authored-by: Kevin F Ortega <kevin.f.ortega@jpl.nasa.gov>
2022-08-18 13:25:56 -07:00

88 lines
2.0 KiB
C++

// ======================================================================
// \title LinuxI2cDriver.cpp
// \author tcanham
// \brief cpp file for LinuxI2cDriver component implementation class
//
// \copyright
// Copyright 2009-2015, by the California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#include "Fw/Types/Assert.hpp"
#include <FpConfig.hpp>
#include <Drv/LinuxI2cDriver/LinuxI2cDriver.hpp>
#define DEBUG_PRINT 0
namespace Drv {
// ----------------------------------------------------------------------
// Construction, initialization, and destruction
// ----------------------------------------------------------------------
LinuxI2cDriver ::LinuxI2cDriver(
const char *const compName
) : LinuxI2cDriverComponentBase(compName)
{
}
void LinuxI2cDriver ::
init(
const NATIVE_INT_TYPE instance
)
{
LinuxI2cDriverComponentBase::init(instance);
}
LinuxI2cDriver ::
~LinuxI2cDriver()
{
}
bool LinuxI2cDriver::open(const char* device) {
return true;
}
// ----------------------------------------------------------------------
// Handler implementations for user-defined typed input ports
// ----------------------------------------------------------------------
// Note this port handler is guarded, so we can make the ioctl call
I2cStatus LinuxI2cDriver ::
write_handler(
const NATIVE_INT_TYPE portNum,
U32 addr,
Fw::Buffer &serBuffer
)
{
return I2cStatus::I2C_OK;
}
Drv::I2cStatus LinuxI2cDriver ::
read_handler(
const NATIVE_INT_TYPE portNum,
U32 addr,
Fw::Buffer &serBuffer
)
{
return I2cStatus::I2C_OK;
}
Drv::I2cStatus LinuxI2cDriver ::
writeRead_handler(
const NATIVE_INT_TYPE portNum, /*!< The port number*/
U32 addr,
Fw::Buffer &writeBuffer,
Fw::Buffer &readBuffer
){
return I2cStatus::I2C_OK;
}
} // end namespace Drv