Arduino style GUI

Revision:
4:d353b314d244
Parent:
3:b5409826d05f
--- 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;
 }