Arduino style GUI
Revision 4:d353b314d244, committed 2019-02-27
- Comitter:
- jonebuckman
- Date:
- Wed Feb 27 22:34:06 2019 +0000
- Parent:
- 3:b5409826d05f
- Commit message:
- Updated writeCommand and writeData.
Changed in this revision
Drivers/ILI9163.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r b5409826d05f -r d353b314d244 Drivers/ILI9163.cpp --- a/Drivers/ILI9163.cpp Wed Feb 27 22:23:34 2019 +0000 +++ b/Drivers/ILI9163.cpp Wed Feb 27 22:34:06 2019 +0000 @@ -220,8 +220,14 @@ //Pull cs low to select the TFT m_CS = 0; + //Pull wr low to initialize for write + m_WR = 0; + + //Set the command byte + bus = command; + //Write the command byte - bus = command; + m_WR = 1; //Pull CS high to end the transfer m_CS = 1; @@ -235,8 +241,14 @@ //Pull cs low to select the TFT m_CS = 0; + //Pull wr low to initialize for write + m_WR = 0; + + //Set the data byte + bus = data; + //Write the command byte - bus = data; + m_WR = 1; //Pull CS high to end the transfer m_CS = 1; @@ -250,10 +262,23 @@ //Pull cs low to select the TFT m_CS = 0; + //Pull wr low to initialize for write + m_WR = 0; + //Write the 2 data bytes bus = (char)(data >> 8); + + //Write the command byte + m_WR = 1; + + //Pull wr low to initialize for write + m_WR = 0; + bus = (char)data; + //Write the command byte + m_WR = 1; + //Pull CS high to end the transfer m_CS = 1; }