Commanders
Arduino buttons/bus library
I2CCommander.hpp
1
//-------------------------------------------------------------------
2
#ifndef __i2cCommander_H__
3
#define __i2cCommander_H__
4
//-------------------------------------------------------------------
5
6
#include <
Commanders.h
>
7
8
#ifndef NO_I2CCOMMANDER
9
#ifdef VISUALSTUDIO
10
#include "Wire.hpp"
11
#else
12
#include <Wire.h>
13
#endif
14
15
#define I2CCommander I2CCommanderClass::GetCurrent()
16
37
class
I2CCommanderClass
:
Commander
38
{
39
private
:
40
uint8_t I2CSlaveId;
41
static
I2CCommanderClass
*pI2cCommander;
42
43
public
:
45
inline
I2CCommanderClass
() :
Commander
() {}
46
50
void
begin
(uint8_t inI2CSlaveID);
51
53
unsigned
long
loop
();
54
55
public
:
59
static
inline
I2CCommanderClass
&
GetCurrent
()
60
{
61
if
(pI2cCommander == NULL)
62
pI2cCommander =
new
I2CCommanderClass
();
63
64
return
*(I2CCommanderClass::pI2cCommander);
65
}
66
#ifdef COMMANDERS_PRINT_COMMANDERS
67
70
void
printCommander
();
71
#endif
72
};
73
74
//-------------------------------------------------------------------
75
#endif
76
#endif
77
//-------------------------------------------------------------------
I2CCommanderClass::printCommander
void printCommander()
Definition:
I2CCommander.cpp:76
I2CCommanderClass::GetCurrent
static I2CCommanderClass & GetCurrent()
Definition:
I2CCommander.hpp:59
I2CCommanderClass::I2CCommanderClass
I2CCommanderClass()
Definition:
I2CCommander.hpp:45
I2CCommanderClass::begin
void begin(uint8_t inI2CSlaveID)
Definition:
I2CCommander.cpp:55
Commander
Definition:
Commander.hpp:29
I2CCommanderClass
Definition:
I2CCommander.hpp:37
I2CCommanderClass::loop
unsigned long loop()
Definition:
I2CCommander.cpp:63
Commanders.h
src
I2CCommander.hpp
Generated on mer. juin 19 2019 16:15:59 for Commanders by
1.2.10