From 05a9aee2609ddd977e999a6493831fb3026d216e Mon Sep 17 00:00:00 2001 From: Bodmer Date: Sat, 11 Mar 2017 16:38:29 +0000 Subject: [PATCH] Permit D6 (MISO) to be used for DC to save on pins Using D6 (MISO) for the DC line is not recommended as transaction support and TFT reads may cause it to become and input! However if a hardware setup has no other pins spare, then this is an option that can be tried. --- TFT_eSPI.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/TFT_eSPI.cpp b/TFT_eSPI.cpp index 1879da9..7d0fa65 100644 --- a/TFT_eSPI.cpp +++ b/TFT_eSPI.cpp @@ -151,6 +151,10 @@ void TFT_eSPI::init(void) // SPI1U1 |= SPIUSIO; // Single I/O pin on MOSI (bi-directional) - not tested + // Set to output once again incase D6 (MISO) is used for DC + digitalWrite(TFT_DC, HIGH); // Data/Command high = data mode + pinMode(TFT_DC, OUTPUT); + // toggle RST low to reset #ifdef TFT_RST if (TFT_RST >= 0) {