F´ Flight Software - C/C++ Documentation
NASA-v1.6.0
A framework for building embedded system applications to NASA flight quality standards.
Loading...
Searching...
No Matches
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
36
void
init
(
37
const
NATIVE_INT_TYPE
instance = 0
38
);
39
40
bool
open
(
const
char
* device);
43
~LinuxI2cDriver
();
44
45
PRIVATE:
46
47
// ----------------------------------------------------------------------
48
// Handler implementations for user-defined typed input ports
49
// ----------------------------------------------------------------------
50
53
I2cStatus write_handler(
54
const
NATIVE_INT_TYPE
portNum,
55
U32 addr,
56
Fw::Buffer
&serBuffer
57
);
58
61
I2cStatus read_handler(
62
const
NATIVE_INT_TYPE
portNum,
63
U32 addr,
64
Fw::Buffer
&serBuffer
65
);
66
69
I2cStatus writeRead_handler(
70
const
NATIVE_INT_TYPE
portNum,
71
U32 addr,
72
Fw::Buffer
&writeBuffer,
73
Fw::Buffer
&readBuffer
74
);
75
76
// Prevent unused field error when using stub
77
#ifndef STUBBED_LINUX_I2C_DRIVER
78
NATIVE_INT_TYPE
m_fd;
79
#endif
80
};
81
82
}
// end namespace Drv
83
84
#endif
NATIVE_INT_TYPE
PlatformIntType NATIVE_INT_TYPE
Definition
BasicTypes.h:51
Drv::LinuxI2cDriver
Definition
LinuxI2cDriver.hpp:22
Drv::LinuxI2cDriver::open
bool open(const char *device)
Definition
LinuxI2cDriver.cpp:58
Drv::LinuxI2cDriver::~LinuxI2cDriver
~LinuxI2cDriver()
Definition
LinuxI2cDriver.cpp:51
Drv::LinuxI2cDriver::init
void init(const NATIVE_INT_TYPE instance=0)
Definition
LinuxI2cDriver.cpp:43
Fw::Buffer
Definition
Buffer.hpp:43
Drv
Definition
BlockDriver.hpp:11
Drv
LinuxI2cDriver
LinuxI2cDriver.hpp
Generated by
1.9.7