Zanduino / MCP7940

Arduino Library to access the MCP7940M, MCP7940N and MCP7940x Real-Time chips
GNU General Public License v3.0
37 stars 22 forks source link

ESP8266 (Generic Module) #6

Closed ghost closed 7 years ago

ghost commented 7 years ago

MCP7940-master/MCP7940.h:176:19: error: extra qualification 'MCP7940_Class::' on member 'readRAM' [-fpermissive]

     uint8_t&  MCP7940_Class::readRAM(const uint8_t addr,T &value) {       //                                  //

               ^

MCP7940-master/MCP7940.h:190:12: error: extra qualification 'MCP7940_Class::' on member 'writeRAM' [-fpermissive]

   bool MCP7940_Class::writeRAM(const uint8_t addr, const T &value) {      // the MCP7940 SRAM                 //

        ^

exit status 1 Error compiling for board Generic ESP8266 Module.

SV-Zanshin commented 7 years ago

I opened up the example "AccessMemory.ino" (using the standard 1.8.3 IDE and also with Atmel Studio with VisualMicro installed) with the "Arduino Esplora" selected and got a good compile:

Compiling 'AccessMemory' for 'Arduino Esplora' Program size: 9,876 bytes (used 34% of a 28,672 byte maximum) (16.17 secs) Minimum Memory Usage: 477 bytes (19% of a 2560 byte maximum)

Could you try to compile that example to see if you also get an error? Also, I don't have an "Esplora8266" in my list of boards. Could you try to set the compiler options to "verbose" and see if the error message is more detailed?

SV-Zanshin commented 7 years ago

Ok, it seems that the template functions "readRAM" and "writeRAM" do not need the "MCP7940_Class::" definitions. I don't know why your compiler doesn't like them, but they are superfluous and I've removed them from the header file.

SV-Zanshin commented 7 years ago

Created Release 1.0.5a for this fix.