Rihards Balass / 4DGL-mbed-32PTU
Revision:
16:cb072eea16e9
Parent:
15:86bdf382e6f7
Child:
18:829f3e2c064c
--- a/Picaso_4DGL-32PTU_Media.cpp	Thu Sep 15 11:52:31 2016 +0000
+++ b/Picaso_4DGL-32PTU_Media.cpp	Thu Sep 15 12:26:58 2016 +0000
@@ -162,6 +162,25 @@
     return success;
 }
 
+//**************************************************************************
+// The Read Byte command returns the byte value from the current media address,
+// set by the “Set Byte Address” command.
+// The internal byte address will then be internally incremented by one.
+//**************************************************************************
+bool PICASO_4DGL :: media_ReadByte() {
+
+    char command[2] = "";
+    
+    command[0] = (MEDIA_READ_BYTE >> (8*1)) & 0xff;
+    command[1] = (MEDIA_READ_BYTE >> (8*0)) & 0xff;
+    
+    writeCOMMAND(command, 2);
+    bool success = readByteResponse(3);
+#ifdef DEBUGMODE
+    pc.printf("\n\r DEBUG: Read byte: %i\n\r", success);
+#endif
+    return success;
+}
 
 
 
@@ -192,3 +211,4 @@
 
 
 
+