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
>
15
#include <
Drv/LinuxI2cDriver/LinuxI2cDriver.hpp
>
16
17
namespace
Drv
{
18
19
// ----------------------------------------------------------------------
20
// Construction, initialization, and destruction
21
// ----------------------------------------------------------------------
22
23
LinuxI2cDriver ::LinuxI2cDriver
(
24
const
char
*
const
compName
25
) : LinuxI2cDriverComponentBase(compName)
26
{
27
28
}
29
30
LinuxI2cDriver ::
31
~LinuxI2cDriver
()
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
Drv::LinuxI2cDriver::open
bool open(const char *device)
Definition:
LinuxI2cDriver.cpp:49
NATIVE_INT_TYPE
PlatformIntType NATIVE_INT_TYPE
Definition:
BasicTypes.h:55
Assert.hpp
Drv::LinuxI2cDriver::LinuxI2cDriver
LinuxI2cDriver(const char *const compName)
Definition:
LinuxI2cDriver.cpp:33
Drv::LinuxI2cDriver::~LinuxI2cDriver
~LinuxI2cDriver()
Definition:
LinuxI2cDriver.cpp:42
FpConfig.hpp
C++-compatible configuration header for fprime configuration.
LinuxI2cDriver.hpp
Drv
Definition:
BlockDriverComponentAc.cpp:14
Fw::Buffer
Definition:
Buffer.hpp:42
Drv::I2cStatus::I2C_OK
Transaction okay.
Definition:
I2cStatusEnumAc.hpp:32
Drv::I2cStatus
Definition:
I2cStatusEnumAc.hpp:16
Drv
LinuxI2cDriver
LinuxI2cDriverStub.cpp
Generated by
1.8.14