alterações para funcionar com o display
Revision 10:cf90289580ac, committed 2019-04-04
- Comitter:
- chelssi
- Date:
- Thu Apr 04 15:37:07 2019 +0000
- Parent:
- 9:b8bc8296da24
- Commit message:
- KL25z e Display ILI9341 touch;
Changed in this revision
SPI_TFT_ILI9341.cpp | Show annotated file Show diff for this revision Revisions of this file |
SPI_TFT_ILI9341.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r b8bc8296da24 -r cf90289580ac SPI_TFT_ILI9341.cpp --- a/SPI_TFT_ILI9341.cpp Tue May 06 18:09:00 2014 +0000 +++ b/SPI_TFT_ILI9341.cpp Thu Apr 04 15:37:07 2019 +0000 @@ -125,26 +125,26 @@ wr_cmd(0x28); // display off /* Start Initial Sequence ----------------------------------------------------*/ - wr_cmd(0xCF); + wr_cmd(0xCF); //copiado para 11-2 _spi.write(0x00); _spi.write(0x83); _spi.write(0x30); _cs = 1; - wr_cmd(0xED); + wr_cmd(0xED); //igual _spi.write(0x64); _spi.write(0x03); _spi.write(0x12); _spi.write(0x81); _cs = 1; - wr_cmd(0xE8); + wr_cmd(0xE8); //copiado para 11-2 _spi.write(0x85); _spi.write(0x01); _spi.write(0x79); _cs = 1; - wr_cmd(0xCB); + wr_cmd(0xCB); //igual _spi.write(0x39); _spi.write(0x2C); _spi.write(0x00); @@ -152,54 +152,54 @@ _spi.write(0x02); _cs = 1; - wr_cmd(0xF7); + wr_cmd(0xF7); //copiado para 11-2 _spi.write(0x20); _cs = 1; - wr_cmd(0xEA); + wr_cmd(0xEA); //igual _spi.write(0x00); _spi.write(0x00); _cs = 1; - wr_cmd(0xC0); // POWER_CONTROL_1 + wr_cmd(0xC0); // POWER_CONTROL_1 //copiado para 11-2 _spi.write(0x26); _cs = 1; - wr_cmd(0xC1); // POWER_CONTROL_2 + wr_cmd(0xC1); // POWER_CONTROL_2 //copiado para 11-2 _spi.write(0x11); _cs = 1; - wr_cmd(0xC5); // VCOM_CONTROL_1 + wr_cmd(0xC5); // VCOM_CONTROL_1 //copiado para 11-2 _spi.write(0x35); _spi.write(0x3E); _cs = 1; - wr_cmd(0xC7); // VCOM_CONTROL_2 + wr_cmd(0xC7); // VCOM_CONTROL_2 //copiado para 11-2 _spi.write(0xBE); _cs = 1; - wr_cmd(0x36); // MEMORY_ACCESS_CONTROL + wr_cmd(0x36); // MEMORY_ACCESS_CONTROL //igual _spi.write(0x48); _cs = 1; - wr_cmd(0x3A); // COLMOD_PIXEL_FORMAT_SET + wr_cmd(0x3A); // COLMOD_PIXEL_FORMAT_SET //igual _spi.write(0x55); // 16 bit pixel _cs = 1; - wr_cmd(0xB1); // Frame Rate + wr_cmd(0xB1); // Frame Rate //copiado para 11-2 _spi.write(0x00); _spi.write(0x1B); _cs = 1; - wr_cmd(0xF2); // Gamma Function Disable + wr_cmd(0xF2); // Gamma Function Disable //copiado para 11-2 _spi.write(0x08); _cs = 1; wr_cmd(0x26); - _spi.write(0x01); // gamma set for curve 01/2/04/08 + _spi.write(0x01); // gamma set for curve 01/2/04/08 //igual _cs = 1; - wr_cmd(0xE0); // positive gamma correction + wr_cmd(0xE0); // positive gamma correction //copiado para 11-2 _spi.write(0x1F); _spi.write(0x1A); _spi.write(0x18); @@ -217,7 +217,7 @@ _spi.write(0x00); _cs = 1; - wr_cmd(0xE1); // negativ gamma correction + wr_cmd(0xE1); // negativ gamma correction //copiado para 11-2 _spi.write(0x00); _spi.write(0x25); _spi.write(0x27); @@ -243,23 +243,23 @@ //wr_cmd(0x35); // tearing effect on //_cs = 1; - wr_cmd(0xB7); // entry mode + wr_cmd(0xB7); // entry mode //copiado para 11-2 _spi.write(0x07); _cs = 1; - wr_cmd(0xB6); // display function control + wr_cmd(0xB6); // display function control //copiado para 11-2 _spi.write(0x0A); _spi.write(0x82); _spi.write(0x27); _spi.write(0x00); _cs = 1; - wr_cmd(0x11); // sleep out + wr_cmd(0x11); // sleep out //copiado para 11-2 _cs = 1; wait_ms(100); - wr_cmd(0x29); // display on + wr_cmd(0x29); // display on //copiado para 11-2 (igual) _cs = 1; wait_ms(100);
diff -r b8bc8296da24 -r cf90289580ac SPI_TFT_ILI9341.h --- a/SPI_TFT_ILI9341.h Tue May 06 18:09:00 2014 +0000 +++ b/SPI_TFT_ILI9341.h Thu Apr 04 15:37:07 2019 +0000 @@ -2,7 +2,7 @@ * Copyright (c) 2013 Peter Drescher - DC2PD * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * IMPLIED, ILUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,