F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
LinuxI2cDriverStub.cpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title LinuxI2cDriver.cpp
3 // \author tcanham
4 // \brief cpp file for LinuxI2cDriver component implementation class
5 //
6 // \copyright
7 // Copyright 2009-2015, by the California Institute of Technology.
8 // ALL RIGHTS RESERVED. United States Government Sponsorship
9 // acknowledged.
10 //
11 // ======================================================================
12 
13 #include "Fw/Types/Assert.hpp"
14 #include <FpConfig.hpp>
16 
17 namespace Drv {
18 
19  // ----------------------------------------------------------------------
20  // Construction, initialization, and destruction
21  // ----------------------------------------------------------------------
22 
24  const char *const compName
25  ) : LinuxI2cDriverComponentBase(compName)
26  {
27 
28  }
29 
32  {
33 
34  }
35 
36  bool LinuxI2cDriver::open(const char* device) {
37  return true;
38  }
39 
40 
41  // ----------------------------------------------------------------------
42  // Handler implementations for user-defined typed input ports
43  // ----------------------------------------------------------------------
44 
45  // Note this port handler is guarded, so we can make the ioctl call
46 
47  I2cStatus LinuxI2cDriver ::
48  write_handler(
49  const NATIVE_INT_TYPE portNum,
50  U32 addr,
51  Fw::Buffer &serBuffer
52  )
53  {
54  return I2cStatus::I2C_OK;
55  }
56 
57  Drv::I2cStatus LinuxI2cDriver ::
58  read_handler(
59  const NATIVE_INT_TYPE portNum,
60  U32 addr,
61  Fw::Buffer &serBuffer
62  )
63  {
64  return I2cStatus::I2C_OK;
65  }
66 
67  Drv::I2cStatus LinuxI2cDriver ::
68  writeRead_handler(
69  const NATIVE_INT_TYPE portNum,
70  U32 addr,
71  Fw::Buffer &writeBuffer,
72  Fw::Buffer &readBuffer
73  ){
74  return I2cStatus::I2C_OK;
75  }
76 
77 } // end namespace Drv
bool open(const char *device)
PlatformIntType NATIVE_INT_TYPE
Definition: BasicTypes.h:55
LinuxI2cDriver(const char *const compName)
C++-compatible configuration header for fprime configuration.
Transaction okay.