UniGraphic
Dependencies: SDFileSystem
Diff: Inits/TFT_MIPI.cpp
- Revision:
- 34:b10f57ccb254
- Parent:
- 11:b842b8e332cb
--- a/Inits/TFT_MIPI.cpp Sun Nov 29 19:58:47 2015 +0000 +++ b/Inits/TFT_MIPI.cpp Fri Dec 14 05:50:32 2018 +0000 @@ -15,35 +15,19 @@ -TFT_MIPI::TFT_MIPI(proto_t displayproto, PortName port, PinName CS, PinName reset, PinName DC, PinName WR, PinName RD, const char *name , unsigned int LCDSIZE_X, unsigned int LCDSIZE_Y) - : TFT(displayproto, port, CS, reset, DC, WR, RD, LCDSIZE_X, LCDSIZE_Y, name) +TFT_MIPI::TFT_MIPI(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, set mipistd flag + identify(); // will collect tftID and set mipistd flag init(); - auto_gram_read_format();// try to get read gram pixel format, could be 16bit or 18bit, RGB or BGR. Will set flags accordingly -// scrollbugfix=1; // when scrolling 1 line, the last line disappears, set to 1 to fix it, for ili9481 is set automatically in identify() + auto_gram_read_format(); set_orientation(0); - // FastWindow(true); // most but not all controllers support this, even if datasheet tells they should. Give a try cls(); locate(0,0); } -TFT_MIPI::TFT_MIPI(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) -{ - hw_reset(); //TFT class forwards to Protocol class - BusEnable(true); //TFT class forwards to Protocol class - identify(); // will collect tftID and set mipistd flag - init(); // per display custom init cmd sequence, implemented here - auto_gram_read_format();// try to get read gram pixel format, could be 16bit or 18bit, RGB or BGR. Will set flags accordingly - // scrollbugfix=1; // when scrolling 1 line, the last line disappears, set to 1 to fix it, for ili9481 is set automatically in identify() - set_orientation(0); //TFT class does for MIPI standard and some ILIxxx - // FastWindow(true); // most but not all controllers support this, even if datasheet tells they should. Give a try - cls(); - locate(0,0); -} -// reset and init the lcd controller + void TFT_MIPI::init() { /* Start Initial Sequence ----------------------------------------------------*/