Basically i glued Peter Drescher and Simon Ford libs in a GraphicsDisplay class, then derived TFT or LCD class (which inherits Protocols class), then the most derived ones (Inits), which are per-display and are the only part needed to be adapted to diff hw.
Dependents: afero_poc15_180216 afero_poc15_180223 afero_poc15_180302 afero_poc15_180403R ... more
Fork of UniGraphic by
UniGraphic for La Suno Version.
To go with La Suno, WatchDog Reset functions were added in ILI9341.
Diff: Inits/ILI9341.cpp
- Revision:
- 21:ae0a4eedfc90
- Parent:
- 11:b842b8e332cb
- Child:
- 34:1a148973febe
--- a/Inits/ILI9341.cpp Mon Mar 23 14:08:04 2015 +0000 +++ b/Inits/ILI9341.cpp Tue Mar 31 21:14:48 2015 +0000 @@ -29,6 +29,19 @@ FastWindow(true); // most but not all controllers support this, even if datasheet tells they should. locate(0,0); } +ILI9341::ILI9341(proto_t displayproto, PinName* buspins, PinName CS, PinName reset, PinName DC, PinName WR, PinName RD, const char *name, unsigned int LCDSIZE_X, unsigned int LCDSIZE_Y) + : TFT(displayproto, buspins, CS, reset, DC, WR, RD, LCDSIZE_X, LCDSIZE_Y, name) +{ + hw_reset(); + BusEnable(true); + identify(); // will collect tftID and set mipistd flag + init(); + auto_gram_read_format(); + set_orientation(0); + cls(); + FastWindow(true); // most but not all controllers support this, even if datasheet tells they should. + locate(0,0); +} ILI9341::ILI9341(proto_t displayproto, int Hz, PinName mosi, PinName miso, PinName sclk, PinName CS, PinName reset, PinName DC, const char *name, unsigned int LCDSIZE_X , unsigned int LCDSIZE_Y) : TFT(displayproto, Hz, mosi, miso, sclk, CS, reset, DC, LCDSIZE_X, LCDSIZE_Y, name) {