Author Topic: Oak and UTFT library problem - iTead S6D1121-based TFT LCD with touch  (Read 4552 times)

postuma

  • Jr. Member
  • **
  • Posts: 64
Trying to get the UTFT library to compile on Oak, for an S6D1121-based 2.4" touch-enabled TFT LCD: http://www.robotshop.com/en/2-4-tft-lcd-touch-shield-arduino.html. The current roadblock:

Code: [Select]
DefaultFonts.c:21:1: error: unknown type name 'fontdatatype' fontdatatype SmallFont[1144] PROGMEM={         
 ^
DefaultFonts.c:21:30: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'PROGMEM' fontdatatype SmallFont[1144] PROGMEM={   

I have tried declaring fontdatatype as variants on

Code: [Select]
#define fontdatatype const unsigned char
and

Code: [Select]
#define fontdatatype const uint8_t
but this hasn't worked.

Anyone have ideas? Anyone have this library working on the Oak?

I was able to resolve a similar problem

Code: [Select]
TFT/UTFT.h:206: error: ‘bitmapdatatype’ has not been declared
TFT/UTFT.h:227: error: ‘regsize’ does not name a type.
TFT/UTFT.h:228: error: 'regtype' does not name a type

by declaring them as

Code: [Select]
define regtype volatile uint8_t
#define regsize uint8_t
#define bitmapdatatype unsigned int*

btw, there is a out-of-date wiki for this LCD that I deliberately haven't linked here: it still references this unit as based on the ILI9325D, but this has been replaced by the S6D1121 controller.

PeterF

  • Hero Member
  • *****
  • Posts: 881
Re: Oak and UTFT library problem - iTead S6D1121-based TFT LCD with touch
« Reply #1 on: April 11, 2016, 08:26:06 pm »
You can fix that particular error message by defining

Code: [Select]
#define PROGMEM
#define fontdatatype const unsigned char

under the platform identification routine defines in DefaultFonts.c  (I inserted at line 15), but that then allows more errors as more of the code was then compiled. I think you're going to have major issues getting this to work, as it seems to integrate into the Arduino IDE build process a LOT!

btw, if you want to add more conditional compilation blocks but for the oak, the proper tag to use is ARDUINO_ESP8266_OAK, so #elif defined(ARDUINO_ESP8266_OAK)

Pete
« Last Edit: April 11, 2016, 08:45:54 pm by pfeerick »