F´ Flight Software - C/C++ Documentation
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
final :
public
LinuxI2cDriverComponentBase
{
21
public
:
22
// ----------------------------------------------------------------------
23
// Construction, initialization, and destruction
24
// ----------------------------------------------------------------------
25
28
LinuxI2cDriver
(
const
char
*
const
compName);
29
30
bool
open
(
const
char
* device);
33
~LinuxI2cDriver
();
34
35
private
:
36
// ----------------------------------------------------------------------
37
// Handler implementations for user-defined typed input ports
38
// ----------------------------------------------------------------------
39
42
I2cStatus
write_handler(
const
FwIndexType
portNum,
43
U32 addr,
44
Fw::Buffer
& serBuffer);
45
48
I2cStatus
read_handler(
const
FwIndexType
portNum,
49
U32 addr,
50
Fw::Buffer
& serBuffer);
51
54
I2cStatus
writeRead_handler(
const
FwIndexType
portNum,
55
U32 addr,
56
Fw::Buffer
& writeBuffer,
57
Fw::Buffer
& readBuffer);
58
59
// Prevent unused field error when using stub
60
#ifndef STUBBED_LINUX_I2C_DRIVER
61
int
m_fd;
62
#endif
63
};
64
65
}
// end namespace Drv
66
67
#endif
Drv::LinuxI2cDriver::open
bool open(const char *device)
Definition:
LinuxI2cDriver.cpp:39
Drv::LinuxI2cDriver::LinuxI2cDriver
LinuxI2cDriver(const char *const compName)
Definition:
LinuxI2cDriver.cpp:31
Drv::LinuxI2cDriver::~LinuxI2cDriver
~LinuxI2cDriver()
Definition:
LinuxI2cDriver.cpp:33
Drv::LinuxI2cDriverComponentBase
Auto-generated base for LinuxI2cDriver component.
Definition:
LinuxI2cDriverComponentAc.hpp:22
LinuxI2cDriverComponentAc.hpp
FwIndexType
PlatformIndexType FwIndexType
Definition:
FwIndexTypeAliasAc.h:15
Drv
Definition:
ByteStreamDataPortAc.cpp:11
Fw::Buffer
Definition:
Buffer.hpp:47
Drv::I2cStatus
Definition:
I2cStatusEnumAc.hpp:16
Drv::LinuxI2cDriver
Definition:
LinuxI2cDriver.hpp:20
Drv
LinuxI2cDriver
LinuxI2cDriver.hpp
Generated by
1.8.14