Hubo Library

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
hubocfg.h
Go to the documentation of this file.
1 #ifndef HUBOCFG_H
2 #define HUBOCFG_H
3
4
5 #ifndef MAX_MCP23017_SLAVES
6 #define MAX_MCP23017_SLAVES (7)
7 #endif
8
9
10 namespace HuboLib
11 {
23 class SPI_Config
24 {
25 public:
26 SPI_Config();
27
28 char* m_pMCP3x08Device; // e.g. "/dev/spidev0.1" for choosing CS1
29 };
30 extern SPI_Config g_SPIConfig;
31
32
40 class I2C_Config
41 {
42 public:
43 I2C_Config();
44
45 unsigned char m_MCP23017DeviceAddress; // e.g. 0x20
46 unsigned char m_MCP23017SlaveDeviceAddressList[MAX_MCP23017_SLAVES]; // The list of I2C addresses to check for I2C slaves e.g. 0x21, 0x22 ...
47 unsigned short m_MCP23017SlaveCycleTickDivider; // e.g. 1 for each call (default), 2 for every 2nd call 3 for every 3rd call...
48 const char* m_sI2CDevice; // Raspberry Pi uses "/dev/i2c-1", Banana Pi uses "/dev/i2c-0"
49 };
50 extern I2C_Config g_I2CConfig;
51
52
59 class W1_Config
60 {
61 public:
62 W1_Config();
63
64 char* m_pW1DeviceRootPath; // e.g. "/sys/bus/w1/devices"
65 };
66 extern W1_Config g_W1Config;
67
68 } // namespace HuboLib
69
70
71 namespace BCM2835
72 {
81 class BCM2835_Config
82 {
83 public:
84 BCM2835_Config();
85
86 bool m_bUseMutexProtection; // If set to true then all access to BCM2835 functions are protected by a mutex.
87 };
88 extern BCM2835_Config g_bcm2835Config;
89
90 } // namespace BCM2835
91
92 #endif // HUBOCFG_H
93
HuboLib::I2C_Config::m_sI2CDevice
const char * m_sI2CDevice
Definition: hubocfg.h:48
HuboLib::I2C_Config::m_MCP23017DeviceAddress
unsigned char m_MCP23017DeviceAddress
Definition: hubocfg.h:45
HuboLib::W1_Config::m_pW1DeviceRootPath
char * m_pW1DeviceRootPath
Definition: hubocfg.h:64
HuboLib::SPI_Config::SPI_Config
SPI_Config()
BCM2835::g_bcm2835Config
BCM2835_Config g_bcm2835Config
HuboLib::I2C_Config::m_MCP23017SlaveCycleTickDivider
unsigned short m_MCP23017SlaveCycleTickDivider
Definition: hubocfg.h:47
HuboLib::SPI_Config::m_pMCP3x08Device
char * m_pMCP3x08Device
Definition: hubocfg.h:28
MAX_MCP23017_SLAVES
#define MAX_MCP23017_SLAVES
Definition: hubocfg.h:6
BCM2835::BCM2835_Config::m_bUseMutexProtection
bool m_bUseMutexProtection
Definition: hubocfg.h:86
HuboLib::I2C_Config::I2C_Config
I2C_Config()
HuboLib::I2C_Config
Use to configure I2C specific parameters.
Definition: hubocfg.h:40
HuboLib::g_SPIConfig
SPI_Config g_SPIConfig
HuboLib::g_I2CConfig
I2C_Config g_I2CConfig
HuboLib::I2C_Config::m_MCP23017SlaveDeviceAddressList
unsigned char m_MCP23017SlaveDeviceAddressList[MAX_MCP23017_SLAVES]
Definition: hubocfg.h:46
BCM2835::BCM2835_Config::BCM2835_Config
BCM2835_Config()
HuboLib::SPI_Config
Use to configure SPI specific parameters.
Definition: hubocfg.h:23
BCM2835::BCM2835_Config
Use to configure BCM2835 specific parameters.
Definition: hubocfg.h:81
HuboLib::g_W1Config
W1_Config g_W1Config
HuboLib::W1_Config
Use to configure 1wire specific parameters.
Definition: hubocfg.h:59
BCM2835
Definition: hubocfg.h:71
HuboLib::W1_Config::W1_Config
W1_Config()
HuboLib
Definition: hubocfg.h:10