Rihards Balass / 4DGL-mbed-32PTU
Revision:
21:ea68a8a3cea4
Parent:
20:88e137b9ea46
Child:
22:cea582ea74c1
--- a/Picaso_4DGL-32PTU_Response.cpp	Mon Sep 26 10:51:02 2016 +0000
+++ b/Picaso_4DGL-32PTU_Response.cpp	Mon Sep 26 13:41:22 2016 +0000
@@ -242,3 +242,20 @@
     }
 }
 
+//**************************************************************************
+short PICASO_4DGL :: fileErrorResponse() {
+    
+#if DEBUGMODE
+    pc.printf("\n\r DEBUG: Wait for answer");
+#endif
+
+    while (index < 3) wait_ms(100); // wait for screen answer
+    
+#if DEBUGMODE
+    pc.printf("\n\r DEBUG: Answer = ");
+    pc.printf("%02X %02X %02X\n\r", rxBuf[0], rxBuf[1], rxBuf[2]);
+#endif
+    short error = rxBuf[1] << 8 | rxBuf[2];
+    return error;
+}
+