KSM edits to RA8875

Dependents:   Liz_Test_Code

Revision:
176:4ab96d33a8ec
Parent:
175:7be3a1fb7fc2
--- a/RA8875.cpp	Fri Mar 15 01:39:39 2019 +0000
+++ b/RA8875.cpp	Sun Mar 24 14:49:49 2019 +0000
@@ -192,8 +192,11 @@
     , cs(csel)
     , res(reset)
 {
-    useTouchPanel = TP_NONE;
-    touchInfo = NULL;
+    touchInfo = (touchInfo_T *)malloc(RESISTIVE_TOUCH_POINTS * sizeof(touchInfo_T));
+    if (touchInfo)
+        useTouchPanel = TP_RES;
+    else
+        useTouchPanel = TP_NONE;    // unfortnately a silent failure, but unlikely
     tpFQFN = NULL;
     tpCalMessage = NULL;
     m_irq = NULL;