F´ Flight Software - C/C++ Documentation
devel
A framework for building embedded system applications to NASA flight quality standards.
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
z
Functions
a
b
c
d
g
h
i
m
o
p
r
s
t
v
w
Variables
Typedefs
a
b
c
d
e
f
g
h
l
o
p
r
s
t
u
w
Enumerations
Enumerator
a
b
c
f
h
i
n
o
p
s
v
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
~
Functions
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
~
Variables
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
w
Typedefs
c
e
s
t
u
w
Enumerations
b
c
d
g
h
m
o
q
s
t
u
w
Enumerator
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Related Symbols
a
b
c
d
f
g
h
l
p
r
s
t
u
Files
File List
File Members
All
_
a
b
c
d
f
g
h
i
l
m
n
p
r
s
t
u
v
Functions
c
i
m
p
s
u
Variables
_
b
c
f
i
l
p
r
s
Typedefs
b
c
f
i
n
p
s
u
Enumerations
Enumerator
a
b
c
d
f
g
h
p
r
s
t
Macros
_
a
c
d
f
g
h
i
l
m
p
r
s
t
u
v
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Loading...
Searching...
No Matches
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
void
LinuxI2cDriver ::
33
init(
34
const
NATIVE_INT_TYPE
instance
35
)
36
{
37
LinuxI2cDriverComponentBase::init
(instance);
38
}
39
40
LinuxI2cDriver ::
41
~LinuxI2cDriver()
42
{
43
44
}
45
46
bool
LinuxI2cDriver::open
(
const
char
* device) {
47
return
true
;
48
}
49
50
51
// ----------------------------------------------------------------------
52
// Handler implementations for user-defined typed input ports
53
// ----------------------------------------------------------------------
54
55
// Note this port handler is guarded, so we can make the ioctl call
56
57
I2cStatus LinuxI2cDriver ::
58
write_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
read_handler(
69
const
NATIVE_INT_TYPE
portNum,
70
U32 addr,
71
Fw::Buffer
&serBuffer
72
)
73
{
74
return
I2cStatus::I2C_OK
;
75
}
76
77
Drv::I2cStatus
LinuxI2cDriver ::
78
writeRead_handler(
79
const
NATIVE_INT_TYPE
portNum,
80
U32 addr,
81
Fw::Buffer
&writeBuffer,
82
Fw::Buffer
&readBuffer
83
){
84
return
I2cStatus::I2C_OK
;
85
}
86
87
}
// end namespace Drv
Assert.hpp
NATIVE_INT_TYPE
PlatformIntType NATIVE_INT_TYPE
Definition
BasicTypes.h:51
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::open
bool open(const char *device)
Definition
LinuxI2cDriver.cpp:58
Fw::Buffer
Definition
Buffer.hpp:43
Fw::ObjBase::init
void init()
Object initializer.
Definition
ObjBase.cpp:27
Drv
Definition
BlockDriverComponentAc.cpp:15
Drv
LinuxI2cDriver
LinuxI2cDriverStub.cpp
Generated by
1.10.0