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_Media.cpp
- 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 @@ +