Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: Picaso_4DGL-32PTU_main.cpp
- Revision:
- 16:cb072eea16e9
- Parent:
- 15:86bdf382e6f7
- Child:
- 17:5bf7947c3c19
diff -r 86bdf382e6f7 -r cb072eea16e9 Picaso_4DGL-32PTU_main.cpp
--- a/Picaso_4DGL-32PTU_main.cpp Thu Sep 15 11:52:31 2016 +0000
+++ b/Picaso_4DGL-32PTU_main.cpp Thu Sep 15 12:26:58 2016 +0000
@@ -388,3 +388,27 @@
return false;
}
}
+
+//**************************************************************************
+bool PICASO_4DGL :: readByteResponse(int count) {
+
+#if DEBUGMODE
+ pc.printf("\n\r DEBUG: Wait for answer");
+#endif
+
+ while (index < count) 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
+
+ if (rxBuf[0] == 6) {
+ index = 0; // set buffer index to 0
+ return true;
+ }
+ else {
+ index = 0;
+ return false;
+ }
+}