Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of SPI_TFT_ILI9341 by
Revision 7:3ac45671dc77, committed 2013-10-23
- Comitter:
- mazgch
- Date:
- Wed Oct 23 01:34:51 2013 +0000
- Parent:
- 6:55aed13f2630
- Parent:
- 5:93cc09de603a
- Child:
- 8:32bf76e1ec9f
- Commit message:
- latest changes from original lib
Changed in this revision
| SPI_TFT_ILI9341.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/SPI_TFT_ILI9341.cpp Tue Oct 22 20:55:39 2013 +0000
+++ b/SPI_TFT_ILI9341.cpp Wed Oct 23 01:34:51 2013 +0000
@@ -25,10 +25,11 @@
//extern DigitalOut xx; // debug !!
SPI_TFT_ILI9341::SPI_TFT_ILI9341(PinName mosi, PinName miso, PinName sclk, PinName cs, PinName reset, PinName dc, const char *name)
- : _spi(mosi, miso, sclk), _cs(cs), _reset(reset), _dc(dc), GraphicsDisplay(name)
+ : _spi(mosi, miso, sclk), _cs(cs), _dc(dc), GraphicsDisplay(name)
{
orientation = 0;
char_x = 0;
+ _reset = reset;
tft_reset();
}
@@ -110,10 +111,13 @@
_spi.frequency(10000000); // 10 Mhz SPI clock
_cs = 1; // cs high
_dc = 1; // dc high
- _reset = 0; // display reset
-
- wait_us(50);
- _reset = 1; // end hardware reset
+ if (_reset != NC)
+ {
+ DigitalOut rst(_reset);
+ rst = 0; // display reset
+ wait_us(50);
+ rst = 1; // end hardware reset
+ }
wait_ms(5);
wr_cmd(0x01); // SW reset
--- a/SPI_TFT_ILI9341.h Tue Oct 22 20:55:39 2013 +0000
+++ b/SPI_TFT_ILI9341.h Wed Oct 23 01:34:51 2013 +0000
@@ -277,7 +277,7 @@
SPI _spi;
DigitalOut _cs;
- DigitalOut _reset;
+ PinName _reset;
DigitalOut _dc;
unsigned char* font;
