F´ Flight Software - C/C++ Documentation
devel
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
#define DEBUG_PRINT 0
18
19
namespace
Drv
{
20
21
// ----------------------------------------------------------------------
22
// Construction, initialization, and destruction
23
// ----------------------------------------------------------------------
24
25
LinuxI2cDriver ::LinuxI2cDriver
(
26
const
char
*
const
compName
27
) : LinuxI2cDriverComponentBase(compName)
28
{
29
30
}
31
32
LinuxI2cDriver ::
33
~LinuxI2cDriver
()
34
{
35
36
}
37
38
bool
LinuxI2cDriver::open
(
const
char
* device) {
39
return
true
;
40
}
41
42
43
// ----------------------------------------------------------------------
44
// Handler implementations for user-defined typed input ports
45
// ----------------------------------------------------------------------
46
47
// Note this port handler is guarded, so we can make the ioctl call
48
49
I2cStatus LinuxI2cDriver ::
50
write_handler(
51
const
NATIVE_INT_TYPE
portNum,
52
U32 addr,
53
Fw::Buffer
&serBuffer
54
)
55
{
56
return
I2cStatus::I2C_OK
;
57
}
58
59
Drv::I2cStatus
LinuxI2cDriver ::
60
read_handler(
61
const
NATIVE_INT_TYPE
portNum,
62
U32 addr,
63
Fw::Buffer
&serBuffer
64
)
65
{
66
return
I2cStatus::I2C_OK
;
67
}
68
69
Drv::I2cStatus
LinuxI2cDriver ::
70
writeRead_handler(
71
const
NATIVE_INT_TYPE
portNum,
72
U32 addr,
73
Fw::Buffer
&writeBuffer,
74
Fw::Buffer
&readBuffer
75
){
76
return
I2cStatus::I2C_OK
;
77
}
78
79
}
// end namespace Drv
Assert.hpp
NATIVE_INT_TYPE
PlatformIntType NATIVE_INT_TYPE
Definition:
BasicTypes.h:55
FpConfig.hpp
C++-compatible configuration header for fprime configuration.
LinuxI2cDriver.hpp
Drv::I2cStatus
Definition:
I2cStatusEnumAc.hpp:18
Drv::I2cStatus::I2C_OK
@ I2C_OK
Transaction okay.
Definition:
I2cStatusEnumAc.hpp:32
Drv::LinuxI2cDriver::LinuxI2cDriver
LinuxI2cDriver(const char *const compName)
Definition:
LinuxI2cDriver.cpp:34
Drv::LinuxI2cDriver::open
bool open(const char *device)
Definition:
LinuxI2cDriver.cpp:50
Drv::LinuxI2cDriver::~LinuxI2cDriver
~LinuxI2cDriver()
Definition:
LinuxI2cDriver.cpp:43
Fw::Buffer
Definition:
Buffer.hpp:43
Drv
Definition:
BlockDriverComponentAc.cpp:14
Drv
LinuxI2cDriver
LinuxI2cDriverStub.cpp
Generated by
1.9.1