I have successfully used the MCP23017-RK
library with a simple program. However, I would like to create some high level functionality on top of it with my own C++ class. However, I am having trouble getting the very basic declaration to compile. The error message I receive is
In file included from ../wiring/inc/spark_wiring_fuel.h:33,
from ./inc/application.h:47,
from ./inc/Particle.h:5,
from /Users/name/src/NewBusFirmware.cpp:5:
../wiring/inc/spark_wiring_i2c.h:149:14: error: '__fetch_global_Wire' is not a type
My C++ class looks like the following:
#ifndef __NAND7400_H
#define __NAND7400_H
#include "MCP23017-RK.h"
#include "Particle.h"
#include "application.h"
class NAND7400 {
private:
MCP23017 data(Wire, 0); // offending line, which is fine when declared in a c function
public:
NAND7400();
};
#endif
Any thoughts would be greatly appreciated.