TFT driver for ILI9341. I imported this library from Seeed-Studio-28-TFT-Touch-Shield-V20.
Dependents: TFT_sdcard TS_Eyes Tokei AfficheurTFTAdafruit ... more
Fork of SPI_TFT_ILI9341 by
Diff: SPI_TFT_ILI9341.cpp
- Revision:
- 10:61fa73a34834
- Parent:
- 8:32bf76e1ec9f
--- a/SPI_TFT_ILI9341.cpp Tue May 06 18:09:00 2014 +0000 +++ b/SPI_TFT_ILI9341.cpp Fri Oct 31 01:11:48 2014 +0000 @@ -108,7 +108,8 @@ void SPI_TFT_ILI9341::tft_reset() { _spi.format(8,3); // 8 bit spi mode 3 - _spi.frequency(10000000); // 10 Mhz SPI clock + _spi.frequency(10000000); // 10 Mhz SPI clock + // _spi.frequency(1000000) ; _cs = 1; // cs high _dc = 1; // dc high if (_reset != NC) @@ -318,11 +319,13 @@ void SPI_TFT_ILI9341::cls (void) { int pixel = ( width() * height()); +// tft_reset() ; // effective but may be too much WindowMax(); wr_cmd(0x2C); // send pixel #if defined TARGET_KL25Z // 8 Bit SPI unsigned int i; for (i = 0; i < ( width() * height()); i++){ + // for (i = 0 ; i < pixel ; i++ ) { _spi.write(_background >> 8); _spi.write(_background & 0xff); } @@ -331,6 +334,7 @@ _spi.format(16,3); // switch to 16 bit Mode 3 unsigned int i; for (i = 0; i < ( width() * height()); i++) + // for (i = 0 ; i < pixel ; i++ ) _spi.write(_background); _spi.format(8,3); #endif