I've got this library for communicating with the MAX7456 chip.
The library is abandoned and the only one I found that actually works, so I'd really like to use it.
It compiles fine with Arduino IDE 1.0.5, but not with Arduino IDE 1.6.6 .
This happens with 1.6.6, I tried to fix it but I only made it worse.
Arduino: 1.6.6 Hourly Build 2015年07月03日 10:26 (Linux), Board: "Arduino Nano, ATmega328"
Using library SPI at version 1.0.0 in folder: /home/t/Dropbox/Arduino-IDE/hardware/arduino/avr/libraries/SPI
Using library max7456 in folder: /home/t/Dropbox/Arduino/libraries/max7456 (legacy)
/home/t/Dropbox/Arduino-IDE/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10606 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I/home/t/Dropbox/Arduino-IDE/hardware/arduino/avr/cores/arduino -I/home/t/Dropbox/Arduino-IDE/hardware/arduino/avr/variants/eightanaloginputs -I/home/t/Dropbox/Arduino-IDE/hardware/arduino/avr/libraries/SPI -I/home/t/Dropbox/Arduino/libraries/max7456 /tmp/build4912026784583215357.tmp/sketch/HelloWorld.cpp -o /tmp/build4912026784583215357.tmp/sketch/HelloWorld.cpp.o
In file included from HelloWorld.ino:2:0:
/home/t/Dropbox/Arduino/libraries/max7456/max7456.h:228:40: error: 'prog_uchar' does not name a type
static void getCARACFromProgMem(const prog_uchar *table, byte i,charact c);
^
/home/t/Dropbox/Arduino/libraries/max7456/max7456.h:228:52: error: ISO C++ forbids declaration of 'table' with no type [-fpermissive]
static void getCARACFromProgMem(const prog_uchar *table, byte i,charact c);
^
Error compiling.
How would one make the library compatible with 1.6.6?
1 Answer 1
In the file max7456.h at line 228 change it from:
static void getCARACFromProgMem(const prog_uchar *table, byte i,charact c);
to:
static void getCARACFromProgMem(const char *table, byte i,charact c);
In the file max7456.cpp at line 484 change it from:
void Max7456::getCARACFromProgMem(const prog_uchar *table, byte i, charact car)
to:
void Max7456::getCARACFromProgMem(const char *table, byte i, charact car)
Then it compiles OK (under 1.6.4 at least).
-
The character map updating code does not work, but that is not a major flaw.Avamander– Avamander2015年08月13日 17:04:52 +00:00Commented Aug 13, 2015 at 17:04