Problems with adapting library for Z-Uno
Posted: 14 Mar 2017 10:13
Hi,
I am trying to adapt the Adafruit_RGBLCDShield library to work with the Z-Uno, using the ZUNO_MCP23017 library (which seems to be based on the Adafruit one). However, I get the following error when compiling:
Compiling file "/var/folders/vw/4dbt13s178163k4kvrch0lt40000gn/T/build509803355726088525.tmp/
ZUNO_RGBLCDShieldNoButtons_ucxx.c" by means of SDCC...
/var/folders/vw/4dbt13s178163k4kvrch0lt40000gn/T/build509803355726088525.tmp/
ZUNO_RGBLCDShieldNoButtons_ucxx.c:320: error 200: field '_i2c' has incomplete type
The related code snippets are are:
ZUNO_RGBLCDShieldNoButtons.h
And in ZUNO_RGBLCDShieldNoButtons_ucxx.c
The error message refers to the last line above. (Using Z-Uno 2.0.8 on Mac OS X 10.12.3). The library compiles just fine for other HW.
What am I missing here?
Thanks in advance,
Casper
I am trying to adapt the Adafruit_RGBLCDShield library to work with the Z-Uno, using the ZUNO_MCP23017 library (which seems to be based on the Adafruit one). However, I get the following error when compiling:
Compiling file "/var/folders/vw/4dbt13s178163k4kvrch0lt40000gn/T/build509803355726088525.tmp/
ZUNO_RGBLCDShieldNoButtons_ucxx.c" by means of SDCC...
/var/folders/vw/4dbt13s178163k4kvrch0lt40000gn/T/build509803355726088525.tmp/
ZUNO_RGBLCDShieldNoButtons_ucxx.c:320: error 200: field '_i2c' has incomplete type
The related code snippets are are:
ZUNO_RGBLCDShieldNoButtons.h
Code: Select all
ZUNO_MCP23017 _i2c;
Code: Select all
//class ZUNO_MCP23017 DECLARATION
//--------------------------------------------------------------------------------
typedef struct cxx__class__ZUNO_MCP23017_s
{
unsigned char i2caddr;
}cxx__class__ZUNO_MCP23017;
//--------------------------------------------------------------------------------
//class ZUNO_RGBLCDShieldNoButtons DECLARATION
//--------------------------------------------------------------------------------
typedef struct cxx__class__ZUNO_RGBLCDShieldNoButtons_s
{
void ** __cxx__vmethod__table;
int write_error;
unsigned char _rs_pin;
unsigned char _rw_pin;
unsigned char _enable_pin;
unsigned char _data_pins[8];
unsigned char _displayfunction;
unsigned char _displaycontrol;
unsigned char _displaymode;
unsigned char _initialized;
unsigned char _numlines;
unsigned char _currline;
unsigned char _i2cAddr;
struct cxx__class__ZUNO_MCP23017 _i2c;
}cxx__class__ZUNO_RGBLCDShieldNoButtons;
What am I missing here?
Thanks in advance,
Casper