Go Down

Topic: noob: Shield w/ spfd5408 controller 240x320 - I don't know which library (Read 15 times) previous topic - next topic

floresta

Quote
Item 261120303957 on Ebay as per OP

That will probably be a useless link in a few weeks making this forum thread less valuable for people looking for answers in the future.  

If someone who has one of these shields can supply a part number and/or a link to the datasheet that would be much more helpful.


Don


TMGeorge

just checked my eMail and i got the same link.

So now I am quickly copying the 3 subs of the lib dir in the lib dir of my arduino-1.0.1.

I when I try both test PDEs I get an error in TFTLCD.h:

In file included from graphicstest_pde.cpp:1:
TFTLCD.h:64: error: expected class-name before '{' token
TFTLCD.h:66: error: expected `)' before 'cs'
TFTLCD.h:68: error: 'uint16_t' does not name a type
TFTLCD.h:71: error: 'uint16_t' has not been declared
...



Code: [Select]

...
#define TFTLCD_PANEL_IF_CTRL5 0x97
#define TFTLCD_PANEL_IF_CTRL6 0x98

#define TFTLCD_DELAYCMD                 0xFF

#define swap(a, b) { int16_t t = a; a = b; b = t; }
//  <- this is line 64
class TFTLCD : public Print {
public:
  TFTLCD(uint8_t cs, uint8_t cd, uint8_t wr, uint8_t rd, uint8_t reset);

  uint16_t Color565(uint8_t r, uint8_t g, uint8_t b);
...



I also wonder why the copies of the lib-h-files are in the pde folder. Shouldn't it be sufficient if they are in the lib folder?

TMGeorge

update: seems like the compiler can't figure out what/where Print is in 1.0.1.

I got it working in 1.0. But I had to make three changes.
1st deleting the h files in the PDE dir
2nd converting "void TFTLCD::write(uint8_t c)" to "size_t TFTLCD::write(uint8_t c)" in TFTLCD.cpp and .h
3rd exchange #include "WProgram.h" to #include "Arduino.h" in TFTLCD.h

Haven't checked SD slot yet

I also noticed that the Display is only fixed on one side on the shield. So it's a little loose and this is noticable when I use the touchscreen. But i think this can be easily fixed with clue or double sided tape.


Go Up