F´ Flight Software - C/C++ Documentation
devel
A framework for building embedded system applications to NASA flight quality standards.
LinuxI2cDriver.hpp
Go to the documentation of this file.
1
// ======================================================================
2
// \title LinuxI2cDriver.hpp
3
// \author tcanham
4
// \brief hpp 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
#ifndef LinuxI2cDriver_HPP
14
#define LinuxI2cDriver_HPP
15
16
#include "
Drv/LinuxI2cDriver/LinuxI2cDriverComponentAc.hpp
"
17
18
namespace
Drv
{
19
20
class
LinuxI2cDriver
:
21
public
LinuxI2cDriverComponentBase
22
{
23
24
public
:
25
26
// ----------------------------------------------------------------------
27
// Construction, initialization, and destruction
28
// ----------------------------------------------------------------------
29
32
LinuxI2cDriver
(
const
char
*
const
compName);
33
34
bool
open
(
const
char
* device);
37
~LinuxI2cDriver
();
38
39
PRIVATE:
40
41
// ----------------------------------------------------------------------
42
// Handler implementations for user-defined typed input ports
43
// ----------------------------------------------------------------------
44
47
I2cStatus
write_handler(
48
const
NATIVE_INT_TYPE
portNum,
49
U32 addr,
50
Fw::Buffer
&serBuffer
51
);
52
55
I2cStatus
read_handler(
56
const
NATIVE_INT_TYPE
portNum,
57
U32 addr,
58
Fw::Buffer
&serBuffer
59
);
60
63
I2cStatus
writeRead_handler(
64
const
NATIVE_INT_TYPE
portNum,
65
U32 addr,
66
Fw::Buffer
&writeBuffer,
67
Fw::Buffer
&readBuffer
68
);
69
70
// Prevent unused field error when using stub
71
#ifndef STUBBED_LINUX_I2C_DRIVER
72
NATIVE_INT_TYPE
m_fd;
73
#endif
74
};
75
76
}
// end namespace Drv
77
78
#endif
NATIVE_INT_TYPE
PlatformIntType NATIVE_INT_TYPE
Definition:
BasicTypes.h:55
LinuxI2cDriverComponentAc.hpp
Drv::I2cStatus
Definition:
I2cStatusEnumAc.hpp:18
Drv::LinuxI2cDriverComponentBase
Auto-generated base for LinuxI2cDriver component.
Definition:
LinuxI2cDriverComponentAc.hpp:24
Drv::LinuxI2cDriver
Definition:
LinuxI2cDriver.hpp:22
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
LinuxI2cDriver.hpp
Generated by
1.9.1