   int nPinYm = -1;
 
   int i, j, value, Apins[2], Dpins[2], Values[2], found = 0;
-  int nMcuFriendId = -1;
-
-  #if defined(DRV_DISP_ADAGFX_MCUFRIEND)
-    // For MCUFRIEND displays, detect the ID
-    nMcuFriendId = m_disp.readID();
-  #endif // DRV_DISP_ADAGFX_MCUFRIEND
+  bool bRet = false;
 
   GSLC_DEBUG_PRINT("Making all control and bus pins INPUT_PULLUP\n", "");
   GSLC_DEBUG_PRINT("Typical 30k Analog pullup with corresponding pin\n", "");

  // Import MCUFRIEND to support ID reporting
  #include <MCUFRIEND_kbv.h>
  extern MCUFRIEND_kbv m_disp;
#endif

#define MAX_STR             30

      digitalWrite(j, LOW);
      value = analogRead(i);   // ignore first reading
      value = analogRead(i);
      if (value < 100 && value > 0) {
        GSLC_DEBUG_PRINT(" Detected: (A%u, D%u) = %u\n", (i - A0), j, value);
        if (found < 2) {
          Apins[found] = i;
          Dpins[found] = j;
          Values[found] = value;
        }
        found++;
      }
      pinMode(j, INPUT_PULLUP);
    }
    pinMode(i, INPUT_PULLUP);
  }

  if (found == 2) {
    if (Values[0] < Values[1]) {
      nPinXm = Apins[0];
